-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (46 loc) · 1.72 KB
/
build.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
name: Build and run tests
on:
push:
branches:
- master
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: ${{ matrix.distro.image }}
env:
LDFLAGS: ${{ matrix.link-n-sane.ldflags }}
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
strategy:
matrix:
distro:
- { image: "debian:testing", update_cmd: "apt update", install_cmd: "apt install -y" }
- { image: "alpine:3.20", update_cmd: "true", install_cmd: "apk add --no-cache", packages: "g++ musl-dev" }
- { image: "alpine:edge", update_cmd: "true", install_cmd: "apk add --no-cache", packages: "g++ musl-dev" }
compiler:
- { cc: gcc, cxx: g++ }
- { cc: clang, cxx: clang++ }
link-n-sane:
- { ldflags: "", sanitizer: "none" }
- { ldflags: "-static", sanitizer: "none" }
- { sanitizer: "address,undefined" }
- { sanitizer: "thread" }
- { sanitizer: "memory" }
- { sanitizer: "leak" }
options:
- { pcie_opt: "true" }
- { pcie_opt: "false" }
steps:
- name: Install dependencies
run: ${{ matrix.distro.update_cmd }} && ${{ matrix.distro.install_cmd }} git meson ${{ matrix.distro.packages }} ${{ matrix.compiler.cc }}
- uses: actions/checkout@v4
with:
submodules: true
- name: Configure
run: meson setup --buildtype release --werror -Dpcie_opt=${{ matrix.options.pcie_opt }} -Db_sanitize=${{ matrix.link-n-sane.sanitizer }} build || cat build/meson-logs/meson-log.txt /nonexistent
- name: Build
run: ninja -C build
- name: Run tests
run: ninja -C build test