game compatibility: add DOOM + DOOM II (#42) #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*.*.*" | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-dummy: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install meson | |
run: python -m pip install meson ninja | |
- name: Setup | |
working-directory: dummy-service | |
run: meson setup build | |
- name: Build | |
working-directory: dummy-service | |
run: meson compile -C build | |
- name: Copy files | |
run: copy .\dummy-service\build\*.exe .\dummy-service | |
- name: Create a dummy-service archive | |
shell: bash | |
working-directory: ./dummy-service | |
run: 7z a ../dummy-service.zip ./*.{exe,bat} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dummy-GalaxyCommunication.exe | |
path: | | |
dummy-service/*.exe | |
dummy-service.zip | |
build: | |
strategy: | |
matrix: | |
target: | |
[ | |
x86_64-unknown-linux-gnu, | |
aarch64-unknown-linux-gnu, | |
x86_64-apple-darwin, | |
aarch64-apple-darwin, | |
x86_64-pc-windows-msvc, | |
aarch64-pc-windows-msvc, | |
] | |
runs-on: ${{ (contains(matrix.target, 'apple-darwin') && 'macos-latest') || | |
(contains(matrix.target, 'linux-gnu') && 'ubuntu-latest') || | |
(contains(matrix.target, 'pc-windows') && 'windows-latest') }} | |
needs: build-dummy | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }} | |
name: Install arm gcc | |
run: sudo apt install gcc-aarch64-linux-gnu | |
- name: Setup target | |
run: rustup target add ${{ matrix.target }} | |
- name: Build | |
run: cargo build --verbose --release --target ${{ matrix.target }} | |
- name: Download dummy service for packaging | |
uses: actions/download-artifact@v4 | |
with: | |
name: dummy-GalaxyCommunication.exe | |
path: . | |
- name: Copy files | |
shell: bash | |
run: ci/package-build.sh ${{ matrix.target }} | |
- name: Create Steam Deck archive | |
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} | |
run: | | |
7z a steam-deck.zip comet* docs/steamdeck/ dummy-service/*.{exe,md,bat} && \ | |
7z rn steam-deck.zip comet-x86_64-unknown-linux-gnu comet | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: comet-${{ matrix.target }} | |
path: | | |
comet* | |
steam-deck.zip | |
draft-release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build | |
steps: | |
- name: Download builds | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- name: Create draft | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
generate_release_notes: true | |
files: | | |
comet* | |
*.zip | |