Skip to content

Commit

Permalink
Add Dreamcast job
Browse files Browse the repository at this point in the history
  • Loading branch information
azihassan committed Aug 5, 2024
1 parent 0c20215 commit 13e61e2
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/dreamcast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
name: Sega Dreamcast

on: # yamllint disable-line rule:truthy
push:
branches:
- master
- ci
paths-ignore:
- '*.md'
- 'docs/**'
pull_request:
types: [opened, synchronize]
paths-ignore:
- '*.md'
- 'docs/**'
release:
types: [published]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
container: azihassan/kallistios:docker
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build unpack_and_minify_mpq
run: |
git clone https://github.com/diasurgical/devilutionx-mpq-tools/ && \
cd devilutionx-mpq-tools && \
cmake -S. -Bbuild-rel -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF && \
cmake --build build-rel && \
cmake --install build-rel
- name: Download and unpack spawn.mpq
run: |
#curl -LO https://github.com/diasurgical/devilutionx-assets/releases/latest/download/spawn.mpq
curl -LO http://ftp.blizzard.com/pub/demos/diablosw.exe
7z e -so diablosw.exe '[0]' > spawn.mpq
rm diablosw.exe
unpack_and_minify_mpq spawn.mpq --output-dir data
rm spawn.mpq
- name: Configure CMake
run: |
source /opt/toolchains/dc/kos/environ.sh && \
kos-cmake \
-S . \
-B build
- name: Build DevilutionX
run: |
patch build/_deps/libfmt-src/include/fmt/format.h -l -p0 < libfmt-long-double.patch
source /opt/toolchains/dc/kos/environ.sh && cd build && kos-make
- name: Generate .cdi
run: |
cp -R data/spawn build/data/spawn && \
mkdcdisc -e build/devilutionx.elf -o build/devilutionx.cdi --name 'Diablo 1' -d build/data/
- name: Upload .cdi Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: devilutionx.cdi
path: ./build/devilutionx.cdi

- name: Upload .elf Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: devilutionx.elf
path: ./build/devilutionx.elf
...
12 changes: 12 additions & 0 deletions libfmt-long-double.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/build/_deps/libfmt-src/include/fmt/format.h b/build/_deps/libfmt-src/include/fmt/format.h
index 7637c8a0d..92b2131ef 100644
--- a/build/_deps/libfmt-src/include/fmt/format.h
+++ b/build/_deps/libfmt-src/include/fmt/format.h
@@ -1542,6 +1542,7 @@ template <> struct float_info<double> {
template <typename T>
struct float_info<T, enable_if_t<std::numeric_limits<T>::digits == 64 ||
+ std::numeric_limits<T>::digits == 53 ||
std::numeric_limits<T>::digits == 113 ||
is_float128<T>::value>> {
using carrier_uint = detail::uint128_t;

0 comments on commit 13e61e2

Please sign in to comment.