-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (56 loc) · 1.58 KB
/
Copy pathci.yml
File metadata and controls
74 lines (56 loc) · 1.58 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
linux:
name: Linux (${{ matrix.compiler }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
env:
CC: ${{ matrix.compiler == 'gcc' && 'gcc' || 'clang' }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Compiler version
run: $CXX --version
- name: Configure
run: >-
cmake -S . -B build
-DCPP_PRINTER_BUILD_TESTS=ON
-DCPP_PRINTER_BUILD_EXAMPLES=ON
- name: Build
run: cmake --build build --parallel
- name: Test
run: ctest --test-dir build --output-on-failure
- name: Run examples
run: cmake --build build --target run_examples
windows:
name: Windows (MSVC)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1
- name: Compiler version
shell: pwsh
run: cl
- name: Configure
run: >-
cmake -S . -B build -A x64
-DCPP_PRINTER_BUILD_TESTS=ON
-DCPP_PRINTER_BUILD_EXAMPLES=ON
- name: Build
run: cmake --build build --config Release --parallel
- name: Test
run: ctest --test-dir build --build-config Release --output-on-failure
- name: Run examples
run: cmake --build build --target run_examples --config Release