Skip to content

Commit 5b086c2

Browse files
committed
Cache NDK directory in GitHub workflow
This reduces the NDK Setup time by 20-30s for each step.
1 parent e804b44 commit 5b086c2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/ci-check.yml

+14
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ jobs:
4141
- uses: actions/checkout@v1
4242

4343
# Sets up the NDK required by AGP 3.6.x
44+
- name: NDK Cache
45+
id: ndk-cache
46+
uses: actions/cache@v2
47+
with:
48+
path: /usr/local/lib/android/sdk/ndk/20.0.5594570
49+
key: ndk-cache-20.0.5594570
4450
- name: Setup NDK
51+
if: steps.ndk-cache.outputs.cache-hit != 'true'
4552
run: sudo $ANDROID_HOME/tools/bin/sdkmanager 'ndk;20.0.5594570'
4653

4754
# Use Java 8
@@ -71,7 +78,14 @@ jobs:
7178
- uses: actions/checkout@v1
7279

7380
# Sets up the NDK required by AGP 3.6.x
81+
- name: NDK Cache
82+
id: ndk-cache
83+
uses: actions/cache@v2
84+
with:
85+
path: /usr/local/lib/android/sdk/ndk/20.0.5594570
86+
key: ndk-cache-20.0.5594570
7487
- name: Setup NDK
88+
if: steps.ndk-cache.outputs.cache-hit != 'true'
7589
run: sudo $ANDROID_HOME/tools/bin/sdkmanager 'ndk;20.0.5594570'
7690

7791
# Patch issue in platform-tools 31.0.3 where platform-tools/api/api-versions.xml is missing (see https://issuetracker.google.com/issues/195445762)

0 commit comments

Comments
 (0)