Skip to content

Commit ee12f00

Browse files
committed
Update to fix n-1 static test run
Signed-off-by: Russell McGuire <russell.w.mcguire@intel.com>
1 parent 15b4bb4 commit ee12f00

2 files changed

Lines changed: 36 additions & 4 deletions

File tree

.github/workflows/build-multi.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,21 @@ jobs:
3737
- name: List available base images
3838
run: |
3939
for distro in ubuntu sles rhel; do
40-
echo "=== ghcr.io/oneapi-src/level-zero-linux-compute/${distro} ==="
40+
echo "=== ${distro} ==="
41+
# GitHub Packages API - lists all versions with their tags
4142
curl -s \
4243
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
43-
"https://ghcr.io/v2/oneapi-src/level-zero-linux-compute/${distro}/tags/list" \
44-
| python3 -c "import sys,json; d=json.load(sys.stdin); print('\n'.join(sorted(d.get('tags',[]))))" \
45-
2>/dev/null || echo "(no access or not found)"
44+
-H "Accept: application/vnd.github+json" \
45+
"https://api.github.com/orgs/oneapi-src/packages/container/level-zero-linux-compute%2F${distro}/versions?per_page=100" \
46+
| python3 -c "
47+
import sys, json
48+
versions = json.load(sys.stdin)
49+
if isinstance(versions, list):
50+
tags = sorted(t for v in versions for t in v.get('metadata',{}).get('container',{}).get('tags',[]))
51+
print('\n'.join(tags) if tags else '(no tags found)')
52+
else:
53+
print('API error:', versions.get('message','unknown'))
54+
" 2>/dev/null || echo "(query failed)"
4655
done
4756

4857
build:

.github/workflows/build-quick-static-n-1.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,29 @@ jobs:
9999
cd build
100100
cmake -G "Ninja" -D CMAKE_BUILD_TYPE=Release -D BUILD_L0_LOADER_TESTS=1 -D BUILD_STATIC=1 ..
101101
cmake --build .
102+
# TEMPORARY WORKAROUND — safe to remove once this PR's changes have merged to master.
103+
#
104+
# Background: The CI was switched from the Visual Studio generator (-G "Visual Studio 17 2022")
105+
# to Ninja (-G "Ninja") because windows-latest now ships with Visual Studio 2026 (v18),
106+
# which CMake 3.31 does not recognise as a valid generator.
107+
#
108+
# The VS generator is multi-config and places build outputs under bin/<CONFIG>/
109+
# (e.g. bin/Release/). Ninja is single-config and places outputs directly under bin/.
110+
#
111+
# master's test/CMakeLists.txt still contains hardcoded bin/$<CONFIG>/ paths in its
112+
# CTest ENVIRONMENT properties (e.g. bin/Release/ze_null_test1.dll). This PR fixes
113+
# those paths to use $<TARGET_FILE_DIR:ze_null_test1>/ which is generator-agnostic,
114+
# but until that fix lands on master the n-1 build (which checks out master for the
115+
# static loader) will fail to find the DLLs.
116+
#
117+
# This junction makes bin/Release/ point to bin/ so the old hardcoded paths resolve
118+
# correctly. Once the fix is on master, Ninja will place DLLs in bin/ and the CTest
119+
# properties will resolve directly there — this junction will never be traversed and
120+
# can be removed along with this comment.
121+
# This command assumes default shell is 'powershell'
122+
if (-not (Test-Path bin\Release)) {
123+
New-Item -ItemType Junction -Path bin\Release -Target (Resolve-Path bin).Path
124+
}
102125
103126
# Build dynamic loader from PR branch
104127
- name: Build Dynamic Loader from PR

0 commit comments

Comments
 (0)