Skip to content

feat: simplify test #1868

feat: simplify test

feat: simplify test #1868

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
linux:
strategy:
matrix:
config:
- { name: "Linux-x86_64-Release", type: "release", cmake_args: "-DBUILD_STEAMLIB=1 -DUSE_GRAPHICS_NRI=1" }
- { name: "Linux-x86_64-Debug", type: "debug", cmake_args: "-DBUILD_STEAMLIB=1 -DUSE_GRAPHICS_NRI=1" }
name: ${{ matrix.config.name }}
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
env:
DEBIAN_FRONTEND: noninteractive
DEBCONF_NONINTERACTIVE_SEEN: true
steps:
- name: Setup
run: |
echo "ACTIONS_CACHE_URL=$ACTIONS_CACHE_URL" >> "$GITHUB_ENV"
echo "ACTIONS_RUNTIME_TOKEN=$ACTIONS_ID_TOKEN_REQUEST_TOKEN" >> "$GITHUB_ENV"
apt update
apt install -y git curl clang cmake build-essential libsdl2-dev libopenal-dev libvorbis-dev libfreetype6-dev libcurl4-gnutls-dev git zip unzip python3 autoconf libtool meson automake libtool pkg-config python3-jinja2
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Add safe directory - https://github.com/actions/checkout/issues/1169
run: git config --system --add safe.directory /__w/warfork-qfusion/warfork-qfusion
- name: Download steamworks sdk
run: |
curl https://warfork.com/downloads/sdk/ --output third-party/steamworks/sdk.zip
unzip third-party/steamworks/sdk.zip -d third-party/steamworks
- name: Building
if: matrix.config.type == 'release'
working-directory: ./source
run: |
export CC=clang CXX=clang++
cmake ${{matrix.config.cmake_args}} -DCMAKE_BUILD_TYPE=Release -DVCPKG_INSTALL_OPTIONS="--binarysource=clear\;x-gha,readwrite" .
make -j8
- name: Building
if: matrix.config.type == 'debug'
working-directory: ./source
run: |
export CC=clang CXX=clang++
cmake ${{matrix.config.cmake_args}} -DCMAKE_BUILD_TYPE=Debug -DVCPKG_INSTALL_OPTIONS="--binarysource=clear\;x-gha,readwrite" .
make -j8
- name: Package warfork
working-directory: ./source/build
run: tar -czvf ../${{matrix.config.name}}.tar.gz * --exclude *.a --exclude base*/*.a libs/*.a
- name: Upload warfork artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.config.name}}
path: source/${{matrix.config.name}}.tar.gz
osx:

Check failure on line 65 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 65, Col: 5): Unexpected value 'osx'
strategy:
matrix:
config:
- { agent: "macos-12", name: "OSX-x86_64-Release", xcode-version: '13.4.1', type: "release", cmake_args: "-DBUILD_STEAMLIB=1" }
- { agent: "macos-12", name: "OSX-x86_64-Debug", xcode-version: '13.4.1', type: "debug", cmake_args: "-DBUILD_STEAMLIB=1 -DWF_BUILD_DSYM=ON " }
- { agent: "macos-latest", name: "OSX-arm64-Release", xcode-version: '15.0.1', type: "release", cmake_args: "-DBUILD_STEAMLIB=1" }
- { agent: "macos-latest", name: "OSX-arm64-Debug", xcode-version: '15.0.1', type: "debug", cmake_args: "-DBUILD_STEAMLIB=1 -DWF_BUILD_DSYM=ON" }
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.agent }}
steps:
- name: Setup
shell: bash
run: |
echo "ACTIONS_CACHE_URL=$ACTIONS_CACHE_URL" >> "$GITHUB_ENV"
echo "ACTIONS_RUNTIME_TOKEN=$ACTIONS_ID_TOKEN_REQUEST_TOKEN" >> "$GITHUB_ENV"
brew uninstall --force azure-cli
brew uninstall --force aws-sam-cli
brew install python@3 || brew link --overwrite python@3
brew update
brew install curl cmake sdl2 openal-soft libvorbis freetype git zip unzip
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{matrix.config.xcode-version}}
- name: Download steamworks sdk
run: |
curl https://warfork.com/downloads/sdk/ --output third-party/steamworks/sdk.zip
unzip third-party/steamworks/sdk.zip -d third-party/steamworks
- name: Building Debug
if: matrix.config.type == 'release'
working-directory: ./source
run: |
cmake ${{matrix.config.cmake_args}} -DCMAKE_BUILD_TYPE=RELEASE -DVCPKG_INSTALL_OPTIONS="--binarysource=clear\;x-gha,readwrite" -G Xcode .
xcodebuild -project qfusion.xcodeproj/ -jobs 4 -configuration Release -target ALL_BUILD CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
- name: Building Release
if: matrix.config.type == 'debug'
working-directory: ./source
run: |
cmake ${{matrix.config.cmake_args}} -DCMAKE_BUILD_TYPE=DEBUG -DVCPKG_INSTALL_OPTIONS="--binarysource=clear\;x-gha,readwrite" -G Xcode .
xcodebuild -project qfusion.xcodeproj/ -jobs 4 -configuration Debug -target ALL_BUILD CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
- name: Build project
working-directory: ./source
run:
- name: Package warfork
working-directory: ./source/build
run: tar -czvf ../${{matrix.config.name}} Release/*.app
- name: Upload warfork artifact
uses: actions/upload-artifact@v3
with:
name: osx-arm-release
path: source/${{matrix.config.name}}.gz
windows:
strategy:
matrix:
config:
- { agent: "windows-latest", name: "win-x86_64-Release", vs_version: 'Visual Studio 17 2022', type: "release", cmake_args: "-DBUILD_STEAMLIB=1" }
- { agent: "windows-latest", name: "win-x86_64-Debug", vs_version: 'Visual Studio 17 2022', type: "debug", cmake_args: "-DBUILD_STEAMLIB=1 -DWF_BUILD_DSYM=ON " }
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.agent }}
steps:
- name: Setup
run: |
Add-Content -Path $env:GITHUB_ENV -Value "ACTIONS_CACHE_URL=$ACTIONS_CACHE_URL"
Add-Content -Path $env:GITHUB_ENV -Value "ACTIONS_RUNTIME_TOKEN=$ACTIONS_ID_TOKEN_REQUEST_TOKEN"
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download steamworks sdk
run: |
curl https://warfork.com/downloads/sdk/ --output third-party/steamworks/sdk.zip
7z x third-party/steamworks/sdk.zip -othird-party/steamworks
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Building Release
if: matrix.config.type == 'debug'
working-directory: .\source
run: |
cmake ${{matrix.config.cmake_args}} -G "${{matrix.config.vs_version}}" -A x64 -DCMAKE_BUILD_TYPE=DEBUG -DVCPKG_INSTALL_OPTIONS="--binarysource=clear\;x-gha,readwrite" .
msbuild qfusion.sln /p:configuration=Debug /maxcpucount:8
- name: Building Debug
if: matrix.config.type == 'release'
working-directory: .\source
run: |
cmake ${{matrix.config.cmake_args}} -G "${{matrix.config.vs_version}}" -A x64 -DCMAKE_BUILD_TYPE=RELEASE -DVCPKG_INSTALL_OPTIONS="--binarysource=clear\;x-gha,readwrite" .
msbuild qfusion.sln /p:configuration=Release /maxcpucount:8
- name: Package warfork
working-directory: .\source\build\Release
run: 7z a ..\..\${{matrix.config.name}}.zip * '-xr!*.exp' '-xr!*.lib'
- name: Upload warfork artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.config.name}}
path: source\${{matrix.config.name}}.zip