1
- name : SYCL E2E on Nightly build
1
+ name : SYCL E2E
2
2
3
3
on :
4
4
workflow_call :
9
9
type : string
10
10
image :
11
11
type : string
12
- extra_cmake_args :
12
+ image_options :
13
13
type : string
14
- extra_image_opts :
14
+ extra_cmake_args :
15
15
type : string
16
16
target_devices :
17
17
type : string
20
20
reset_gpu :
21
21
type : string
22
22
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
+
23
37
jobs :
24
38
lin_e2e_only :
25
39
name : ${{ inputs.name }}
26
40
runs-on : ${{ fromJSON(inputs.runner) }}
27
41
container :
28
42
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) }}
30
45
steps :
31
46
- name : Reset GPU
32
47
if : inputs.reset_gpu == 'true'
@@ -39,29 +54,56 @@ jobs:
39
54
ref : ${{ inputs.ref }}
40
55
sparse-checkout : |
41
56
devops/actions
57
+ devops/scripts/get_release.py
42
58
sycl/test-e2e
43
59
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
44
68
- name : Register cleanup after job is finished
45
69
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
56
71
shell : bash
57
72
run : |
58
73
# https://github.com/actions/runner/issues/1964 prevents us from using
59
74
# the ENTRYPOINT in the image.
75
+ env | sort > env_before
60
76
if [ -e /runtimes/oneapi-tbb/env/vars.sh ]; then
61
77
source /runtimes/oneapi-tbb/env/vars.sh;
62
78
elif [ -e /opt/runtimes/oneapi-tbb/env/vars.sh ]; then
63
79
source /opt/runtimes/oneapi-tbb/env/vars.sh;
64
80
else
65
81
echo "no TBB vars in /opt/runtimes or /runtimes";
66
82
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 : |
67
109
ninja -C build-e2e check-sycl-e2e
0 commit comments