Skip to content

Commit 23e19c3

Browse files
committed
[CI] Use ccache when prebuilding tests
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent cb38c59 commit 23e19c3

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Diff for: .github/workflows/sycl-linux-build.yml

+4
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ jobs:
280280
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}
281281
cxx_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
282282
extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd"
283+
build_cache_root: ${{ inputs.build_cache_root }}
284+
inputs.build_cache_suffix: "${{ inputs.build_cache_suffix }}_e2e"
283285

284286
- name: Remove E2E tests before spirv-backend run
285287
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
@@ -295,3 +297,5 @@ jobs:
295297
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}_spirv_backend
296298
cxx_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
297299
extra_lit_opts: --param spirv-backend=True
300+
build_cache_root: ${{ inputs.build_cache_root }}
301+
inputs.build_cache_suffix: "${{ inputs.build_cache_suffix }}_e2e_spv"

Diff for: devops/actions/run-tests/e2e/action.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,17 @@ inputs:
1717
required: false
1818
cxx_compiler:
1919
required: false
20-
20+
build_cache_root:
21+
required: false
22+
build_cache_suffix:
23+
type: string
24+
required: false
25+
default: "default"
2126

2227
runs:
2328
using: "composite"
29+
env:
30+
2431
steps:
2532
- name: Checkout E2E tests
2633
uses: ./devops/actions/cached_checkout
@@ -51,6 +58,12 @@ runs:
5158
if [ -n "$CMAKE_EXTRA_ARGS" ]; then
5259
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
5360
fi
61+
if [ -n "${{ inputs.build_cache_root }}" ]; then
62+
echo "opts='$opts -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache'" >> $GITHUB_OUTPUT
63+
echo "CCACHE_DIR=${{ inputs.build_cache_root }}/build_cache_${{ inputs.build_cache_suffix }}" >> $GITHUB_OUTPUT
64+
echo "CCACHE_MAXSIZE=5G" >> $GITHUB_OUTPUT
65+
mkdir -p $CCACHE_DIR
66+
fi
5467
- name: Configure E2E tests
5568
if: inputs.testing_mode != 'run-only'
5669
shell: bash

0 commit comments

Comments
 (0)