1- name : SYCL E2E on Nightly build
1+ name : SYCL E2E
22
33on :
44 workflow_call :
99 type : string
1010 image :
1111 type : string
12- extra_cmake_args :
12+ image_options :
1313 type : string
14- extra_image_opts :
14+ extra_cmake_args :
1515 type : string
1616 target_devices :
1717 type : string
2020 reset_gpu :
2121 type : string
2222
23+ sycl_toolchain_artifact :
24+ type : string
25+ default : ' '
26+ sycl_toolchain_archive :
27+ type : string
28+ default : ' '
29+ sycl_toolchain_decompress_command :
30+ type : string
31+ default : ' '
32+
33+ env :
34+ type : string
35+ default : ' {}'
36+
2337jobs :
2438 lin_e2e_only :
2539 name : ${{ inputs.name }}
2640 runs-on : ${{ fromJSON(inputs.runner) }}
2741 container :
2842 image : ${{ inputs.image }}
29- options : --device=/dev/dri --privileged --cap-add SYS_ADMIN ${{ inputs.extra_image_opts }}
43+ options : ${{ inputs.image_options }}
44+ env : ${{ fromJSON(inputs.env) }}
3045 steps :
3146 - name : Reset GPU
3247 if : inputs.reset_gpu == 'true'
@@ -39,29 +54,56 @@ jobs:
3954 ref : ${{ inputs.ref }}
4055 sparse-checkout : |
4156 devops/actions
57+ devops/scripts/get_release.py
4258 sycl/test-e2e
4359 llvm/utils
60+ - name : Install drivers
61+ if : env.compute_runtime_tag != ''
62+ run : |
63+ if [ -e /opt/install_drivers.sh ]; then
64+ # TODO pack this script into container
65+ sudo cp llvm/devops/scripts/get_release.py /opt/
66+ sudo -E /opt/install_drivers.sh --all
67+ fi
4468 - name : Register cleanup after job is finished
4569 uses : ./llvm/devops/actions/cleanup
46- - name : Configure
47- run : |
48- cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="clang++" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ inputs.extra_cmake_args }}
49- # opencl:cpu backend won't be visible in the sycl-ls commands below, see the
50- # comment below referencing https://github.com/actions/runner/issues/1964.
51- - run : sycl-ls --verbose
52- - run : SYCL_PI_TRACE=-1 sycl-ls
53- - name : SYCL End-to-end tests
54- env :
55- LIT_OPTS : -v --no-progress-bar --show-unsupported --max-time 3600 --time-tests
70+ - name : Source OneAPI TBB vars.sh
5671 shell : bash
5772 run : |
5873 # https://github.com/actions/runner/issues/1964 prevents us from using
5974 # the ENTRYPOINT in the image.
75+ env | sort > env_before
6076 if [ -e /runtimes/oneapi-tbb/env/vars.sh ]; then
6177 source /runtimes/oneapi-tbb/env/vars.sh;
6278 elif [ -e /opt/runtimes/oneapi-tbb/env/vars.sh ]; then
6379 source /opt/runtimes/oneapi-tbb/env/vars.sh;
6480 else
6581 echo "no TBB vars in /opt/runtimes or /runtimes";
6682 fi
83+ env | sort > env_after
84+ comm -13 env_before env_after >> $GITHUB_ENV
85+ rm env_before env_after
86+ - name : Download SYCL toolchain
87+ if : inputs.sycl_toolchain_artifact != ''
88+ uses : actions/download-artifact@v3
89+ with :
90+ name : ${{ inputs.sycl_toolchain_artifact }}
91+ - name : Extract/Setup SYCL toolchain
92+ if : inputs.sycl_toolchain_artifact != ''
93+ run : |
94+ mkdir toolchain
95+ tar -I '${{ inputs.sycl_toolchain_decompress_command }}' -xf ${{ inputs.sycl_toolchain_archive }} -C toolchain
96+ rm -f ${{ inputs.sycl_toolchain_archive }}
97+ echo PATH=$PWD/toolchain/bin/:$PATH >> $GITHUB_ENV
98+ echo LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV
99+ - run : which clang++ sycl-ls
100+ - run : sycl-ls --verbose
101+ - run : SYCL_PI_TRACE=-1 sycl-ls
102+ - name : Configure
103+ run : |
104+ cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ inputs.extra_cmake_args }}
105+ - name : SYCL End-to-end tests
106+ env :
107+ LIT_OPTS : -v --no-progress-bar --show-unsupported --max-time 3600 --time-tests
108+ run : |
67109 ninja -C build-e2e check-sycl-e2e
0 commit comments