Skip to content

Commit 4d185a8

Browse files
nehebrandy408
authored andcommitted
add meson CI
Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent dc944de commit 4d185a8

File tree

1 file changed

+147
-0
lines changed

1 file changed

+147
-0
lines changed

.github/workflows/on_PR_meson.yaml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: On PRs - meson
2+
3+
on: pull_request
4+
5+
concurrency:
6+
group: ${{github.workflow}}-${{github.head_ref}}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
Ubuntu:
11+
runs-on: ubuntu-20.04
12+
name: Linux-GCC${{matrix.cxx}}
13+
strategy:
14+
matrix:
15+
cxx: ['7', '10']
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Install packages
20+
run: |
21+
sudo apt install -y gcc-${{matrix.cxx}} g++-${{matrix.cxx}}
22+
python3 -m pip install meson ninja
23+
24+
- name: Compile and Test
25+
env:
26+
CC: gcc-${{matrix.cxx}}
27+
CXX: g++-${{matrix.cxx}}
28+
run: |
29+
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Ddev_build=true
30+
meson compile -C "${{github.workspace}}/build" --verbose
31+
meson test -C "${{github.workspace}}/build" --verbose
32+
Ubuntu-clang:
33+
runs-on: ubuntu-20.04
34+
name: Linux-Clang${{matrix.cxx}}
35+
strategy:
36+
matrix:
37+
cxx: ['7', '12']
38+
steps:
39+
- uses: actions/checkout@v3
40+
41+
- name: Install packages
42+
run: |
43+
sudo apt install -y clang-${{matrix.cxx}} libc++abi-${{matrix.cxx}}-dev libc++-${{matrix.cxx}}-dev lld-${{matrix.cxx}}
44+
python3 -m pip install meson ninja
45+
46+
- name: Compile and Test
47+
env:
48+
CC: clang-${{matrix.cxx}}
49+
CXX: clang++-${{matrix.cxx}}
50+
CXXFLAGS: -stdlib=libc++
51+
CC_LD: lld-${{matrix.cxx}}
52+
CXX_LD: lld-${{matrix.cxx}}
53+
run: |
54+
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 -Ddev_build=true
55+
meson compile -C "${{github.workspace}}/build" --verbose
56+
meson test -C "${{github.workspace}}/build" --verbose
57+
VisualStudio:
58+
runs-on: windows-latest
59+
name: MSVC-${{matrix.cxx}}
60+
strategy:
61+
matrix:
62+
cxx: ['cl', 'clang-cl']
63+
steps:
64+
- uses: actions/checkout@v3
65+
66+
- name: Install packages
67+
run: |
68+
python -m pip install meson ninja
69+
70+
- uses: ilammy/msvc-dev-cmd@v1
71+
72+
- name: Compile and Test
73+
env:
74+
CC: ${{matrix.cxx}}
75+
CXX: ${{matrix.cxx}}
76+
run: |
77+
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++latest -Ddev_build=true
78+
meson compile -C "${{github.workspace}}/build" --verbose
79+
meson test -C "${{github.workspace}}/build" --verbose
80+
MSYS2:
81+
runs-on: windows-latest
82+
name: MSYS2-${{matrix.platform}}
83+
strategy:
84+
matrix:
85+
platform: ['MINGW32', 'MINGW64', 'UCRT64', 'CLANG32', 'CLANG64']
86+
steps:
87+
- uses: actions/checkout@v3
88+
89+
- uses: msys2/setup-msys2@v2
90+
with:
91+
msystem: ${{matrix.platform}}
92+
pacboy: >-
93+
cc:p
94+
libpng:p
95+
meson:p
96+
ninja:p
97+
pkgconf:p
98+
99+
- name: Compile and Test
100+
shell: msys2 {0}
101+
run: |
102+
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 -Ddev_build=true
103+
meson compile -C "${{github.workspace}}/build" --verbose
104+
meson test -C "${{github.workspace}}/build" --verbose
105+
MacOS:
106+
runs-on: macos-latest
107+
name: macOS
108+
steps:
109+
- uses: actions/checkout@v3
110+
111+
- name: Install packages
112+
run: |
113+
python3 -m pip install meson ninja
114+
115+
- name: Compile and Test
116+
run: |
117+
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 -Ddev_build=true
118+
meson compile -C "${{github.workspace}}/build" --verbose
119+
meson test -C "${{github.workspace}}/build" --verbose
120+
FreeBSD:
121+
runs-on: macos-latest
122+
name: FreeBSD
123+
steps:
124+
- uses: actions/checkout@v3
125+
- name: FreeBSD
126+
uses: vmactions/freebsd-vm@v0
127+
with:
128+
prepare: |
129+
pkg install -y ninja meson pkgconf
130+
run: |
131+
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 -Ddev_build=true
132+
meson compile -C "${{github.workspace}}/build" --verbose
133+
meson test -C "${{github.workspace}}/build" --verbose
134+
OpenBSD:
135+
runs-on: macos-latest
136+
name: OpenBSD
137+
steps:
138+
- uses: actions/checkout@v3
139+
- name: OpenBSD
140+
uses: vmactions/openbsd-vm@v0
141+
with:
142+
prepare: |
143+
pkg_add libpng ninja meson pkgconf
144+
run: |
145+
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 -Ddev_build=true
146+
meson compile -C "${{github.workspace}}/build" --verbose
147+
meson test -C "${{github.workspace}}/build" --verbose

0 commit comments

Comments
 (0)