Skip to content

Commit a42622f

Browse files
committed
ci: add abidiff workflow
This CI workflow checks ABI compatibility between the pushed commit and the latest tagged release, helping preventing accidental ABI breaks. Helps with yhirose#2043
1 parent b6ab843 commit a42622f

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/abidiff.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-FileCopyrightText: 2025 Andrea Pappacoda <[email protected]>
2+
# SPDX-License-Identifier: MIT
3+
4+
name: abidiff
5+
6+
on: [push, pull_request]
7+
8+
defaults:
9+
run:
10+
shell: sh
11+
12+
jobs:
13+
abi:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: debian:testing
17+
18+
steps:
19+
- name: Install dependencies
20+
run: apt -y --update install --no-install-recommends
21+
abigail-tools
22+
ca-certificates
23+
g++
24+
git
25+
libbrotli-dev
26+
libssl-dev
27+
meson
28+
pkg-config
29+
python3
30+
zlib1g-dev
31+
32+
- uses: actions/checkout@v4
33+
with:
34+
path: current
35+
36+
- uses: actions/checkout@v4
37+
with:
38+
path: previous
39+
fetch-depth: 0
40+
41+
- name: Checkout previous
42+
working-directory: previous
43+
run: |
44+
git switch master
45+
git describe --tags --abbrev=0 master | xargs git checkout
46+
47+
- name: Build current
48+
working-directory: current
49+
run: |
50+
meson setup --buildtype=debug -Dcpp-httplib_compile=true build
51+
ninja -C build
52+
53+
- name: Build previous
54+
working-directory: previous
55+
run: |
56+
meson setup --buildtype=debug -Dcpp-httplib_compile=true build
57+
ninja -C build
58+
59+
- name: Run abidiff
60+
run: abidiff
61+
--headers-dir1 previous/build
62+
--headers-dir2 current/build
63+
previous/build/libcpp-httplib.so
64+
current/build/libcpp-httplib.so

0 commit comments

Comments
 (0)