Repository navigation
49 lines (46 loc) · 1.6 KB
/
Copy pathcpp.yml
File metadata and controls
49 lines (46 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: C++ build and tests
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: ${{ matrix.os }} / GUI ${{ matrix.gui }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest]
gui: ['OFF', 'ON']
env:
PYTHONUTF8: '1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Configure
run: cmake -S cpp -B cpp/build -DARCH00_BUILD_GUI=${{ matrix.gui }} -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build cpp/build --config Release --parallel 2
- name: Test
run: ctest --test-dir cpp/build -C Release --output-on-failure
- name: Report test failures
if: failure()
run: python cpp/scripts/report_test_failures.py
- name: Package Linux x86-64
if: matrix.gui == 'ON' && runner.os == 'Linux'
run: python cpp/scripts/package.py --build cpp/build --platform linux --output packages/fear-arch00-tool-ci-linux-x86_64.zip
- name: Package Windows x86-64
if: matrix.gui == 'ON' && runner.os == 'Windows'
run: python cpp/scripts/package.py --build cpp/build --platform windows --output packages/fear-arch00-tool-ci-windows-x86_64.zip
- name: Upload tested package
if: matrix.gui == 'ON'
uses: actions/upload-artifact@v4
with:
name: package-${{ runner.os }}-x86_64
path: packages/*.zip
if-no-files-found: error
retention-days: 7