Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
11 changes: 7 additions & 4 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ on:

repo_ref:
type: string
required: True
required: False
description: |
Commit SHA or branch to checkout the intel/llvm repo.
tests_ref:
Expand All @@ -60,9 +60,10 @@ on:

e2e_binaries_artifact:
description: |
Must be set if `e2e_testing_mode` is equal to `run-only` and the
artifact must exist. Can be set in other modes resulting in artifact
upload.
When set in modes other than `run-only` results in artifact upload.
For `run-only` mode, if specified, means downloading pre-built
binaries from the artifact, otherwise they are expected to be part of
the container.
type: string
default: ''
required: False
Expand Down Expand Up @@ -156,6 +157,7 @@ on:
type: choice
options:
- 'ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest'
- 'ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2'
- 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps'
image_options:
description: |
Expand Down Expand Up @@ -205,6 +207,7 @@ on:
options:
- "full"
- "build-only"
- "run-only"

permissions:
contents: read
Expand Down
104 changes: 104 additions & 0 deletions .github/workflows/sycl-prebuilt-e2e-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Create container with pre-built tests

on:
workflow_dispatch:
inputs:
ref:
type: string
description: tag/sha
required: true
default:

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

# 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@v4
with:
sparse-checkout: |
devops/
- uses: actions/checkout@v4
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we name some of these steps so it looks better in the log?

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 .
- uses: actions/download-artifact@v4
with:
name: toolchain
path: devops/
- uses: actions/download-artifact@v4
with:
name: e2e_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 }}
run-e2e:
runs-on: [Linux, pvc]
Copy link
Contributor

Choose a reason for hiding this comment

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

name would help here too since its PVC only

Copy link
Contributor Author

@aelovikov-intel aelovikov-intel Aug 5, 2025

Choose a reason for hiding this comment

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

Ok, I think I need to provide some explanation here, not sure where it should go.

I'm not that interested in this task for the sake of it. What's happening here instead, is that I'll be using those pre-built E2E tests in trunk pre-commit, so I'm trying to show that they could be run successfully with the "original" toolchain the tests were built with.

With that context, any more detailed suggestions? Is PVC even the right runner to target here?

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry maybe i'm too tired but i have absolutely no idea what you mean :)

needs: [docker, build]
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
container:
image: ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref }}
options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
steps:
- uses: actions/checkout@v4
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: 60
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we're using prebuilt tests so we can probably be more conservative, probably 30 is enough

with:
testing_mode: run-only
target_devices: level_zero:gpu
14 changes: 11 additions & 3 deletions devops/actions/run-tests/e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,34 @@ runs:
using: "composite"
steps:
- name: Checkout E2E tests
if: ${{ inputs.testing_mode != 'run-only' || inputs.binaries_artifact }}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we unify how we are checking inputs.binaries_artifact? here we just rely on non-empty being true but below we explicitly check it like inputs.binaries_artifact != '', i have no opinion which one we do but would be a bit cleaner to always do the same thing

uses: actions/checkout@v4
with:
path: llvm
ref: ${{ inputs.ref || github.sha }}
sparse-checkout: |
llvm/utils/lit
sycl/test-e2e

- name: Download E2E Binaries
if: inputs.testing_mode == 'run-only'
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != '' }}
uses: actions/download-artifact@v4
with:
name: ${{ inputs.binaries_artifact }}
- name: Extract E2E Binaries
if: inputs.testing_mode == 'run-only'
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != '' }}
shell: bash
run: |
mkdir build-e2e
tar -I 'zstd' -xf e2e_binaries.tar.zst -C build-e2e

- name: Extract E2E tests from container image
if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact == '' }}
shell: bash
run: |
mkdir build-e2e llvm
tar -I 'zstd' -xf /sycl-prebuilt/e2e_binaries.tar.zst -C build-e2e
tar -I 'zstd' -xf /sycl-prebuilt/e2e_sources.tar.zst -C llvm

- name: Deduce E2E CMake options
if: inputs.testing_mode != 'run-only'
id: cmake_opts
Expand Down
26 changes: 26 additions & 0 deletions devops/containers/release_tests_binaries.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG base_tag=alldeps
ARG base_image=ghcr.io/intel/llvm/ubuntu2404_intel_drivers

FROM $base_image:$base_tag

# Actual CI maps volumes via something like "/runner/host/path":"/__w/", so
# these won't be visible there. They can be used when manually reproducing
# issues though. Path `/__w/llvm/llvm` is the property of Github Actions and
# when CMake configures E2E tests this path is hardcoded in both CMake files and
# e2e binaries themselve. As such, it's useful to have these in the image for
# local manual experiments.
#
# One can map volumes as "/host/system/new/toolchain":"/__w/llvm/llvm/toolchain"
# to override the toolchain in order to run the tests with local SYCL RT instead
# of using the release RT included in this image.
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

# 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 toolchain.tar.zst /sycl-prebuilt/

COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh
Loading