-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (92 loc) · 2.31 KB
/
c-cpp.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
name: C/C++ CI
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
on:
push:
branches: trunk
paths:
- '**'
- '!**.md'
- '!docs/**'
- '!**.yml'
- '**/c-cpp.yml'
pull_request:
branches: trunk
paths:
- '**'
- '!**.md'
- '!docs/**'
- '!**.yml'
- '**/c-cpp.yml'
jobs:
linux:
strategy:
fail-fast: false
matrix:
cc: [gcc-9, gcc-11, clang-13, clang-14]
runs-on: ubuntu-latest
env:
CC: ${{ matrix.cc }}
steps:
- uses: actions/checkout@v4
- name: Fix kernel mmap rnd bits
# Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
# high-entropy ASLR in much newer kernels that GitHub runners are
# using leading to random crashes: https://reviews.llvm.org/D148280
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Install dependencies
run: |
sudo apt update
sudo apt remove -y \
aspnetcore-runtime \
dotnet-runtime \
dotnet-sdk \
firefox
sudo apt autoremove -y
sudo apt upgrade -y
sudo apt install -y meson ninja-build $CC
- name: Build
run: |
meson setup _build -Db_sanitize=address,undefined -Db_lundef=false
cd _build
ninja
- name: Test
run: cd _build && meson test -v
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: brew install meson
- run: |
meson setup _build -Db_sanitize=address,undefined -Db_lundef=false
cd _build
ninja
meson test -v
rmw:
runs-on: ubuntu-latest
needs:
- linux
steps:
- uses: actions/checkout@v4
with:
path: 'subprojects/canfigger'
- uses: actions/checkout@v4
with:
repository:
'theimpossibleastronaut/rmw'
- name: Install dependencies
run: |
sudo apt update
sudo apt remove -y \
aspnetcore-runtime \
dotnet-runtime \
dotnet-sdk \
firefox
sudo apt autoremove -y
sudo apt upgrade -y
sudo apt install -y meson ninja-build
- name: Configure
run: meson setup builddir -Dwithout-curses=true -Dnls=false
- name: Build and Test
run: meson test -v -C builddir