Skip to content
Open
Show file tree
Hide file tree
Changes from 17 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,14 @@ on:
type: string
required: false

cts_binaries_artifact:
type: string
required: false
cts_binaries_ref:
type: string
description: tag/ref of CTS tests to compile
default: main

outputs:
build_conclusion:
value: ${{ jobs.build.outputs.build_conclusion }}
Expand Down Expand Up @@ -173,6 +181,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 +346,16 @@ 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:
ref: ${{ inputs.cts_binaries_ref }}
cts_testing_mode: build-only
target_devices: all
sycl_cts_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
40 changes: 34 additions & 6 deletions .github/workflows/sycl-prebuilt-e2e-container.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Create container with pre-built tests

# The purpose of this is to build E2E tests with the latest release toolchain
# and then run them with the trunk SYCL RT (libsycl.so and friends) to verify
# that ABI compatibility hasn't been broken.
# The purpose of this is to build E2E and CTS tests with the latest release
# toolchain and then run them with the trunk SYCL RT (libsycl.so and friends)
# to verify that ABI compatibility hasn't been broken.

on:
workflow_dispatch:
Expand All @@ -12,6 +12,18 @@ on:
description: tag/sha
required: true
default:
cts_ref:
type: choice
description: tag/sha to use for CTS -- hardcoded hash is last known good commit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think "good" is appropriate description. I think it's what our sycl-rel-smth branch is "known" to work with. Maybe @KornevNikita or @AlexeySachkov could suggest better wording here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the word "stable", but is anything ever truly stable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We take the sycl-cts hash closest to the last sycl commit that was added to the sycl-rel-* branch.
I think stable sounds good enough. Or may be some thing like "hardcoded hash is the SYCL-CTS version that successfully passes with the latest release toolchain"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How's "tag/sha to use for SYCL-CTS -- hardcoded hash is last known commit to pass with latest release toolchain"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, "SYCL CTS revision matching sycl-rel-N_M branch"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I currently have "tag/sha to use for SYCL-CTS -- hardcoded hash is CTS revision matching sycl-rel-N_M branch."

required: true
default: 'main'
options:
- main
# 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
- 19e4ed34377c8a8a354d701772427be8c5430b0d

push:
branches:
Expand All @@ -35,6 +47,12 @@ jobs:
toolchain_artifact: toolchain
toolchain_artifact_filename: toolchain.tar.zst
e2e_binaries_artifact: e2e_bin
cts_binaries_artifact: cts_bin
# 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
cts_binaries_ref: ${{ github.event_name == 'push' && '19e4ed34377c8a8a354d701772427be8c5430b0d' || inputs.cts_ref }}

# 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 +90,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 All @@ -84,14 +106,14 @@ jobs:
tags: |
ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref || github.ref_name }}

run-e2e:
run-prebuilt-tests:
# Ensure those tests can actually pass with the toolchain they were built
# with, otherwise testing compatibility with those binaries is pointless.
# This job should be aligned with how the image will be used in trunk CI.
#
# I'll start with just a single configuration, but this might be extended
# with a matrix in future (e.g., to run on cpu/CUDA/AMDGPU).
name: Run E2E tests with SYCL RT they were built with
name: Run E2E, 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' }}
Expand All @@ -116,3 +138,9 @@ jobs:
with:
testing_mode: run-only
target_devices: level_zero:gpu
- name: Run CTS tests
uses: ./devops/actions/run-tests/cts
timeout-minutes: 20
with:
cts_testing_mode: run-only
target_devices: level_zero:gpu
29 changes: 25 additions & 4 deletions devops/actions/run-tests/cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ inputs:
cts_testing_mode:
required: true
sycl_cts_artifact:
require: false
required: false
target_devices:
required: true
retention-days:
required: false
sycl_compiler:
required: false

runs:
using: "composite"
Expand Down Expand Up @@ -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 @@ -81,18 +83,37 @@ runs:
retention-days: ${{ inputs.retention-days }}

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

- name: Extract SYCL-CTS binaries
if: inputs.cts_testing_mode == 'run-only'
if: |
inputs.cts_testing_mode == 'run-only'
&& !(inputs.sycl_cts_artifact == 'in-container'
|| inputs.sycl_cts_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.cts_testing_mode == 'run-only'
&& (inputs.sycl_cts_artifact == 'in-container'
|| inputs.sycl_cts_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'
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