-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (36 loc) · 1.17 KB
/
test-cpp.yaml
File metadata and controls
36 lines (36 loc) · 1.17 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
name: Run C++ tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
catchpp:
strategy:
matrix:
version: [15,16,17]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 15CF4D18AF4F7421
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main'
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo apt remove clang-15 clang-14 clang-13 clang-12 llvm-15 llvm-14 llvm-13 llvm-12
sudo apt-get update
sudo apt-get install ninja-build catch2 clang-${{ matrix.version }} libclang-${{ matrix.version }}-dev libclang-cpp${{ matrix.version }}-dev
- name: Build and run tests
run: |
mkdir build
cd build
cmake .. -GNinja -DBUILD_TESTING=ON
ninja
- name: Run tests
run: |
cd build
ctest