Skip to content

Commit 6301b05

Browse files
authored
Use sccache to accelerate android build (#9587)
Android didn't use sccache because it has its own NDK clang. Now use env var to trigger clang from sccache.
1 parent ac1ab9c commit 6301b05

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.github/workflows/_android.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
script: |
2323
set -eux
2424
25+
# Use sccache for NDK compiler as well
26+
export CMAKE_CXX_COMPILER_LAUNCHER=sccache
27+
export CMAKE_C_COMPILER_LAUNCHER=sccache
28+
2529
# The generic Linux job chooses to use base env, not the one setup by the image
2630
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
2731
conda activate "${CONDA_ENV}"

.github/workflows/android-perf.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@ jobs:
353353
script: |
354354
set -eux
355355
356+
# Use sccache for NDK compiler as well
357+
export CMAKE_CXX_COMPILER_LAUNCHER=sccache
358+
export CMAKE_C_COMPILER_LAUNCHER=sccache
359+
356360
# The generic Linux job chooses to use base env, not the one setup by the image
357361
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
358362
conda activate "${CONDA_ENV}"

.github/workflows/android-release-artifacts.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ jobs:
6060
script: |
6161
set -eux
6262
63+
# Use sccache for NDK compiler as well
64+
export CMAKE_CXX_COMPILER_LAUNCHER=sccache
65+
export CMAKE_C_COMPILER_LAUNCHER=sccache
66+
6367
# The generic Linux job chooses to use base env, not the one setup by the image
6468
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
6569
conda activate "${CONDA_ENV}"

0 commit comments

Comments
 (0)