-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 838 Bytes
/
cpp-ci.yml
File metadata and controls
38 lines (32 loc) · 838 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
33
34
35
36
37
38
name: C++ CI
on:
pull_request:
branches: [ "main", "dev", "ci" ]
push:
branches: ["ci"]
jobs:
build:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
build_type: [ Release ]
compiler: [ { c: gcc, cxx: g++ }, { c: clang, cxx: clang++ }]
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Configure Project
uses: threeal/cmake-action@v1.3.0
with:
generator: Ninja
c-compiler: ${{ matrix.compiler.c }}
cxx-compiler: ${{ matrix.compiler.cxx }}
options:
CMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build Targets
run: |
cmake --build build --target all -j 3
- name: Run Tests
run: |
cd build
ctest --extra-verbose