Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ on:
type: string
required: false

cts_binaries_artifact:
type: string
required: false

outputs:
build_conclusion:
value: ${{ jobs.build.outputs.build_conclusion }}
Expand Down Expand Up @@ -173,6 +177,7 @@ jobs:
with:
sparse-checkout: |
devops/actions
sycl/cts_exclude_filter
# Cleanup will be run after all actions are completed.
- name: Register cleanup after job is finished
uses: ./devops/actions/cleanup
Expand Down Expand Up @@ -337,6 +342,20 @@ jobs:
comm -13 env_before env_after >> $GITHUB_ENV
rm env_before env_after

- name: Build CTS tests
if: ${{ inputs.cts_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
uses: ./devops/actions/run-tests/cts
with:
# Author: Tom Deakin <[email protected]>
# Date: Thu Jul 10 16:45:48 2025 +0100
# Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions
# Remove expected exceptions for secondary queue
ref: 19e4ed34377c8a8a354d701772427be8c5430b0d
testing_mode: build-only
target_devices: all
binaries_artifact: ${{ inputs.cts_binaries_artifact }}
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++

- name: Build E2E tests
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
uses: ./devops/actions/run-tests/e2e
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ jobs:
with:
ref: ${{ inputs.tests_ref || 'main' }}
extra_cmake_args: ${{ inputs.extra_cmake_args }}
cts_testing_mode: ${{ inputs.cts_testing_mode }}
sycl_cts_artifact: ${{ inputs.sycl_cts_artifact }}
testing_mode: ${{ inputs.cts_testing_mode }}
binaries_artifact: ${{ inputs.sycl_cts_artifact }}
target_devices: ${{ inputs.target_devices }}
retention-days: ${{ inputs.retention-days }}

Expand Down
34 changes: 33 additions & 1 deletion .github/workflows/sycl-prebuilt-e2e-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
toolchain_artifact: toolchain
toolchain_artifact_filename: toolchain.tar.zst
e2e_binaries_artifact: e2e_bin
cts_binaries_artifact: cts_bin

# Couldn't make it work from inside the container, so have to use an extra job
# and pass an artifact.
Expand Down Expand Up @@ -72,7 +73,11 @@ jobs:
with:
name: e2e_bin
path: devops/

- name: Download CTS binaries
uses: actions/download-artifact@v5
with:
name: cts_bin
path: devops/

- name: Build container
uses: ./devops/actions/build_container
Expand Down Expand Up @@ -116,3 +121,30 @@ jobs:
with:
testing_mode: run-only
target_devices: level_zero:gpu

run-cts:
name: Run CTS tests with SYCL RT they were built with
runs-on: [Linux, pvc]
needs: [docker, build]
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
container:
image: ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref || github.ref_name }}
options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
steps:
- uses: actions/checkout@v5
with:
sparse-checkout: |
devops
- run: |
mkdir toolchain
tar -I 'zstd' -xf /sycl-prebuilt/toolchain.tar.zst -C toolchain
echo LD_LIBRARY_PATH=$PWD/toolchain/lib:$LD_LIBRARY_PATH >> $GITHUB_ENV
echo PATH=$PWD/toolchain/bin:$PATH >> $GITHUB_ENV
- run: |
sycl-ls
- name: Run CTS tests
uses: ./devops/actions/run-tests/cts
timeout-minutes: 20
with:
testing_mode: run-only
target_devices: level_zero:gpu
55 changes: 38 additions & 17 deletions devops/actions/run-tests/cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,45 @@ inputs:
ref:
description: "Commit SHA or branch to checkout tests"
required: true
binaries_artifact:
required: false
extra_cmake_args:
required: false
cts_testing_mode:
testing_mode:
required: true
sycl_cts_artifact:
require: false
target_devices:
required: true
retention-days:
required: false
sycl_compiler:
required: false

runs:
using: "composite"
steps:
- name: Checkout SYCL CTS tests
if: inputs.cts_testing_mode != 'run-only'
if: inputs.testing_mode != 'run-only'
uses: ./devops/actions/cached_checkout
with:
path: khronos_sycl_cts
repository: 'KhronosGroup/SYCL-CTS'
ref: ${{ inputs.ref }}
cache_path: "/__w/repo_cache/"
- name: SYCL CTS GIT submodules init
if: inputs.cts_testing_mode != 'run-only'
if: inputs.testing_mode != 'run-only'
shell: bash
run: |
git -C khronos_sycl_cts submodule update --init
- name: Build SYCL CTS tests
if: inputs.cts_testing_mode != 'run-only'
if: inputs.testing_mode != 'run-only'
shell: bash
env:
CMAKE_EXTRA_ARGS: ${{ inputs.extra_cmake_args }}
run: |
cts_exclude_filter=""
# If CTS_TESTS_TO_BUILD is null - use filter
if [ -z "$CTS_TESTS_TO_BUILD" ]; then
if [ "${{ contains(inputs.cts_testing_mode, 'build-only') }}" = "true" ]; then
if [ "${{ contains(inputs.testing_mode, 'build-only') }}" = "true" ]; then
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/compfails
elif [ "${{ contains(inputs.target_devices, 'opencl:cpu') }}" = "true" ]; then
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/LINUX_OCL_CPU
Expand All @@ -56,7 +58,7 @@ runs:
echo "::endgroup::"
fi

cmake -GNinja -B./build-cts -S./khronos_sycl_cts -DCMAKE_CXX_COMPILER=$(which clang++) \
cmake -GNinja -B./build-cts -S./khronos_sycl_cts -DCMAKE_CXX_COMPILER="${{ inputs.sycl_compiler || '$(which clang++)'}}" \
-DSYCL_IMPLEMENTATION=DPCPP \
-DSYCL_CTS_EXCLUDE_TEST_CATEGORIES="$cts_exclude_filter" \
-DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF \
Expand All @@ -68,34 +70,53 @@ runs:
ninja -C build-cts -k0 $( [ -n "$CTS_TESTS_TO_BUILD" ] && echo "$CTS_TESTS_TO_BUILD" || echo "test_conformance")

- name: Pack SYCL-CTS binaries
if: always() && !cancelled() && inputs.cts_testing_mode == 'build-only'
if: always() && !cancelled() && inputs.testing_mode == 'build-only'
shell: bash
run: tar -I 'zstd -9' -cf sycl_cts_bin.tar.zst -C ./build-cts/bin .

- name: Upload SYCL-CTS binaries
if: always() && !cancelled() && inputs.cts_testing_mode == 'build-only'
if: always() && !cancelled() && inputs.testing_mode == 'build-only'
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.sycl_cts_artifact }}
name: ${{ inputs.binaries_artifact }}
path: sycl_cts_bin.tar.zst
retention-days: ${{ inputs.retention-days }}

- name: Download SYCL-CTS binaries
if: inputs.cts_testing_mode == 'run-only'
if: |
inputs.testing_mode == 'run-only'
&& !(inputs.binaries_artifact == 'in-container'
|| inputs.binaries_artifact == ''
|| github.event_name == 'workflow_dispatch')
uses: actions/download-artifact@v4
with:
name: ${{ inputs.sycl_cts_artifact }}
name: ${{ inputs.binaries_artifact }}

- name: Extract SYCL-CTS binaries
if: inputs.cts_testing_mode == 'run-only'
if: |
inputs.testing_mode == 'run-only'
&& !(inputs.binaries_artifact == 'in-container'
|| inputs.binaries_artifact == ''
|| github.event_name == 'workflow_dispatch')
shell: bash
run: |
mkdir -p build-cts/bin
tar -I 'zstd' -xf sycl_cts_bin.tar.zst -C build-cts/bin

- name: Extract CTS tests from container image
if: |
inputs.testing_mode == 'run-only'
&& (inputs.binaries_artifact == 'in-container'
|| inputs.binaries_artifact == ''
|| github.event_name == 'workflow_dispatch')
shell: bash
run: |
mkdir -p build-cts/bin
tar -I 'zstd' -xf /sycl-prebuilt/sycl_cts_bin.tar.zst -C build-cts/bin

- name: SYCL CTS List devices
# Proceed with execution even if the 'build' step did not succeed.
if: (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only'
if: (always() && !cancelled()) && inputs.testing_mode != 'build-only'
shell: bash
env:
ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
Expand All @@ -109,7 +130,7 @@ runs:
# these files may differ from each other, so when there is a pre-built set of
# tests, we need to filter it according to the filter-file.
- name: Filter SYCL CTS test categories
if: inputs.cts_testing_mode == 'run-only'
if: inputs.testing_mode == 'run-only'
shell: bash
run: |
cts_exclude_filter=""
Expand All @@ -129,7 +150,7 @@ runs:

- name: Run SYCL CTS tests
# Proceed with execution even if the previous two steps did not succeed.
if: (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only'
if: (always() && !cancelled()) && inputs.testing_mode != 'build-only'
env:
ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
# By-default GitHub actions execute the "run" shell script with -e option,
Expand Down
2 changes: 2 additions & 0 deletions devops/containers/release_tests_binaries.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ FROM $base_image:$base_tag
ADD --chown=sycl:sycl toolchain.tar.zst /__w/llvm/llvm/toolchain
ADD --chown=sycl:sycl e2e_binaries.tar.zst /__w/llvm/llvm/build-e2e
ADD --chown=sycl:sycl e2e_sources.tar.zst /__w/llvm/llvm/llvm
ADD --chown=sycl:sycl sycl_cts_bin.tar.zst /__w/llvm/llvm/build-cts

# Since `/__w/llvm/llvm` above is overriden by GHA, need to provide the
# following for using in CI:
COPY e2e_binaries.tar.zst /sycl-prebuilt/
COPY e2e_sources.tar.zst /sycl-prebuilt/
COPY sycl_cts_bin.tar.zst /sycl-prebuilt/
COPY toolchain.tar.zst /sycl-prebuilt/

COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh
Expand Down
Loading