Skip to content

feat: add graphics layer #2266

feat: add graphics layer

feat: add graphics layer #2266

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
linux:
strategy:
max-parallel: 1
matrix:
config:
- {
name: "Linux-x86_64-Release",
type: "release",
cmake_args: "-DBUILD_STEAMLIB=1 -DUSE_GRAPHICS_NRI=1 -DUSE_SYSTEM_ZLIB=1 -DUSE_SYSTEM_OPENAL=1 -DUSE_SYSTEM_CURL=1 -DUSE_SYSTEM_FREETYPE=1",
}
- {
name: "Linux-x86_64-Debug",
type: "debug",
cmake_args: "-DBUILD_STEAMLIB=1 -DUSE_GRAPHICS_NRI=1 -DUSE_SYSTEM_ZLIB=1 -DUSE_SYSTEM_OPENAL=1 -DUSE_SYSTEM_CURL=1 -DUSE_SYSTEM_FREETYPE=1",
}
name: ${{ matrix.config.name }}
runs-on: ubuntu-20.04
container:
image: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
steps:
- 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 Release
if: matrix.config.type == 'release'
working-directory: ./source
run: |
export CC=clang-11 CXX=clang++-11
cmake -B ./build ${{matrix.config.cmake_args}} -DBUILD_UNIT_TEST=1 -DCMAKE_BUILD_TYPE=Release
cd build
make -j8
- name: Building Debug
if: matrix.config.type == 'debug'
working-directory: ./source
run: |
export CC=clang-11 CXX=clang++-11
cmake -B ./build ${{matrix.config.cmake_args}} -DBUILD_UNIT_TEST=1 -DCMAKE_BUILD_TYPE=Debug
cd build
make -j8
- name: Unit Test
working-directory: ./source/build/warfork-qfusion
shell: bash
run: |
set -e
for exc in ./test/*; do
$exc
done
- name: Package warfork
working-directory: ./source/build/warfork-qfusion
run: tar --exclude='*.a' --exclude='base*/*.a' --exclude='libs/*.a' --exclude='test' -zcvf ../${{matrix.config.name}}.tar.gz *
- name: Upload warfork artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.config.name}}
path: source/build/${{matrix.config.name}}.tar.gz
osx:
strategy:
max-parallel: 1
matrix:
config:
- {
agent: "macos-13",
name: "OSX-x86_64-Release",
xcode-version: "15.0.1",
type: "release",
cmake_args: "-DBUILD_STEAMLIB=1 -DUSE_SYSTEM_CURL=1",
build_folder: "Release",
}
- {
agent: "macos-13",
name: "OSX-x86_64-Debug",
xcode-version: "15.0.1",
type: "debug",
cmake_args: "-DBUILD_STEAMLIB=1 -DWF_BUILD_DSYM=ON -DUSE_SYSTEM_CURL=1",
build_folder: "Debug",
}
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.agent }}
steps:
- name: Replace problem-causing python installation - https://github.com/TeamForbiddenLLC/warfork-qfusion/pull/325 - Fixed in macos-14
shell: bash
run: |
brew uninstall --force azure-cli aws-sam-cli
brew install python@3 || brew link --overwrite python@3
- name: Install deps
uses: gerlero/brew-install@v1
with:
packages: cmake git zip unzip libidn2 curl
- 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 Release
if: matrix.config.type == 'release'
working-directory: ./source
run: |
cmake -B ./build ${{matrix.config.cmake_args}} -DBUILD_UNIT_TEST=1 -DCMAKE_BUILD_TYPE=RELEASE -G Xcode
cd build
xcodebuild -project qfusion.xcodeproj/ -jobs 4 -configuration Release -target ALL_BUILD CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
- name: Building Debug
if: matrix.config.type == 'debug'
working-directory: ./source
run: |
cmake -B ./build ${{matrix.config.cmake_args}} -DBUILD_UNIT_TEST=1 -DCMAKE_BUILD_TYPE=DEBUG -G Xcode
cd build
xcodebuild -project qfusion.xcodeproj/ -jobs 4 -configuration Debug -target ALL_BUILD CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
- name: Package warfork
working-directory: ./source/build/warfork-qfusion
run: tar --exclude='test' -czvf ../${{matrix.config.name}}.tar.gz ${{matrix.config.build_folder}}/*.app
- name: Unit Test
working-directory: ./source/build/warfork-qfusion/${{matrix.config.build_folder}}
run: |
set -e
for exc in ./test/*[^.dSYM]; do
$exc
done
- name: Upload warfork artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.config.name}}
path: source/build/${{matrix.config.name}}.tar.gz
windows:
strategy:
max-parallel: 1
matrix:
config:
- {
agent: "windows-2019",
name: "win-x86_64-Release",
vs_version: "Visual Studio 16 2019",
type: "release",
cmake_args: "-DBUILD_STEAMLIB=1",
build_folder: "Release",
}
- {
agent: "windows-2019",
name: "win-x86_64-Debug",
vs_version: "Visual Studio 16 2019",
type: "debug",
cmake_args: "-DBUILD_STEAMLIB=1 -DWF_BUILD_DSYM=ON",
build_folder: "Debug",
}
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.agent }}
steps:
- 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 Debug
if: matrix.config.type == 'debug'
working-directory: .\source
run: |
cmake -B ./build ${{matrix.config.cmake_args}} -G "${{matrix.config.vs_version}}" -A x64 -DBUILD_UNIT_TEST=1
cd build
msbuild qfusion.sln /p:configuration=Debug /maxcpucount:8
- name: Building Release
if: matrix.config.type == 'release'
working-directory: .\source
run: |
cmake -B ./build ${{matrix.config.cmake_args}} -G "${{matrix.config.vs_version}}" -A x64 -DBUILD_UNIT_TEST=1 -DCMAKE_BUILD_TYPE=RELEASE
cd build
msbuild qfusion.sln /p:configuration=Release /maxcpucount:8
- name: Unit Test
shell: bash
working-directory: .\source\build\warfork-qfusion\${{matrix.config.build_folder}}
run: |
set -e
for exc in ./test/*[^.pdb]; do
$exc
done
- name: Package warfork
working-directory: .\source\build\warfork-qfusion\${{matrix.config.build_folder}}
run: 7z a ..\..\${{matrix.config.name}}.zip * '-xr!*.exp' '-xr!*.lib' '-xr!test'
- name: Upload warfork artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.config.name}}
path: source\build\${{matrix.config.name}}.zip