Add support for -levelstat
parameter from Crispy Doom
#13
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-Static-Win64-and-Linux-AppImage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Get latest VCPKG commit | |
shell: bash | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
cd vcpkg | |
export LATEST_COMMIT=$(git rev-parse HEAD) | |
echo "LATEST_COMMIT=$LATEST_COMMIT" >> $GITHUB_ENV | |
- name: Update builtin-baseline in vcpkg.json | |
shell: bash | |
run: | | |
jq --arg commit "$LATEST_COMMIT" '. + {"builtin-baseline": $commit}' vcpkg.json > temp.json && mv temp.json vcpkg.json | |
- name: Install vcpkg | |
run: | | |
.\vcpkg\bootstrap-vcpkg.bat | |
- name: Remove vcpkg.json for classic mode | |
shell: bash | |
run: | | |
if [ -f "vcpkg.json" ]; then | |
rm "vcpkg.json" | |
fi | |
- name: Install Dependencies with vcpkg | |
run: | | |
.\vcpkg\vcpkg.exe install sdl2 sdl2-mixer sdl2-net libsamplerate --triplet x64-windows-static-release --overlay-triplets=cmake/triplets | |
- name: Configure CMake | |
run: | | |
cmake -B build_vs_64 -S . -DCMAKE_BUILD_TYPE=Release ` | |
-DENABLE_LTO=ON ` | |
-DVCPKG_OVERLAY_TRIPLETS="cmake/triplets" ` | |
-DVCPKG_TARGET_TRIPLET="x64-windows-static-release" ` | |
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW ` | |
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ` | |
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake | |
- name: Build | |
run: cmake --build build_vs_64 --config Release | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crl-dev-win64 | |
path: build_vs_64/src/Release/*.exe | |
retention-days: 90 | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
game: [doom, heretic] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake g++ fuse patchelf \ | |
libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev \ | |
libsamplerate0-dev \ | |
libx11-dev libxext-dev libxrender-dev libxrandr-dev \ | |
libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | |
- name: Install linuxdeploy and plugin | |
run: | | |
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage | |
chmod +x linuxdeploy*.AppImage | |
- name: Build the project | |
run: | | |
cmake -B build_linux -S . -DCMAKE_BUILD_TYPE=Release | |
cmake --build build_linux --config Release | |
- name: Add desktop file and icon | |
run: | | |
mkdir -p appdir/usr/share/applications | |
cp data/${{ matrix.game }}.desktop appdir/usr/share/applications/crl-${{ matrix.game }}.desktop | |
mkdir -p appdir/usr/share/icons/hicolor/128x128/apps | |
cp data/${{ matrix.game }}.png appdir/usr/share/icons/hicolor/128x128/apps/crl-${{ matrix.game }}.png | |
- name: Add executable to AppDir | |
run: | | |
mkdir -p appdir/usr/bin | |
cp build_linux/src/crl-${{ matrix.game }} appdir/usr/bin/ | |
- name: Package as AppImage | |
run: | | |
./linuxdeploy-x86_64.AppImage --appdir=appdir --output appimage | |
- name: Clean up unnecessary files | |
run: | | |
rm -f linuxdeploy*.AppImage | |
- name: Upload AppImage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crl-${{ matrix.game }}-dev-linux64 | |
path: "**/*.AppImage" | |
retention-days: 90 |