Skip to content

Commit

Permalink
github: workflow: Add ABI Compliance Check
Browse files Browse the repository at this point in the history
Signed-off-by: Gaetan Perrot <[email protected]>
  • Loading branch information
moonlight83340 committed Aug 9, 2024
1 parent 677c6d8 commit b2cc744
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/abi-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: ABI Compliance Check
on: [pull_request]
jobs:
abi-check:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
runs-on: ${{ matrix.os }}
steps:
- name: Setup packages on Linux
run: |
sudo apt-get update
sudo apt-get install libzmq3-dev libsocketcan-dev
- name: Setup build system packages on Linux
run: |
sudo apt-get install ninja-build cmake
- name: Setup ABI Compliance Checker
run: |
sudo apt-get install -y abi-compliance-checker abi-dumper
- name: Checkout merged-base
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: Build and Dump ABI for `merged-base` version
run: |
cmake -GNinja -B build -DCMAKE_BUILD_TYPE=Debug -DCSP_HAVE_LIBZMQ=1 -DCSP_USE_RTABLE=1 -DCMAKE_POSITION_INDEPENDENT_CODE=ON && ninja -C build
abi-dumper build/libcsp.so -lver "merged-base" -o ./../tmp/libcsp-merged-base.dump
- name: Checkout Current PR
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Build and Dump ABI for Current PR
run: |
cmake -GNinja -B build -DCMAKE_BUILD_TYPE=Debug -DCSP_HAVE_LIBZMQ=1 -DCSP_USE_RTABLE=1 -DCMAKE_POSITION_INDEPENDENT_CODE=ON && ninja -C build
abi-dumper build/libcsp.so -lver "PR" -o ./../tmp/pr.dump
- name: Compare ABI
run: |
abi-compliance-checker -l libcsp -old ./../tmp/libcsp-merged-base.dump -new ./../tmp/pr.dump
- name: Upload ABI Report
if: always()
uses: actions/upload-artifact@v4
with:
name: abi-compliance-report-${{ github.run_id }}
path: compat_reports
if-no-files-found: warn

0 comments on commit b2cc744

Please sign in to comment.