Skip to content

Commit 461227c

Browse files
committed
wip
1 parent 67120f7 commit 461227c

File tree

1 file changed

+90
-36
lines changed

1 file changed

+90
-36
lines changed

.github/workflows/unit_tests.yml

Lines changed: 90 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ concurrency:
2222
cancel-in-progress: true
2323

2424
jobs:
25-
build_and_test:
26-
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
25+
build_and_test_24:
26+
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
2727
strategy:
2828
fail-fast: false
2929
matrix:
3030
compiler: [clang, gcc]
31-
version: [12, 13, 14, 15, 16, 17, 18]
31+
version: [12, 13, 16, 17, 18]
3232
cxx_standard: [17, 20]
3333
stdlib: [libstdc++, libc++]
3434
build_type: [Debug]
@@ -39,60 +39,42 @@ jobs:
3939
cxx_flags: "-stdlib=libstdc++"
4040
- version: 18
4141
compiler: clang
42-
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 18
42+
install: sudo apt update && sudo apt install -y clang-18
4343
toolchain_root: "/usr/lib/llvm-18"
4444
- version: 18
4545
compiler: clang
4646
stdlib: libc++
47-
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 18 && sudo apt install -y libc++-18-dev libc++abi-18-dev
47+
install: sudo apt update && sudo apt install -y clang-18 libc++-18-dev libc++abi-18-dev
4848
cxx_flags: "-stdlib=libc++"
4949
- version: 17
5050
compiler: clang
51-
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 17
51+
install: sudo apt update && sudo apt install -y clang-17
5252
toolchain_root: "/usr/lib/llvm-17"
5353
- version: 17
5454
compiler: clang
5555
stdlib: libc++
56-
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 17 && sudo apt install -y libc++-17-dev libc++abi-17-dev
56+
install: sudo apt update && sudo apt install -y clang-17 libc++-17-dev libc++abi-17-dev
5757
cxx_flags: "-stdlib=libc++"
5858
- version: 16
5959
compiler: clang
60-
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16
60+
install: sudo apt update && sudo apt install -y clang-16
6161
toolchain_root: "/usr/lib/llvm-16"
6262
- version: 16
6363
compiler: clang
6464
stdlib: libc++
65-
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16 && sudo apt install -y libc++-16-dev libc++abi-16-dev
66-
cxx_flags: "-stdlib=libc++"
67-
- version: 15
68-
compiler: clang
69-
install: sudo apt update && sudo apt install -y clang-15
70-
toolchain_root: "/usr/lib/llvm-15"
71-
- version: 15
72-
compiler: clang
73-
stdlib: libc++
74-
install: sudo apt update && sudo apt install -y clang-15 libc++-15-dev libc++abi-15-dev
75-
cxx_flags: "-stdlib=libc++"
76-
- version: 14
77-
compiler: clang
78-
install: sudo apt update && sudo apt install -y clang-14
79-
toolchain_root: "/usr/lib/llvm-14"
80-
- version: 14
81-
compiler: clang
82-
stdlib: libc++
83-
install: sudo apt update && sudo apt install -y clang-14 libc++-14-dev libc++abi-14-dev
65+
install: sudo apt update && sudo apt install -y clang-16 libc++-16-dev libc++abi-16-dev
8466
cxx_flags: "-stdlib=libc++"
8567
- compiler: gcc
8668
toolchain_root: "/usr"
8769
cxx_flags: ""
8870
- version: 13
8971
compiler: gcc
90-
install: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt-get install -y gcc-13 g++-13
72+
install: sudo apt update && sudo apt install -y gcc-13 g++-13
9173
cc: "gcc-13"
9274
cxx: "g++-13"
9375
- version: 12
9476
compiler: gcc
95-
install: sudo apt update && sudo apt install -y gcc-12
77+
install: sudo apt update && sudo apt install -y gcc-12 g++-12
9678
cc: "gcc-12"
9779
cxx: "g++-12"
9880
cxx_flags: ""
@@ -103,13 +85,6 @@ jobs:
10385
version: 17
10486
- compiler: gcc
10587
version: 16
106-
- compiler: gcc
107-
version: 15
108-
- compiler: gcc
109-
version: 14
110-
- compiler: clang
111-
version: 14
112-
stdlib: libstdc++
11388
- compiler: clang
11489
version: 13
11590
- compiler: clang
@@ -158,6 +133,85 @@ jobs:
158133
working-directory: ${{github.workspace}}/build
159134
run: ctest --output-on-failure -j $(nproc) -C ${{matrix.build_type}}
160135

136+
build_and_test_22:
137+
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
138+
strategy:
139+
fail-fast: false
140+
matrix:
141+
compiler: [clang]
142+
version: [14, 15]
143+
cxx_standard: [17, 20]
144+
stdlib: [libstdc++, libc++]
145+
build_type: [Debug]
146+
include:
147+
- compiler: clang
148+
cc: "clang"
149+
cxx: "clang++"
150+
cxx_flags: "-stdlib=libstdc++"
151+
- version: 15
152+
compiler: clang
153+
install: sudo apt update && sudo apt install -y clang-15
154+
toolchain_root: "/usr/lib/llvm-15"
155+
- version: 15
156+
compiler: clang
157+
stdlib: libc++
158+
install: sudo apt update && sudo apt install -y clang-15 libc++-15-dev libc++abi-15-dev
159+
cxx_flags: "-stdlib=libc++"
160+
- version: 14
161+
compiler: clang
162+
install: sudo apt update && sudo apt install -y clang-14
163+
toolchain_root: "/usr/lib/llvm-14"
164+
- version: 14
165+
compiler: clang
166+
stdlib: libc++
167+
install: sudo apt update && sudo apt install -y clang-14 libc++-14-dev libc++abi-14-dev
168+
cxx_flags: "-stdlib=libc++"
169+
exclude:
170+
- compiler: clang
171+
version: 14
172+
stdlib: libstdc++
173+
174+
steps:
175+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
176+
177+
- name: Install build tools
178+
run: |
179+
${{ matrix.install }}
180+
sudo apt install -y ninja-build
181+
182+
- name: Restore CPM cache
183+
env:
184+
cache-name: cpm-cache-0
185+
id: cpm-cache-restore
186+
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
187+
with:
188+
path: ~/cpm-cache
189+
key: ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
190+
restore-keys: |
191+
${{runner.os}}-${{env.cache-name}}-
192+
193+
- name: Configure CMake
194+
env:
195+
CC: ${{matrix.toolchain_root}}/bin/${{matrix.cc}}
196+
CXX: ${{matrix.toolchain_root}}/bin/${{matrix.cxx}}
197+
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -DCMAKE_CXX_FLAGS_INIT=${{matrix.cxx_flags}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCPM_SOURCE_CACHE=~/cpm-cache
198+
199+
- name: Save CPM cache
200+
env:
201+
cache-name: cpm-cache-0
202+
if: steps.cpm-cache-restore.outputs.cache-hit != 'true'
203+
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
204+
with:
205+
path: ~/cpm-cache
206+
key: ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
207+
208+
- name: Build Unit Tests
209+
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -v -t build_unit_tests
210+
211+
- name: Test
212+
working-directory: ${{github.workspace}}/build
213+
run: ctest --output-on-failure -j $(nproc) -C ${{matrix.build_type}}
214+
161215
quality_checks_pass:
162216
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
163217
steps:

0 commit comments

Comments
 (0)