-
Notifications
You must be signed in to change notification settings - Fork 73
140 lines (135 loc) · 4.03 KB
/
main.yml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: CI
on:
pull_request:
push:
jobs:
meson-build-and-tests:
runs-on: ${{ matrix.platform }}
name: ${{ matrix.platform }}, ${{ matrix.mode.name }} ${{ matrix.flavor }}
strategy:
fail-fast: false
matrix:
flavor:
- debug
- release
mode:
- name: default
args: -Dtests=enabled
extra_envs:
CC: gcc
CXX: g++
- name: sanitize
args: >-
"-Db_sanitize=address,undefined"
extra_envs:
CC: gcc
CXX: g++
# For Visual Studio
- name: sanitize+asanonly
args: -Db_sanitize=address
extra_envs:
ASAN_OPTIONS: report_globals=0:halt_on_error=1:abort_on_error=1:print_summary=1
- name: clang+sanitize
args: >-
"-Db_sanitize=address,undefined"
extra_envs:
CC: clang
CXX: clang++
#- name: clang-cl+sanitize
# args: >-
# "-Db_sanitize=address,undefined"
# extra_envs:
# CC: clang-cl
# CXX: clang-cl
#- name: clang+msan
# args: -Db_sanitize=memory
# extra_envs:
# CC: clang
# CXX: clang++
#- name: clang-cl+msan
# args: -Db_sanitize=memory
# extra_envs:
# CC: clang-cl
# CXX: clang-cl
platform:
- ubuntu-22.04
- windows-2022
#- macos-latest
exclude:
# clang-cl
- platform: ubuntu-22.04
mode:
name: clang-cl+sanitize
- platform: macos-latest
mode:
name: clang-cl+sanitize
- platform: windows-2022
mode:
name: clang+sanitize
- platform: windows-2022
mode:
name: sanitize+asanonly
flavor: release
- platform: ubuntu-22.04
mode:
name: clang-cl+msan
- platform: macos-latest
mode:
name: clang-cl+msan
- platform: windows-2022
mode:
name: clang+msan
# msvc
- platform: ubuntu-22.04
mode:
name: sanitize+asanonly
- platform: macos-latest
mode:
name: sanitize+asanonly
- platform: windows-2022
mode:
name: sanitize
# default is clang
- platform: macos-latest
mode:
name: clang+sanitize
# msan unsupported
- platform: macos-latest
mode:
name: clang+msan
- platform: macos-latest
mode:
name: sanitize
flavor: release
- platform: macos-latest
mode:
name: clang+msan
flavor: release
steps:
- name: Setup meson
run: |
pipx install meson ninja
- name: Checkout
uses: actions/checkout@v4
- name: Activate MSVC and Configure
if: ${{ matrix.platform == 'windows-2022' }}
env: ${{ matrix.mode.extra_envs }}
run: |
meson setup build-${{ matrix.flavor }} --buildtype=${{ matrix.flavor }} ${{ matrix.mode.args }} --vsenv
- name: Configuring
if: ${{ matrix.platform != 'windows-2022' }}
env: ${{ matrix.mode.extra_envs }}
run: |
meson setup build-${{ matrix.flavor }} --buildtype=${{ matrix.flavor }} ${{ matrix.mode.args }}
- name: Building
run: |
meson compile -C build-${{ matrix.flavor }}
- name: Running tests
env: ${{ matrix.mode.extra_envs }}
run: |
meson test -C build-${{ matrix.flavor }} --timeout-multiplier 5
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.platform }}-${{ matrix.mode.name }}-${{ matrix.flavor }}-logs
path: build-${{ matrix.flavor }}/meson-logs