forked from xrootd/xrootd
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (86 loc) · 2.94 KB
/
Copy pathABI.yml
File metadata and controls
108 lines (86 loc) · 2.94 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: ABI
on:
push:
branches:
- '**'
paths:
- .github/workflows/ABI.yml
- 'src/**'
pull_request:
branches:
- '**'
paths:
- .github/workflows/ABI.yml
- 'src/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
CFLAGS: -Og -gdwarf-4
CXXFLAGS: -Og -gdwarf-4
DEBIAN_FRONTEND: noninteractive
jobs:
abi-compatibility-check:
name: ABI Compatibility Check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Install dependencies
run: |
sudo apt update -q
sudo apt install -y devscripts equivs git
sudo apt install -y abi-dumper abi-compliance-checker w3m
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Fetch tags from main repository
run: git fetch --tags https://github.com/xrootd/xrootd
- name: Install XRootD build dependencies
run: mk-build-deps --install --remove -s sudo debian/control <<< yes
- name: Configure XRootD (Head Reference)
run: cmake -S . -B build/new -DCMAKE_INSTALL_PREFIX=install/new
- name: Build and Install XRootD (Head Reference)
run: cmake --build build/new --parallel --target install
- name: Checkout Base Reference of XRootD to Compare ABI
run: git checkout -f ${GITHUB_BASE_REF:-$(git describe --abbrev=0 --always HEAD)}
- name: Configure XRootD (Base Reference)
run: cmake -S . -B build/old -DCMAKE_INSTALL_PREFIX=install/old
- name: Build and Install XRootD (Base Reference)
run: cmake --build build/old --parallel --target install
- name: Check ABI Compatibility between Base and Head References
run: |
for LIB in $(find install/old -name '*.so' -exec basename {} \;); do
OLDLIB=$(find install/old -name ${LIB})
NEWLIB=$(find install/new -name ${LIB})
# Skip libraries that do not have an SONAME (i.e. plugins)
readelf -d ${OLDLIB} | grep -q SONAME || continue
abi-dumper ${OLDLIB} -o ${LIB/.so/.old.dump} \
-vnum old -public-headers install/old/include
abi-dumper ${NEWLIB} -o ${LIB/.so/.new.dump} \
-vnum new -public-headers install/new/include
abi-compliance-checker -extended -l ${LIB} \
-report-path abi-report/${LIB/.so/.html} \
-old ${LIB/.so/.old.dump} -new ${LIB/.so/.new.dump}
done
- name: Display ABI Reports on Failure
if: ${{ failure() }}
run: |
for REPORT in abi-report/*.html; do
echo "::group::${REPORT/.html}"
w3m -dump ${REPORT}
echo "::endgroup::"
done
- name: Upload Artifacts on Failure
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: abi-report
path: abi-report
retention-days: 7