-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (52 loc) · 2.08 KB
/
Copy pathbvt-compatibility.yml
File metadata and controls
58 lines (52 loc) · 2.08 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
on:
workflow_call:
workflow_dispatch:
jobs:
bvt-compatibility:
name: ${{ matrix.compiler.family }}-${{ matrix.compiler.version }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
compiler:
- {family: gcc, version: 13, modules: false, doc_tests: true}
- {family: gcc, version: 14, modules: true, doc_tests: true}
- {family: clang, version: 16, modules: false, doc_tests: false}
- {family: clang, version: 17, modules: false, doc_tests: true}
- {family: clang, version: 18, modules: false, doc_tests: true}
- {family: clang, version: 19, modules: false, doc_tests: true}
- {family: clang, version: 20, modules: true, doc_tests: true}
- {family: clang, version: 21, modules: true, doc_tests: true}
steps:
- uses: actions/checkout@v4
- name: Install gcc
if: ${{ matrix.compiler.family == 'gcc' }}
run: |
sudo apt install -y 'g++-${{ matrix.compiler.version }}'
cat <<'EOF' >> "$GITHUB_ENV"
CC=gcc-${{ matrix.compiler.version }}
CXX=g++-${{ matrix.compiler.version }}
EOF
- name: Install clang
if: ${{ matrix.compiler.family == 'clang' }}
run: |
version='${{ matrix.compiler.version }}'
if [ "$version" -ge 21 ]; then
curl https://apt.llvm.org/llvm.sh | sudo bash -s -- "$version"
fi
sudo apt install -y "clang-$version" "clang-tools-$version" "libc++-$version-dev" "libc++abi-$version-dev"
cat <<'EOF' >> "$GITHUB_ENV"
CC=clang-${{ matrix.compiler.version }}
CXX=clang++-${{ matrix.compiler.version }}
CXXFLAGS=-stdlib=libc++
EOF
- name: Check toolchain versions
run: |
"$CXX" --version
cmake --version
ninja --version
- name: Build and run test with cmake
run: |
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release '-DPROXY_BUILD_MODULES=${{ matrix.compiler.modules }}' '-DBUILD_DOC_TESTING=${{ matrix.compiler.doc_tests }}'
cmake --build build -j
ctest --test-dir build -j