Skip to content

Commit c660897

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

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/abidiff.yaml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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:stable
17+
18+
steps:
19+
- name: Install dependencies
20+
run: apt -y install --no-install-recommends
21+
abigail-tools
22+
g++
23+
git
24+
libbrotli-dev
25+
libssl-dev
26+
meson
27+
pkg-config
28+
python3
29+
zlib1g-dev
30+
31+
- uses: actions/checkout@v4
32+
with:
33+
path: current
34+
35+
- uses: actions/checkout@v4
36+
with:
37+
path: previous
38+
fetch-depth: 2
39+
40+
- name: Checkout previous
41+
working-directory: previous
42+
run: git checkout HEAD^
43+
44+
- name: Build current
45+
working-directory: current
46+
run: |
47+
meson setup --buildtype=debug -Dcpp-httplib_compile=true build
48+
ninja -C build
49+
50+
- name: Build previous
51+
working-directory: previous
52+
run: |
53+
meson setup --buildtype=debug -Dcpp-httplib_compile=true build
54+
ninja -C build
55+
56+
- name: Run abidiff
57+
run: abidiff
58+
--headers-dir1 previous/build
59+
--headers-dir2 current/build
60+
previous/build/libcpp-httplib.so
61+
current/build/libcpp-httplib.so

0 commit comments

Comments
 (0)