-
-
Notifications
You must be signed in to change notification settings - Fork 13
87 lines (68 loc) · 1.96 KB
/
ci.yaml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on: [pull_request, push]
permissions:
actions: write
security-events: write
jobs:
CI:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
cpp_std: [c++14, c++20]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: Chocobo1/setup-ccache-action@v1
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: install tools
run: pip install meson ninja
- name: run tests
run: |
cd "tests"
meson setup "_build" -Dcpp_std="${{ matrix.cpp_std }}"
meson test -C "_build" -v --test-args "-d yes"
- name: initialize CodeQL
uses: github/codeql-action/init@v3
if: startsWith(matrix.os, 'ubuntu') && (matrix.cpp_std == 'c++20')
with:
languages: cpp
config-file: ./.github/workflows/codeql/cpp.yaml
- name: build sample program
run: |
cd "src/program"
meson setup "_build" -Dcpp_std="${{ matrix.cpp_std }}"
meson compile -C "_build"
- name: perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
if: startsWith(matrix.os, 'ubuntu') && (matrix.cpp_std == 'c++20')
CI_Windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
cpp_std: [c++14, c++latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: install tools
run: pip install meson ninja
- uses: ilammy/msvc-dev-cmd@v1
- name: run tests
run: |
cd "tests"
meson setup "_build" -Dcpp_std="${{ matrix.cpp_std }}" -Db_sanitize=none
meson test -C "_build" -v --test-args "-d yes"
- name: build sample program
run: |
cd "src/program"
meson setup "_build" -Dcpp_std="${{ matrix.cpp_std }}"
meson compile -C "_build"