-
Notifications
You must be signed in to change notification settings - Fork 791
[CI] Workflow to create docker with pre-built E2E tests #19715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
abf44c4
[CI] Workflow to create docker with pre-built E2E tests
aelovikov-intel 763810b
github.ref -> github.refname
aelovikov-intel c627217
Address code review comments
aelovikov-intel f99056a
Fix image used for run-e2e job
aelovikov-intel 332e5f1
Add missing COPY
aelovikov-intel 03822b4
Remove `user-setup.sh` lines
aelovikov-intel 97ae506
Try `USER sycl`
aelovikov-intel 1960aab
Address another CR round
aelovikov-intel 6fddb21
Remove extra spaces
aelovikov-intel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
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. | ||
|
||
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/ | ||
|
||
- name: Checkout E2E tests | ||
uses: actions/checkout@v4 | ||
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@v4 | ||
with: | ||
name: toolchain | ||
path: devops/ | ||
- name: Download E2E binaries | ||
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_name }} | ||
|
||
run-e2e: | ||
# 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 | ||
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@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: 20 | ||
with: | ||
testing_mode: run-only | ||
target_devices: level_zero:gpu |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
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 | ||
|
||
USER sycl |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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?There was a problem hiding this comment.
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 :)