-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.23 KB
/
ci.yml
File metadata and controls
46 lines (38 loc) · 1.23 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
name: CI
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
test:
name: Test (${{ matrix.os }}, ${{ matrix.build_type }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPTK_BUILD_TESTS=ON
- name: Build
run: cmake --build build --config ${{ matrix.build_type }}
- name: Run Tests
working-directory: build
run: ctest --output-on-failure -C ${{ matrix.build_type }}
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.os }}-${{ matrix.build_type }}
path: build/Testing/
- name: Upload Build Artifacts (for release)
if: github.event_name == 'pull_request' && github.base_ref == 'release'
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}-${{ matrix.build_type }}
path: |
build/lib/libprotocol_toolkit.a
build/include/protocol_toolkit.h