-
Notifications
You must be signed in to change notification settings - Fork 1.6k
117 lines (105 loc) · 3.38 KB
/
tests.yaml
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Test
permissions:
contents: read
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: "Tests (${{ matrix.compiler }}, C++${{ matrix.standard}}, ${{ matrix.mode }}, ${{ matrix.enables }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# only the compilers supported by setup-cpp
compiler: [clang++-18, gcc-13]
standard: [20, 23]
mode: [dev, debug, release]
include:
- compiler: clang++-18
standard: 20
mode: dev
- compiler: clang++-18
standard: 20
mode: debug
- compiler: clang++-18
standard: 20
mode: release
- compiler: clang++-18
standard: 23
mode: dev
- compiler: clang++-18
standard: 23
mode: debug
- compiler: clang++-18
standard: 23
mode: release
- compiler: gcc-13
standard: 20
mode: dev
- compiler: gcc-13
standard: 20
mode: debug
- compiler: gcc-13
standard: 20
mode: release
- compiler: gcc-13
standard: 23
mode: dev
- compiler: gcc-13
standard: 23
mode: debug
- compiler: gcc-13
standard: 23
mode: release
- compiler: clang++-18
standard: 23
mode: release
cooks: --cook dpdk
enables: --enable-dpdk
- compiler: clang++-18
standard: 23
mode: debug
enables: --enable-cxx-modules
steps:
- uses: actions/checkout@v4
with:
submodules: "${{ contains(matrix.cooks, 'dpdk') }}"
- name: Install build dependencies
run: |
sudo ./install-dependencies.sh
- name: Install ${{ matrix.compiler }}
uses: aminya/setup-cpp@master
with:
compiler: ${{ matrix.compiler }}
ccache: true
# ubuntu:latest comes with CMake 3.29, so we just need to install
# ninja. see
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#tools
ninja: "${{ contains(matrix.enables, 'cxx-modules') }}"
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.compiler }}-${{ matrix.standard }}-${{ matrix.mode }}
- name: Configure
run: >
./configure.py
--ccache
--c++-standard ${{ matrix.standard }}
--compiler $CXX
--c-compiler $CC
--mode ${{ matrix.mode }}
${{ matrix.cooks }}
${{ matrix.enables }} ;
- name: Build
run: cmake --build build/${{matrix.mode}}
- name: Check Header
if: ${{ matrix.mode == 'dev' && matrix.compiler == 'clang++-18' }}
run: cmake --build build/${{ matrix.mode }} --target checkheaders
- name: Build with C++20 modules
if: ${{ contains(matrix.enables, 'cxx-modules') }}
run: cmake --build build/${{ matrix.mode }} --target hello_cxx_module
- name: Test
if: ${{ ! contains(matrix.enables, 'cxx-modules') }}
run: ./test.py --mode=${{ matrix.mode }}