Skip to content

Commit 1379bb6

Browse files
committed
[CI] Add sycl toolchain to PATH when building E2E tests
1 parent 574ba2b commit 1379bb6

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ jobs:
345345
testing_mode: build-only
346346
target_devices: all
347347
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}
348-
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
348+
sycl_toolchain: $GITHUB_WORKSPACE/toolchain/
349349
extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd"
350350

351351
- name: Remove E2E tests before spirv-backend run
@@ -360,7 +360,7 @@ jobs:
360360
testing_mode: build-only
361361
target_devices: all
362362
binaries_artifact: ${{ inputs.e2e_binaries_spirv_backend_artifact }}
363-
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
363+
sycl_toolchain: $GITHUB_WORKSPACE/toolchain/
364364
extra_lit_opts: --param spirv-backend=True
365365

366366
- name: Remove E2E tests before preview-mode run
@@ -375,5 +375,5 @@ jobs:
375375
testing_mode: build-only
376376
target_devices: all
377377
binaries_artifact: ${{ inputs.e2e_binaries_preview_artifact }}
378-
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
378+
sycl_toolchain: $GITHUB_WORKSPACE/toolchain/
379379
extra_lit_opts: --param test-preview-mode=True

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
ref: ${{ inputs.ref || github.sha }}
9595
testing_mode: full
9696
target_devices: native_cpu:cpu
97-
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
97+
sycl_toolchain: $GITHUB_WORKSPACE/toolchain/
9898
extra_lit_opts: --param sycl_build_targets="native_cpu"
9999
extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON
100100

devops/actions/run-tests/e2e/action.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inputs:
1919
required: false
2020
retention-days:
2121
required: false
22-
sycl_compiler:
22+
sycl_toolchain:
2323
required: false
2424

2525
runs:
@@ -76,11 +76,28 @@ runs:
7676
if [ -n "$CMAKE_EXTRA_ARGS" ]; then
7777
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
7878
fi
79+
80+
# Installing SYCL toolchain so that E2E tests pick up latest
81+
# binaries (like sycl-post-link) while building instead of using
82+
# system installed ones.
83+
- name: Install SYCL toolchain
84+
if: |
85+
inputs.sycl_toolchain != '' &&
86+
inputs.testing_mode != 'run-only'
87+
shell: bash
88+
env:
89+
SYCL_TOOLCHAIN: ${{ inputs.sycl_toolchain }}
90+
run: |
91+
echo "PATH=$SYCL_TOOLCHAIN/bin/:$PATH" >> $GITHUB_ENV
92+
which clang++
93+
which sycl-ls
94+
which sycl-post-link
95+
7996
- name: Configure E2E tests
8097
if: inputs.testing_mode != 'run-only'
8198
shell: bash
8299
run: |
83-
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="${{ inputs.sycl_compiler || '$(which clang++)'}}" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
100+
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="${{ '$(which clang++)' }}" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
84101
- name: SYCL End-to-end tests
85102
id: run_e2e
86103
continue-on-error: true

0 commit comments

Comments
 (0)