diff --git a/.github/workflows/dreamcast.yml b/.github/workflows/dreamcast.yml new file mode 100644 index 00000000000..87a5845b23e --- /dev/null +++ b/.github/workflows/dreamcast.yml @@ -0,0 +1,78 @@ +--- +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: Download spawn.mpq + run: | + curl -LO https://github.com/diasurgical/devilutionx-assets/releases/latest/download/spawn.mpq + + - 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: Setup tmate session + uses: mxschmitt/action-tmate@v3 + + - name: Configure CMake + run: | + kos-cmake \ + -S . \ + -B build + + - name: Build DevilutionX + run: kos-cmake --build build + + - name: Generate .cdi + run: | + unpack_and_minify_mpq spawn.mpq --output-dir data && \ + 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 +...