Skip to content

Commit

Permalink
ci: add abidiff workflow
Browse files Browse the repository at this point in the history
This CI workflow checks ABI compatibility between the pushed commit and
the previous, helping preventing accidental ABI breaks.

Helps with #2043
  • Loading branch information
Tachi107 committed Feb 14, 2025
1 parent b6ab843 commit 8d46cc6
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/abidiff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# SPDX-FileCopyrightText: 2025 Andrea Pappacoda <andrea@pappacoda.it>
# SPDX-License-Identifier: MIT

name: abidiff

on: [push, pull_request]

defaults:
run:
shell: sh

jobs:
abi:
runs-on: ubuntu-latest
container:
image: debian:testing

steps:
- name: Install dependencies
run: apt -y --update install --no-install-recommends
abigail-tools
ca-certificates
g++
git
libbrotli-dev
libssl-dev
meson
pkg-config
python3
zlib1g-dev

- uses: actions/checkout@v4
with:
path: current

- uses: actions/checkout@v4
with:
path: previous
fetch-depth: 2

- name: Checkout previous
working-directory: previous
run: git checkout HEAD^

- name: Build current
working-directory: current
run: |
meson setup --buildtype=debug -Dcpp-httplib_compile=true build
ninja -C build
- name: Build previous
working-directory: previous
run: |
meson setup --buildtype=debug -Dcpp-httplib_compile=true build
ninja -C build
- name: Run abidiff
run: abidiff
--headers-dir1 previous/build
--headers-dir2 current/build
previous/build/libcpp-httplib.so
current/build/libcpp-httplib.so

0 comments on commit 8d46cc6

Please sign in to comment.