This repository was archived by the owner on Apr 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
80 lines (65 loc) · 1.97 KB
/
Copy pathcpp.yml
File metadata and controls
80 lines (65 loc) · 1.97 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
name: C++ CI
on:
pull_request
jobs:
formatting-check:
name: Formatting check
runs-on: [self-hosted, ubuntu]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check line breaks
run: |
ci-extra/check-lines.sh
- name: Run clang-format style check
# TODO use native clang-format
uses: jidicula/clang-format-action@v4.14.0
with:
clang-format-version: '19'
check-path: '.'
test:
needs: formatting-check
name: "Test (${{ matrix.toolchain.os }}/${{ matrix.toolchain.compiler-id }}, ${{ matrix.build-type }})"
strategy:
fail-fast: false
matrix:
toolchain:
- { os: Linux, compiler-id: GCC, runner-label: gcc-14 }
- { os: Linux, compiler-id: Clang, runner-label: clang-19 }
build-type:
- Release
- Debug
- RelWithDebInfo
- Sanitized
- SanitizedDebug
runs-on: [self-hosted, ubuntu, base, "${{ matrix.toolchain.runner-label }}"]
env:
CT_CMAKE_PRESET: "Default-${{ matrix.build-type }}"
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment variables
uses: cardinalby/export-env-action@v2
with:
envFile: .github/constants.env
- name: Update tests
run: |
ci-extra/update-tests.sh
- name: Build
run: |
ci-extra/build.sh "$CT_CMAKE_PRESET"
- name: Run tests
run: |
if [[ $TESTS_UPDATED -eq 1 ]]; then
echo -e '\e[0;33mWARNING: Running a newer version of the tests than you have pushed.\e[0m'
fi
ci-extra/test.sh "$CT_CMAKE_PRESET"
- name: Run tests with valgrind
if: ${{ matrix.build-type == 'RelWithDebInfo' }}
run: |
ci-extra/test-valgrind.sh "$CT_CMAKE_PRESET"