-
Notifications
You must be signed in to change notification settings - Fork 4
98 lines (94 loc) · 3.65 KB
/
default.yml
File metadata and controls
98 lines (94 loc) · 3.65 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: default
on:
push:
branches: [ main, devel ]
pull_request:
branches: [ main, devel ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04 ]
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Dependencies
run: |
sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev \
libglfw3-dev libcairo2-dev libopencv-dev libglm-dev libncurses-dev \
valgrind libbenchmark-dev lcov
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake (Ubuntu 20.04)
if: ${{ matrix.os == 'ubuntu-20.04' }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_AUTO_LAYOUT=OFF -DBUILD_TESTING=ON
- name: Configure CMake (Ubuntu 22.04 or 24.04)
if: ${{ matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04' }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_TESTING=ON
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE && cpack
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
# Run tests with verbose output and XML reporting
export VALGRIND_OPTS="--suppressions=$GITHUB_WORKSPACE/tests/valgrind.supp"
ctest -C $BUILD_TYPE --verbose --output-on-failure --output-junit test_results.xml
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.os }}
path: ${{runner.workspace}}/build/test_results.xml
minimal-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04 ]
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Dependencies
run: |
sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev \
libglfw3-dev libglm-dev libcairo2-dev valgrind
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake (Ubuntu 20.04)
if: ${{ matrix.os == 'ubuntu-20.04' }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_AUTO_LAYOUT=OFF -DBUILD_TESTING=ON
- name: Configure CMake (Ubuntu 22.04 or 24.04)
if: ${{ matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04' }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_TESTING=ON
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE && cpack
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
# Run tests with verbose output and XML reporting
export VALGRIND_OPTS="--suppressions=$GITHUB_WORKSPACE/tests/valgrind.supp"
ctest -C $BUILD_TYPE --verbose --output-on-failure --output-junit test_results_minimal.xml
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-minimal-${{ matrix.os }}
path: ${{runner.workspace}}/build/test_results_minimal.xml