Initial setup for C# bindings, hosting them in C++ and invoking them #434
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: windows | |
on: [push] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ !(startsWith(github.ref, 'release/') || github.ref == 'develop')}} | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [windows] | |
graphics: [vulkan, all] | |
arch: [x86, x86_64] | |
include: | |
- benchmarks: OFF | |
- graphics: all | |
benchmarks: ON | |
- arch: x86 | |
bitconfig: 32 | |
- arch: x86_64 | |
bitconfig: 64 | |
name: build | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- uses: SimenB/github-actions-cpu-cores@v1 | |
id: cpu-cores | |
- name: setup dependencies | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- name: initialize | |
run: | | |
python3 tools/generate_project_info.py | |
# todo: DCMAKE_CXX_FLAGS here is a workaround for an issue in the CI runner, which should be rechecked in a couple of weeks or so. | |
# see https://github.com/actions/runner-images/issues/10004 | |
cmake --preset=windows-${{ matrix.bitconfig }}-release-${{ matrix.graphics }} -DPE_BENCHMARKS=${{ matrix.benchmarks }} -DCMAKE_CXX_FLAGS="/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" | |
python3 tools/patch.py --project ./project_files/${{ matrix.arch }}/ | |
- name: compile | |
run: cmake --build --preset=windows-${{ matrix.bitconfig }}-release-${{ matrix.graphics }} -j ${{ steps.cpu-cores.outputs.count }} | |
- name: test | |
run: | | |
cd builds/windows/${{ matrix.arch }}/release/bin | |
.\tests.exe --formatter compact --no-source | |
- name: finalize | |
if: ${{ matrix.benchmarks == 'ON' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-${{ matrix.graphics }}-bin | |
path: builds/windows/${{ matrix.arch }}/release/bin/benchmarks.exe | |
if-no-files-found: error | |
retention-days: 1 | |
benchmark: | |
strategy: | |
fail-fast: false | |
matrix: | |
graphics: [ all ] | |
name: benchmark | |
needs: build | |
runs-on: windows-2022 | |
steps: | |
- name: setup | |
id: download | |
uses: actions/download-artifact@v3 | |
with: | |
name: windows-${{ matrix.graphics }}-bin | |
- name: benchmark | |
run: .\benchmarks.exe --benchmark_out_format=json --benchmark_out=results.json | |
- name: finalize | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-${{ matrix.graphics }} | |
path: results.json | |
if-no-files-found: error |