Skip to content

Commit a57758e

Browse files
committed
Stop caching the latest NDK on the CI, just cache the sysroot
1 parent 9675615 commit a57758e

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

.github/workflows/sdks.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,6 @@ jobs:
7979
8080
echo "TOOLCHAIN=${TOOLCHAIN}" >> $GITHUB_ENV
8181
${TOOLCHAIN}/bin/swift --version
82-
- name: Get cached Android NDK
83-
id: ndk
84-
uses: actions/cache@v4
85-
if: ${{ steps.cache-bundle.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') }}
86-
with:
87-
path: ~/android-ndk-r${{ env.NDK_VERSION }}-linux.zip
88-
key: android-ndk-${{ env.NDK_VERSION }}-full
89-
lookup-only: true
90-
- name: Download Android NDK if not cached before
91-
if: ${{ steps.cache-bundle.outputs.cache-hit != 'true' && steps.ndk.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') }}
92-
run: |
93-
wget -q https://dl.google.com/android/repository/android-ndk-r$NDK_VERSION-linux.zip
94-
if [ "$(sha1sum android-ndk-r$NDK_VERSION-linux.zip | cut -f1 -d" ")" != '090e8083a715fdb1a3e402d0763c388abb03fb4e' ]; then
95-
echo "NDK checksum didn't match"
96-
exit 1
97-
fi
98-
mv android-ndk-r$NDK_VERSION-linux.zip ~
9982
- name: Get cached Android NDK sysroot and runtime libraries
10083
id: cache-ndk
10184
uses: actions/cache@v4
@@ -106,11 +89,17 @@ jobs:
10689
- name: Extract Android NDK sysroot if not cached before
10790
if: ${{ steps.cache-bundle.outputs.cache-hit != 'true' && steps.cache-ndk.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') }}
10891
run: |
109-
unzip -q ~/android-ndk-r$NDK_VERSION-linux.zip
92+
wget -q https://dl.google.com/android/repository/android-ndk-r$NDK_VERSION-linux.zip
93+
if [ "$(sha1sum android-ndk-r$NDK_VERSION-linux.zip | cut -f1 -d" ")" != '090e8083a715fdb1a3e402d0763c388abb03fb4e' ]; then
94+
echo "NDK checksum didn't match"
95+
exit 1
96+
fi
97+
unzip -q android-ndk-r$NDK_VERSION-linux.zip
98+
rm android-ndk-r$NDK_VERSION-linux.zip
11099
mv android-ndk-r$NDK_VERSION/toolchains/llvm/prebuilt/linux-x86_64/sysroot .
111100
rm -r sysroot/usr/{include,lib}/{i686,riscv64}-linux-android
112101
mv android-ndk-r$NDK_VERSION/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/*/lib/linux sysroot
113-
rm -r sysroot/linux/*{i[36]86,riscv64}*
102+
rm -r sysroot/linux/*{i[36]86,riscv64}* android-ndk-r$NDK_VERSION
114103
tar cJf ~/android-sysroot.tar.xz sysroot
115104
- name: Clone
116105
uses: actions/checkout@v4

0 commit comments

Comments
 (0)