-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (30 loc) · 870 Bytes
/
Copy pathtestLibrary.yml
File metadata and controls
32 lines (30 loc) · 870 Bytes
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
name: test library
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
linux-test:
runs-on: ubuntu-latest
strategy:
matrix:
cxx: [g++, clang++]
cxx_standard: ['14', '17', '20']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install toolchain
run: sudo apt-get update && sudo apt-get install -y g++ clang cmake ninja-build
- name: Configure (CMake + gtest 1.16.0)
run: |
cmake -S library -B library/build \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} \
-DCMAKE_CXX_STANDARD_REQUIRED=ON
- name: Build
run: cmake --build library/build
- name: Test
run: ctest --test-dir library/build --output-on-failure --repeat until-fail:20