87
87
uses : actions/cache@v4
88
88
with :
89
89
path : ~/swift-${{ matrix.version }}-android-${{ matrix.arch }}-*-sdk.tar.xz
90
- key : ${{ matrix.version }}-${{ steps.version.outputs.latest }}-${{ matrix.arch }}-sdk
90
+ key : ${{ matrix.version }}-${{ steps.version.outputs.latest }}-${{ matrix.arch }}-overlay- sdk
91
91
- name : Clone
92
92
uses : actions/checkout@v4
93
93
with :
@@ -106,6 +106,7 @@ jobs:
106
106
SDK=`pwd`/$SDK_NAME
107
107
108
108
tar xf ~/$SWIFT_TAG-ubuntu22.04.tar.gz
109
+ ./$SWIFT_TAG-ubuntu22.04/usr/bin/swift --version
109
110
git apply swift-android-ci.patch
110
111
git apply -C1 swift-android.patch swift-android-both-ndks.patch
111
112
if [[ ${{ matrix.version }} = 'release'* ]]; then
@@ -129,6 +130,12 @@ jobs:
129
130
git apply -C0 swift-android-foundation-ndk26.patch
130
131
if [ ${{ matrix.version }} = 'release-26d' ]; then
131
132
git apply swift-android-stdlib-ndk26.patch
133
+ elif [ ${{ matrix.version }} = 'trunk' ]; then
134
+ git apply android-overlay/modulemap.patch android-overlay/overlay.patch android-overlay/foundation-fixes.patch android-overlay/import-android.patch android-overlay/swift-argument-parser.patch android-overlay/swift-system-tag.patch android-overlay/yams.patch
135
+ wget -q https://download.swift.org/tmp/pull-request/74027/849/ubuntu2004/PR-ubuntu2004.tar.gz
136
+ tar xf PR-ubuntu2004.tar.gz
137
+ rm -rf $SWIFT_TAG-ubuntu22.04/usr/
138
+ mv usr/ $SWIFT_TAG-ubuntu22.04/
132
139
fi
133
140
fi
134
141
sed -i "s%/data/data/com.termux/files%$SDK%" $SDK/usr/lib/pkgconfig/sqlite3.pc
@@ -141,7 +148,7 @@ jobs:
141
148
patchelf --set-rpath \$ORIGIN/../..:\$ORIGIN $SDK/usr/lib/swift/android/lib[FXs]*.so
142
149
143
150
tar cJf ~/${SDK_NAME/-release/-${{ matrix.version }}}.tar.xz $SDK_NAME
144
- rm -rf build/ $SDK_NAME
151
+ rm -rf build/ $SDK_NAME llvm-project/
145
152
- name : Upload SDK
146
153
uses : actions/upload-artifact@v4
147
154
with :
@@ -154,7 +161,14 @@ jobs:
154
161
155
162
if [ ! -d ${{ steps.version.outputs.tag }}-ubuntu22.04 ]; then
156
163
tar xf ~/${{ steps.version.outputs.tag }}-ubuntu22.04.tar.gz
164
+ if [ ${{ matrix.version }} = 'trunk' ]; then
165
+ wget -q https://download.swift.org/tmp/pull-request/74027/849/ubuntu2004/PR-ubuntu2004.tar.gz
166
+ tar xf PR-ubuntu2004.tar.gz
167
+ rm -rf ${{ steps.version.outputs.tag }}-ubuntu22.04/usr/
168
+ mv usr/ ${{ steps.version.outputs.tag }}-ubuntu22.04/
169
+ fi
157
170
fi
171
+ ./${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift --version
158
172
159
173
tar xf ~/swift-${{ matrix.version }}-android-${{ matrix.arch }}*-sdk.tar.xz
160
174
- name : Get Swift Argument Parser package
@@ -164,6 +178,9 @@ jobs:
164
178
path : swift-argument-parser
165
179
- name : Build Swift Argument Parser package
166
180
run : |
181
+ if [ ${{ matrix.version }} = 'trunk' ]; then
182
+ git apply sdk-config/android-overlay/swift-argument-parser.patch
183
+ fi
167
184
cd swift-argument-parser
168
185
../sdk-config/${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift build --build-tests --destination ../sdk-config/swift-*-sdk/usr/swiftpm-android-${{ matrix.arch }}.json -Xlinker -rpath -Xlinker \$ORIGIN/lib/swift/android
169
186
- name : Get Swift crypto package
@@ -190,6 +207,12 @@ jobs:
190
207
git apply ../sdk-config/swift-nio-disable-ecn-tests.patch ../sdk-config/swift-nio-filesystem-both-ndks.patch
191
208
if [ ${{ matrix.version }} = 'release-25c' ]; then
192
209
git apply -R ../sdk-config/swift-nio-ndk26.patch
210
+ elif [ ${{ matrix.version }} = 'trunk' ]; then
211
+ ../sdk-config/${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift package update
212
+ cd .build/checkouts/swift-system/
213
+ git apply ../../../../sdk-config/android-overlay/swift-system-checkout.patch
214
+ cd ../../..
215
+ git apply ../sdk-config/android-overlay/swift-nio.patch
193
216
fi
194
217
../sdk-config/${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift build --build-tests --destination ../sdk-config/swift-*-sdk/usr/swiftpm-android-${{ matrix.arch }}.json -Xlinker -rpath -Xlinker \$ORIGIN/lib/swift/android
195
218
- name : Get Swift Numerics package
@@ -209,6 +232,9 @@ jobs:
209
232
- name : Build Swift System package
210
233
run : |
211
234
cd swift-system
235
+ if [ ${{ matrix.version }} = 'trunk' ]; then
236
+ git apply ../sdk-config/android-overlay/swift-system.patch
237
+ fi
212
238
../sdk-config/${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift build --build-tests --destination ../sdk-config/swift-*-sdk/usr/swiftpm-android-${{ matrix.arch }}.json -Xlinker -rpath -Xlinker \$ORIGIN/lib/swift/android
213
239
- name : Get Swift Collections package
214
240
uses : actions/checkout@v4
@@ -233,6 +259,9 @@ jobs:
233
259
- name : Build Swift NIO SSH package
234
260
run : |
235
261
cd sns
262
+ if [ ${{ matrix.version }} = 'trunk' ]; then
263
+ git apply ../sdk-config/android-overlay/swift-nio-ssh.patch
264
+ fi
236
265
sed -i "s%url: .*swift-\(\w\+\)\.git.*$%path: \"../swift-\1\"),%g" Package.swift
237
266
../sdk-config/${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift build --build-tests --destination ../sdk-config/swift-*-sdk/usr/swiftpm-android-${{ matrix.arch }}.json -Xlinker -rpath -Xlinker \$ORIGIN/lib/swift/android
238
267
- name : Get Swift NIO SSL package
@@ -245,6 +274,8 @@ jobs:
245
274
cd snl
246
275
if [ ${{ matrix.version }} = 'release-25c' ]; then
247
276
sed -i "s%#include <time%#include <signal.h>\n#include <time%" Sources/CNIOBoringSSL/include/CNIOBoringSSL_asn1.h
277
+ elif [ ${{ matrix.version }} = 'trunk' ]; then
278
+ git apply ../sdk-config/android-overlay/swift-nio-ssl.patch
248
279
fi
249
280
SWIFTCI_USE_LOCAL_DEPS=1 ../sdk-config/${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift build --build-tests --destination ../sdk-config/swift-*-sdk/usr/swiftpm-android-${{ matrix.arch }}.json -Xlinker -rpath -Xlinker \$ORIGIN/lib/swift/android
250
281
- name : Get Yams package
@@ -254,6 +285,9 @@ jobs:
254
285
path : yams
255
286
- name : Build Yams package
256
287
run : |
288
+ if [ ${{ matrix.version }} = 'trunk' ]; then
289
+ git apply sdk-config/android-overlay/yams.patch
290
+ fi
257
291
cd yams
258
292
sed -i "s% fixturesDirectory + \"/SourceKitten#289% \"/data/local/tmp/pack%" Tests/YamsTests/PerformanceTests.swift
259
293
../sdk-config/${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift build --build-tests --destination ../sdk-config/swift-*-sdk/usr/swiftpm-android-${{ matrix.arch }}.json -Xlinker -rpath -Xlinker \$ORIGIN/lib/swift/android
@@ -266,6 +300,9 @@ jobs:
266
300
if : ${{ matrix.arch != 'armv7' }}
267
301
run : |
268
302
cd snh
303
+ if [ ${{ matrix.version }} = 'trunk' ]; then
304
+ git apply ../sdk-config/android-overlay/swift-nio-http2.patch
305
+ fi
269
306
sed -i "s%url: .*swift-\(\w\+\)\.git.*$%path: \"../swift-\1\"),%g" Package.swift
270
307
../sdk-config/${{ steps.version.outputs.tag }}-ubuntu22.04/usr/bin/swift build --build-tests --destination ../sdk-config/swift-*-sdk/usr/swiftpm-android-${{ matrix.arch }}.json -Xlinker -rpath -Xlinker \$ORIGIN/lib/swift/android
271
308
- name : Get Swift Algorithms package
0 commit comments