Skip to content

Commit d6eb331

Browse files
[SYCL] Add ABI symbols tests against release branch (#19860)
Before this PR our approach was to have `sycl_symbols_[linux|windows]-sycl.dump` files in trunk that always capture the current state of symbols exported from `libsycl.so`/`sycl.dll` We highlighted added/removed symbols separately and considered "added" symbols as being OK while "removed" meant an ABI break. That works fine by is a bit too verbose. Also, not all "removed" are bad. If we've just added a symbol in a previous commit and are reverting it now, the backward ABI compatibility against the last release isn't being broken. I don't think we promise any backward compatibility between arbitrary builds in the trunk (`origin/sycl`), only the compatibility against previous official minor releases with the same major version. This PR adds two more tests that track what we promise better. I've modified our `sycl/tools/abi_check.py` to allow ignoring "added" symbols and only check against symbols that are being removed. I've also copied `sycl_symbols*.dump` from the `sycl-rel-6_3` branch into the trunk under `sycl_symbols*-sycl-rel-6_3.dump` names and started running the testing for them in that new mode. Those **must** never fail, unless we're incrementing the major version or the break is intentional and approved (hence dedicated `CODEOWNERS` who can approve such changes). I'm also adding a step to the `sycl-nightly.yml` workflow to ensure that those copies in trunk match the release branch. That would be handy if we were to cherry-pick some changes that add new symbols to the ongoing release.
1 parent 1e0a5a3 commit d6eb331

File tree

5 files changed

+8693
-3
lines changed

5 files changed

+8693
-3
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,4 @@ sycl/test-e2e/ThreadSanitizer/ @intel/dpcpp-sanitizers-review
226226

227227
# ABI compatibility
228228
devops/compat_ci_exclude.sycl-rel-** @gmlueck @xtian-github
229+
sycl/test/abi/*sycl-rel*.dump @AlexeySachkov @KornevNikita

.github/workflows/sycl-nightly.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ on:
88
permissions: read-all
99

1010
jobs:
11+
check_abi_symbols:
12+
name: Check ABI symbols tests match release branch
13+
runs-on: [Linux, build]
14+
if: github.repository == 'intel/llvm'
15+
container: ghcr.io/intel/llvm/ubuntu2404_build
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
sparse-checkout: |
20+
sycl/test/abi
21+
- run: |
22+
git fetch --depth=1 origin sycl-rel-6_3
23+
git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_linux.dump sycl/test/abi/sycl_symbols_linux-sycl-rel-6_3.dump
24+
git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_windows.dump sycl/test/abi/sycl_symbols_windows-sycl-rel-6_3.dump
25+
1126
ubuntu2204_build:
1227
if: github.repository == 'intel/llvm'
1328
uses: ./.github/workflows/sycl-linux-build.yml

0 commit comments

Comments
 (0)