Skip to content

Commit 2060b2a

Browse files
[CI] Prebuild E2E tests as part of build workflow
1 parent 9fa1bb9 commit 2060b2a

File tree

3 files changed

+39
-18
lines changed

3 files changed

+39
-18
lines changed

.github/workflows/sycl-linux-build.yml

+33-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ on:
7070
build_image:
7171
type: choice
7272
options:
73-
- "ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build"
73+
- "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps"
7474
cc:
7575
type: choice
7676
options:
@@ -217,6 +217,7 @@ jobs:
217217
# TODO consider moving this to Dockerfile.
218218
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
219219
LIT_OPTS="--allow-empty-runs" LIT_FILTER="e2e_test_requirements" cmake --build $GITHUB_WORKSPACE/build --target check-sycl
220+
220221
- name: Install
221222
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
222223
# TODO replace utility installation with a single CMake target
@@ -237,6 +238,37 @@ jobs:
237238
cmake --build $GITHUB_WORKSPACE/build --target install-clang-libraries
238239
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-libraries
239240
241+
- name: Source OneAPI TBB vars.sh
242+
shell: bash
243+
run: |
244+
# https://github.com/actions/runner/issues/1964 prevents us from using
245+
# the ENTRYPOINT in the image.
246+
env | sort > env_before
247+
if [ -e /runtimes/oneapi-tbb/env/vars.sh ]; then
248+
source /runtimes/oneapi-tbb/env/vars.sh;
249+
elif [ -e /opt/runtimes/oneapi-tbb/env/vars.sh ]; then
250+
source /opt/runtimes/oneapi-tbb/env/vars.sh;
251+
else
252+
echo "no TBB vars in /opt/runtimes or /runtimes";
253+
fi
254+
env | sort > env_after
255+
comm -13 env_before env_after >> $GITHUB_ENV
256+
rm env_before env_after
257+
- name: Build E2E tests
258+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
259+
run: |
260+
LIT_OPTS="--param test-mode=build-only" cmake --build $GITHUB_WORKSPACE/build --target check-sycl-e2e
261+
- name: Pack E2E binaries
262+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
263+
run: tar -I 'zstd -9' -cf e2e_binaries.tar.zst -C $GITHUB_WORKSPACE/build/tools/sycl/test-e2e .
264+
- name: Upload E2E binaries
265+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
266+
uses: actions/upload-artifact@v4
267+
with:
268+
name: sycl_e2e_bin_default
269+
path: e2e_binaries.tar.zst
270+
retention-days: 1
271+
240272
- name: Pack toolchain
241273
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
242274
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .

.github/workflows/sycl-linux-precommit.yml

+2-17
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
build_artifact_suffix: "default"
4848
build_cache_suffix: "default"
4949
# Docker image has last nightly pre-installed and added to the PATH
50-
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build"
50+
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
5151
cc: clang
5252
cxx: clang++
5353
changes: ${{ needs.detect_changes.outputs.filters }}
@@ -74,23 +74,8 @@ jobs:
7474
echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT"
7575
fi
7676
77-
build_e2e_tests:
78-
needs: [build]
79-
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
80-
uses: ./.github/workflows/sycl-linux-run-tests.yml
81-
with:
82-
name: Build e2e tests
83-
runner: '["Linux", "build"]'
84-
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps
85-
image_options: -u 1001
86-
ref: ${{ github.sha }}
87-
merge_ref: ''
88-
sycl_toolchain_artifact: sycl_linux_default
89-
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
90-
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
91-
e2e_testing_mode: 'build-only'
9277
run_prebuilt_e2e_tests:
93-
needs: [build, build_e2e_tests]
78+
needs: [build]
9479
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
9580
strategy:
9681
fail-fast: false

sycl/test-e2e/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ if(SYCL_TEST_E2E_STANDALONE)
1414
if( NOT OpenCL_LIBRARY )
1515
find_package(OpenCL)
1616
endif()
17+
else()
18+
if( NOT OpenCL_LIBRARY )
19+
set(OpenCL_LIBRARY "${LLVM_BINARY_DIR}/lib")
20+
endif()
1721
endif() # Standalone.
1822

1923
if(SYCL_TEST_E2E_STANDALONE)

0 commit comments

Comments
 (0)