79
79
80
80
echo "TOOLCHAIN=${TOOLCHAIN}" >> $GITHUB_ENV
81
81
${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 ~
99
82
- name : Get cached Android NDK sysroot and runtime libraries
100
83
id : cache-ndk
101
84
uses : actions/cache@v4
@@ -106,11 +89,17 @@ jobs:
106
89
- name : Extract Android NDK sysroot if not cached before
107
90
if : ${{ steps.cache-bundle.outputs.cache-hit != 'true' && steps.cache-ndk.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') }}
108
91
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
110
99
mv android-ndk-r$NDK_VERSION/toolchains/llvm/prebuilt/linux-x86_64/sysroot .
111
100
rm -r sysroot/usr/{include,lib}/{i686,riscv64}-linux-android
112
101
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
114
103
tar cJf ~/android-sysroot.tar.xz sysroot
115
104
- name : Clone
116
105
uses : actions/checkout@v4
0 commit comments