@@ -17,7 +17,12 @@ inputs:
17
17
required : false
18
18
cxx_compiler :
19
19
required : false
20
-
20
+ build_cache_root :
21
+ required : false
22
+ build_cache_suffix :
23
+ type : string
24
+ required : false
25
+ default : " default"
21
26
22
27
runs :
23
28
using : " composite"
@@ -48,18 +53,36 @@ runs:
48
53
env :
49
54
CMAKE_EXTRA_ARGS : ${{ inputs.extra_cmake_args }}
50
55
run : |
56
+ CMPLR="${{ inputs.cxx_compiler || '$(which clang++)'}}"
51
57
if [ -n "$CMAKE_EXTRA_ARGS" ]; then
52
58
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
53
59
fi
60
+ if [ -n "${{ inputs.build_cache_root }}" ]; then
61
+ CCACHE_PATH="$(dirname $CMPLR)"
62
+ echo "CCACHE_COMPILER=clang++" >> $GITHUB_ENV
63
+ echo "CCACHE_PATH=$CCACHE_PATH/real" >> $GITHUB_ENV
64
+ echo "CCACHE_DIR=${{ inputs.build_cache_root }}/build_cache_${{ inputs.build_cache_suffix }}" >> $GITHUB_ENV
65
+ echo "CCACHE_MAXSIZE=5G" >> $GITHUB_ENV
66
+ #if [ ! -f "$CMPLR" ]; then
67
+ # sudo ln -s "$(which ccache)" "$CMPLR"
68
+ mkdir -p "$CCACHE_PATH/real"
69
+ mv "$CMPLR" "$CCACHE_PATH/real"
70
+ ln -s "$(which ccache)" "$CMPLR"
71
+ #fi
72
+ DPCPP_PATH="$(dirname $CCACHE_PATH)"
73
+ echo "dpcpp_path=$DPCPP_PATH" >> $GITHUB_OUTPUT
74
+ mkdir -p $CCACHE_DIR
75
+ fi
76
+ #todo fix dpcpp_path when not using ccache
77
+ echo "CMPLR=$CMPLR" >> $GITHUB_ENV
54
78
- name : Configure E2E tests
55
79
if : inputs.testing_mode != 'run-only'
56
80
shell : bash
57
81
run : |
58
- cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="${{ inputs.cxx_compiler || '$(which clang++)'}}" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
82
+ cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="$CMPLR" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
83
+ echo "LIT_OPTS=-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True --param test-mode=${{ inputs.testing_mode }} --param sycl_devices=${{ inputs.target_devices }} --param dpcpp_path=${{ steps.cmake_opts.outputs.dpcpp_path }}" >> $GITHUB_ENV
59
84
- name : SYCL End-to-end tests
60
85
shell : bash {0}
61
- env :
62
- LIT_OPTS : -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True --param test-mode=${{ inputs.testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
63
86
run : |
64
87
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
65
88
exit_code=$?
0 commit comments