Skip to content

Commit

Permalink
ci: use strategy matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Dec 29, 2024
1 parent 91feda3 commit 42b7780
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on: [push, pull_request]
jobs:
Linux:
runs-on: ubuntu-20.04
strategy:
matrix:
discord_rpc: [ON, OFF]
drag_drop: [ON, OFF]
netplay: [ON, OFF]
vru: [ON, OFF]
angrylion: [ON, OFF]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -20,13 +27,23 @@ jobs:
run: |
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Build RMG (AppImage)
with:
discord_rpc: ${{ matrix.discord_rpc }}
drag_drop: ${{ matrix.drag_drop }}
netplay: ${{ matrix.netplay }}
vru: ${{ matrix.vru }}
angrylion: ${{ matrix.angrylion }}
run: |
mkdir Build Build/AppImage Bin/ -p
export build_dir="$(pwd)/Build/$RANDOM"
export src_dir="$(pwd)"
export build_dir="$(pwd)/Build/AppImage"
export bin_dir="$(pwd)/Bin/AppImage"
export bin_dir="$(pwd)/Bin/$RANDOM"
mkdir $build_dir Bin/ -p
cmake -S "$src_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="Release" \
-DUSE_ANGRYLION=ON \
-DDISCORD_RPC=${discord_rpc} \
-DDRAG_DROP=${drag_drop} \
-DNETPLAY=${netplay} \
-DVRU=${vru} \
-DUSE_ANGRYLION=${angrylion} \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DPORTABLE_INSTALL="OFF" \
Expand All @@ -35,15 +52,15 @@ jobs:
cmake --build "$build_dir"
cmake --install "$build_dir" --strip --prefix="$bin_dir/usr"
shell: bash
- name: Create AppImage
run: |
./Package/AppImage/Create.sh
shell: bash
- name: Upload RMG (AppImage)
uses: actions/upload-artifact@v4
with:
name: RMG-Portable-Linux64-${{ env.GIT_REVISION }}
path: Bin/*.AppImage
# - name: Create AppImage
# run: |
# ./Package/AppImage/Create.sh
# shell: bash
# - name: Upload RMG (AppImage)
# uses: actions/upload-artifact@v4
# with:
# name: RMG-Portable-Linux64-${{ env.GIT_REVISION }}
# path: Bin/*.AppImage

Windows:
runs-on: windows-2019
Expand Down

0 comments on commit 42b7780

Please sign in to comment.