Skip to content

Commit 6921ead

Browse files
loader-integration.yml: enable API/ABI check
Signed-off-by: Lisanna Dettwyler <[email protected]>
1 parent 5ff2333 commit 6921ead

2 files changed

Lines changed: 165 additions & 9 deletions

File tree

.github/docker/build.Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ RUN --mount=type=cache,target=/var/cache/apt <<EOF
77
rm /etc/apt/apt.conf.d/docker-clean
88
apt-get update
99
apt-get install -y \
10+
build-essential \
1011
ca-certificates \
12+
cmake \
1113
doxygen \
14+
elfutils \
1215
git \
1316
python3 \
1417
python3-breathe \
@@ -17,7 +20,9 @@ apt-get install -y \
1720
python3-yaml \
1821
python3-sphinx-book-theme \
1922
rst2pdf \
20-
sphinx
23+
sphinx \
24+
universal-ctags \
25+
vtable-dumper
2126
EOF
2227

2328
# RUN pip install Mako==1.1.0 PyYAML==5.2 sphinx-book-theme
Lines changed: 159 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
on:
2-
push:
3-
branches: [master]
4-
tags: [v*]
52
pull_request:
63
branches: [master]
74

@@ -16,25 +13,179 @@ jobs:
1613
runs-on: [self-hosted, Linux]
1714
if: github.repository_owner == 'intel-innersource'
1815
steps:
19-
- uses: actions/checkout@v4
16+
- name: Checkout spec-head
17+
uses: actions/checkout@v4
2018
with:
2119
clean: true
2220
fetch-depth: 0
2321
fetch-tags: true
24-
path: spec
22+
path: spec-head
23+
- name: Checkout spec-base
24+
uses: actions/checkout@v4
25+
with:
26+
ref: master
27+
clean: true
28+
fetch-depth: 0
29+
fetch-tags: true
30+
path: spec-base
2531
- name: Build container image
2632
run: | #bash
2733
docker build \
2834
--build-arg http_proxy=http://proxy-dmz.intel.com:912 \
2935
--build-arg https_proxy=http://proxy-dmz.intel.com:912 \
3036
-t ghcr.io/oneapi-src/spec-build:latest \
31-
- < spec/.github/docker/build.Dockerfile
32-
- name: Generate spec artifacts
37+
- < spec-head/.github/docker/build.Dockerfile
38+
- name: Generate spec-head artifacts
3339
run: | #bash
3440
docker run \
3541
--rm \
3642
-v $PWD:$PWD \
37-
-w $PWD/spec/scripts \
43+
-w $PWD/spec-head/scripts \
3844
-e TZ=UTC \
3945
ghcr.io/oneapi-src/spec-build:latest \
4046
python3 ./run.py --debug --html '--!build' --ver $VER
47+
- name: Generate spec-base artifacts
48+
run: | #bash
49+
docker run \
50+
--rm \
51+
-v $PWD:$PWD \
52+
-w $PWD/spec-base/scripts \
53+
-e TZ=UTC \
54+
ghcr.io/oneapi-src/spec-build:latest \
55+
python3 ./run.py --debug '--!build' --ver $VER
56+
- name: Checkout loader-head
57+
uses: actions/checkout@v4
58+
with:
59+
clean: true
60+
repository: oneapi-src/level-zero
61+
ref: spec-1.12
62+
path: loader-head
63+
- name: Checkout loader-base
64+
uses: actions/checkout@v4
65+
with:
66+
clean: true
67+
repository: oneapi-src/level-zero
68+
ref: spec-1.12
69+
path: loader-base
70+
- uses: intel-sandbox/action-setup-jq@main
71+
- name: Copy head include files
72+
working-directory: spec-head
73+
run: | #bash
74+
set -o pipefail
75+
jq -r '.[] | select(.|test("^../include"))' scripts/generated.json |
76+
cut -c 4- |
77+
sort |
78+
xargs -I{} cp -v ./{} ../loader-head/{}
79+
- name: Copy base include files
80+
working-directory: spec-base
81+
run: | #bash
82+
set -o pipefail
83+
jq -r '.[] | select(.|test("^../include"))' scripts/generated.json |
84+
cut -c 4- |
85+
sort |
86+
xargs -I{} cp -v ./{} ../loader-base/{}
87+
- name: json2src head
88+
run: | #bash
89+
docker run \
90+
--rm \
91+
--interactive \
92+
-v $PWD:$PWD \
93+
-w $PWD/loader-head \
94+
ghcr.io/oneapi-src/spec-build:latest \
95+
python3 ./scripts/json2src.py --ver $VER . < spec-head/scripts/input.json
96+
- name: json2src base
97+
run: | #bash
98+
docker run \
99+
--rm \
100+
--interactive \
101+
-v $PWD:$PWD \
102+
-w $PWD/loader-base \
103+
ghcr.io/oneapi-src/spec-build:latest \
104+
python3 ./scripts/json2src.py --ver $VER . < spec-base/scripts/input.json
105+
- name: Build loader-head
106+
working-directory: loader-head
107+
run: | #bash
108+
docker run \
109+
--rm \
110+
--interactive \
111+
-v $PWD:$PWD \
112+
-w $PWD \
113+
-e CXXFLAGS="-Og -g" \
114+
ghcr.io/oneapi-src/spec-build:latest \
115+
bash -e <<EOF
116+
mkdir -p build
117+
cd build
118+
cmake -D CMAKE_BUILD_TYPE=Debug ..
119+
make -j$(nproc)
120+
EOF
121+
- name: Build loader-base
122+
working-directory: loader-base
123+
run: | #bash
124+
docker run \
125+
--rm \
126+
--interactive \
127+
-v $PWD:$PWD \
128+
-w $PWD \
129+
-e CXXFLAGS="-Og -g" \
130+
ghcr.io/oneapi-src/spec-build:latest \
131+
bash -e <<EOF
132+
mkdir -p build
133+
cd build
134+
cmake -D CMAKE_BUILD_TYPE=Debug ..
135+
make -j$(nproc)
136+
EOF
137+
- name: Checkout abi-dumper
138+
uses: actions/checkout@v4
139+
with:
140+
clean: true
141+
repository: lvc/abi-dumper
142+
path: abi-dumper
143+
- name: Setup abi-dumper
144+
run: | #bash
145+
cp abi-dumper/abi-dumper.pl .
146+
chmod +x abi-dumper.pl
147+
- name: Dump loader-head
148+
run: | #bash
149+
docker run \
150+
--rm \
151+
-v $PWD:$PWD \
152+
-w $PWD \
153+
ghcr.io/oneapi-src/spec-build:latest \
154+
./abi-dumper.pl \
155+
loader-head/build/lib/libze_loader.so \
156+
-lver $(cat loader-head/build/VERSION)-1 \
157+
-public-headers loader-head/include \
158+
-o head.dump
159+
- name: Dump loader-base
160+
run: | #bash
161+
docker run \
162+
--rm \
163+
-v $PWD:$PWD \
164+
-w $PWD \
165+
ghcr.io/oneapi-src/spec-build:latest \
166+
./abi-dumper.pl \
167+
loader-base/build/lib/libze_loader.so \
168+
-lver $(cat loader-base/build/VERSION) \
169+
-public-headers loader-base/include \
170+
-o base.dump
171+
- name: Download and setup abi-compliance-checker
172+
run: |
173+
wget https://github.com/lvc/abi-compliance-checker/tarball/master -O abi-compliance-checker.tar.gz
174+
tar -xzf abi-compliance-checker.tar.gz
175+
chmod +x lvc-abi-compliance-checker-*/abi-compliance-checker.pl
176+
- name: Compare dumps
177+
run: |
178+
docker run \
179+
--rm \
180+
-v $PWD:$PWD \
181+
-w $PWD \
182+
ghcr.io/oneapi-src/spec-build:latest \
183+
lvc-abi-compliance-checker-*/abi-compliance-checker.pl \
184+
-l libze_loader \
185+
-old base.dump \
186+
-new head.dump \
187+
-report-path report.html
188+
- uses: actions/upload-artifact@v4
189+
with:
190+
name: abi-report
191+
path: report.html

0 commit comments

Comments
 (0)