-
Notifications
You must be signed in to change notification settings - Fork 6
76 lines (68 loc) · 2.29 KB
/
Copy pathubuntu-unit.yml
File metadata and controls
76 lines (68 loc) · 2.29 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
name: Ubuntu unit # adapted from: https://github.com/trase-cpp/trase/tree/master/.github/workflows
on:
push:
branches: [develop, Claude] # TODO(release): remove temporary Claude trigger
pull_request:
branches: [main]
jobs:
build-and-test:
name: Ubuntu unit ${{matrix.CC}}${{ matrix.sanitizer == true && ' (ASan+UBSan)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- CC: gcc-11
CXX: g++-11
compiler: gcc-11 g++-11
- CC: gcc-12
CXX: g++-12
compiler: gcc-12 g++-12
- CC: clang-14
CXX: clang++-14
compiler: clang-14 libomp-14-dev
- CC: clang-15
CXX: clang++-15
compiler: clang-15 libomp-15-dev
- CC: clang-16
CXX: clang++-16
compiler: clang-16 libomp-16-dev
- CC: clang-17
CXX: clang++-17
compiler: clang-17 libomp-17-dev
- CC: gcc-12
CXX: g++-12
compiler: gcc-12 g++-12
sanitizer: true
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: update
run: sudo apt update
- name: Install Clang 16 or 17
if: matrix.CC == 'clang-16' || matrix.CC == 'clang-17'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $(echo "${{ matrix.CC }}" | cut -d '-' -f 2)
- name: install compiler
run: sudo apt install ${{matrix.compiler}}
- name: make build directory
run: mkdir build_dir
- name: cmake configure
run: |
if [ "${{ matrix.sanitizer }}" = "true" ]; then
cmake .. -DCMAKE_BUILD_TYPE=Debug -DDTWC_BUILD_TESTING=ON \
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer"
else
cmake .. -DCMAKE_BUILD_TYPE=Debug -DDTWC_BUILD_TESTING=ON
fi
working-directory: build_dir
env:
CC: ${{matrix.CC}}
CXX: ${{matrix.CXX}}
- name: cmake build
run: cmake --build . --parallel 2
working-directory: build_dir
- name: cmake test
run: ctest -j2 -C Debug --output-on-failure
working-directory: build_dir