3030 short-sha=$(git rev-parse --short=7 ${GITHUB_SHA})
3131 ref-slug=$(echo ${{ github.ref_name }} | tr '/_' '-')
3232 EOF
33+ - name : " Registry login: ghcr.io"
34+ # Uses built-in github.token (replaces hardcoded sys-lzdev PAT) and
35+ # github.actor as the username (any non-empty string works with token auth).
36+ run : |
37+ echo ${{ github.token }} |
38+ docker login -u ${{ github.actor }} --password-stdin ghcr.io
39+ - name : List available base images
40+ if : github.event_name == 'workflow_dispatch'
41+ run : |
42+ for distro in ubuntu sles rhel; do
43+ echo "=== ${distro} ==="
44+ # GitHub Packages API - lists all versions with their tags
45+ curl -s \
46+ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
47+ -H "Accept: application/vnd.github+json" \
48+ "https://api.github.com/orgs/oneapi-src/packages/container/level-zero-linux-compute%2F${distro}/versions?per_page=100" \
49+ | python3 -c "import sys,json; d=json.load(sys.stdin); print('\n'.join(sorted(t for v in d for t in v.get('metadata',{}).get('container',{}).get('tags',[]))) or '(no tags found)') if isinstance(d,list) else print('API error:',d.get('message','unknown'))" 2>/dev/null || echo "(query failed)"
50+ done
3351
3452 build :
3553 # Notes on formatting:
5068 {name: ubuntu, vmaj: 20, vmin: '04'},
5169 {name: ubuntu, vmaj: 22, vmin: '04'},
5270 {name: ubuntu, vmaj: 24, vmin: '04'},
53- {name: sles, vmaj: 15, vmin: 2},
54- {name: sles, vmaj: 15, vmin: 3},
5571 {name: sles, vmaj: 15, vmin: 4},
72+ {name: sles, vmaj: 15, vmin: 6},
5673 {name: rhel, vmaj: 8, vmin: 6},
5774 {name: windows}
5875 ]
6582 env :
6683 MSYS_NO_PATHCONV : 1
6784 MOUNT_TARGET : ${{ matrix.os.name == 'windows' && 'C:/project' || '/project' }}
68- # -j breaks the Visual Studio configuration selection
85+ # Ninja handles parallelism internally; -j not needed for Windows
6986 PARALLEL : ${{ ! (matrix.os.name == 'windows') && '-j' || '' }}
7087 ARCH_SUFFIX : ${{ matrix.arch != '' && format('_{0}', matrix.arch) || '' }}
7188 steps :
@@ -104,9 +121,11 @@ jobs:
104121 run : echo "DOCKER_IMAGE=localhost/${{ github.repository }}/${{ steps.const.outputs.os-string }}" >> ${GITHUB_ENV}
105122 - name : " Registry login: ghcr.io"
106123 if : matrix.os.name != 'windows'
124+ # Uses built-in github.token (replaces hardcoded sys-lzdev PAT) and
125+ # github.actor as the username (any non-empty string works with token auth).
107126 run : |
108- echo ${{ secrets.GITHUB_TOKEN }} |
109- docker login -u sys-lzdev --password-stdin ghcr.io
127+ echo ${{ github.token }} |
128+ docker login -u ${{ github.actor }} --password-stdin ghcr.io
110129 - name : Verify Docker configuration
111130 if : matrix.os.name != 'windows'
112131 run : |
@@ -133,16 +152,16 @@ jobs:
133152 - name : Build (Windows)
134153 if : matrix.os.name == 'windows'
135154 run : |
155+ $ws = "${{ github.workspace }}".Replace('\', '/')
136156 mkdir build
137157 cd build
138158 cmake `
139- -G "Visual Studio 17 2022" `
140- -A x64 `
159+ -G "Ninja" `
141160 -D CMAKE_BUILD_TYPE=Release `
142161 -D CMAKE_INSTALL_PREFIX="${{ matrix.target == 'install' && '../level-zero-install' || matrix.target == 'package' && 'C:/Program Files' || '' }}" `
143- -D CPACK_OUTPUT_FILE_PREFIX="${{ github.workspace }} /level-zero-package" `
162+ -D CPACK_OUTPUT_FILE_PREFIX="$ws /level-zero-package" `
144163 ..
145- cmake --build . --config Release -- target ${{ matrix.target }}
164+ cmake --build . --target ${{ matrix.target }}
146165 shell : powershell
147166 - name : Build (Linux)
148167 if : matrix.os.name != 'windows'
0 commit comments