-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (74 loc) · 2.85 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
name: C/C++ CI
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
on:
push:
branches: [ main ]
paths:
- 'meson.build'
- 'compat/**'
- 'include/**'
- 'src/**'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
- 'meson.build'
- 'compat/**'
- 'include/**'
- 'src/**'
- '.github/workflows/**'
jobs:
glibc:
runs-on: ubuntu-latest
container:
image: "fedora:latest"
steps:
- name: dependencies
run: |
sudo dnf install -y gcc gcc-c++ flex bison meson ninja-build make libedit-devel libcurl-devel libxo-devel openssl-devel
- uses: actions/checkout@v4
- name: build and check
run: |
meson setup build -Db_buildtype=debug
ninja -C build -v
meson test -C build -v
musl:
runs-on: ubuntu-latest
container:
image: "alpine:latest"
steps:
- name: dependencies
run: |
apk add curl git libtool autoconf automake make patch gcc musl-dev linux-headers g++ meson flex bison libedit-dev openssl-dev musl-fts-dev acl-dev
- name: libxo
run: |
# installed separately
apk add bsd-compat-headers
VER="$(git ls-remote --tag https://github.com/Juniper/libxo | grep -E "\/[0-9\.]+$" | rev | cut -d '/' -f 1 | rev | sort -n | tail -n 1)"
curl -k -f -L -O https://github.com/Juniper/libxo/releases/download/${VER}/libxo-${VER}.tar.gz
tar -xf libxo-${VER}.tar.gz
cd libxo-${VER}
# remove this once it's merged and a new release includes it
curl -k -f -L -O https://github.com/Juniper/libxo/pull/82.patch
[ -f 82.patch ] && patch -p1 < 82.patch
./configure --prefix=/usr/local
make V=1
make V=1 install
# make sure it does not interfere with bsdutils
apk del bsd-compat-headers
- name: rpmatch for musl
run: |
git clone https://github.com/pullmoll/musl-rpmatch
cd musl-rpmatch
./bootstrap.sh
./configure --prefix=/usr/local
make
make install
- uses: actions/checkout@v4
- name: build and check
run: |
meson setup build --werror -Db_buildtype=debug -Drpmatch_path=/usr/local/lib
ninja -C build -v
meson test -C build -v