-
Notifications
You must be signed in to change notification settings - Fork 71
69 lines (58 loc) · 1.92 KB
/
test-cmake.yml
File metadata and controls
69 lines (58 loc) · 1.92 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
name: cmake
on:
workflow_call:
env:
CCACHE_DIR: ${{ github.workspace }}/.cache/ccache
SCCACHE_DIR: ${{ github.workspace }}/.cache/sccache
CCACHE_BASEDIR: ${{ github.workspace }}
SCCACHE_BASEDIRS: ${{ github.workspace }}
CCACHE_COMPILERCHECK: content
CCACHE_MAXSIZE: 2G
SCCACHE_CACHE_SIZE: 2G
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-2025, ubuntu-24.04, macos-15]
build_type: [Debug, RelWithDebInfo]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup-pixi
- name: Restore compiler cache
uses: actions/cache@v4
with:
path: ${{ runner.os == 'Windows' && '.cache/sccache' || '.cache/ccache' }}
key: ${{ runner.os }}-${{ matrix.build_type }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.build_type }}-ccache-
- name: Zero cache stats
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
pixi run -- sccache --stop-server || true
pixi run -- sccache --zero-stats || true
else
pixi run -- ccache --zero-stats || true
fi
shell: bash
- name: Build
run: pixi run build ${{ matrix.build_type }} ON
- name: Unit Test
run: pixi run unit-test ${{ matrix.build_type }}
- name: Integration Test
run: pixi run integration-test ${{ matrix.build_type }}
- name: Smoke Test
if: success() || failure()
run: pixi run smoke-test ${{ matrix.build_type }}
- name: Print cache stats and stop server
if: always()
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
pixi run -- sccache --show-stats
pixi run -- sccache --stop-server || true
else
pixi run -- ccache --show-stats
fi
shell: bash