Create container with pre-built tests #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create container with pre-built tests | |
# 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: | |
inputs: | |
ref: | |
type: string | |
description: tag/sha | |
required: true | |
default: | |
cts_ref: | |
type: choice | |
description: tag/sha to use for CTS -- hardcoded hash is last known good commit. | |
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: | |
- sycl-rel-** | |
permissions: read-all | |
jobs: | |
build: | |
uses: ./.github/workflows/sycl-linux-build.yml | |
with: | |
build_ref: ${{ inputs.ref || github.sha }} | |
build_cache_root: "/__w/" | |
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest" | |
cc: clang | |
cxx: clang++ | |
changes: '[]' | |
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. | |
docker: | |
runs-on: [Linux, build] | |
needs: build | |
permissions: | |
packages: write | |
if: always() | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
sparse-checkout: | | |
devops/ | |
- name: Checkout E2E tests | |
uses: actions/checkout@v5 | |
with: | |
ref: ${{ inputs.ref || github.sha }} | |
path: llvm | |
sparse-checkout: | | |
llvm/utils/lit | |
sycl/test-e2e | |
- name: Pack sources | |
run: | | |
tar -I 'zstd -9' -cf devops/e2e_sources.tar.zst -C ./llvm . | |
- name: Download toolchain | |
uses: actions/download-artifact@v5 | |
with: | |
name: toolchain | |
path: devops/ | |
- name: Download E2E binaries | |
uses: actions/download-artifact@v5 | |
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 | |
with: | |
push: true | |
file: release_tests_binaries | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
tags: | | |
ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref || github.ref_name }} | |
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, 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 E2E tests | |
uses: ./devops/actions/run-tests/e2e | |
timeout-minutes: 20 | |
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 |