@@ -303,31 +303,6 @@ jobs:
303
303
echo "SWIFTPM_X_FLAGS=${XFLAGS}" >> $GITHUB_ENV
304
304
AFLAGS="--swift-sdk armv7-unknown-linux-androideabi${ANDROID_API_LEVEL} ${FLAGS}"
305
305
echo "SWIFTPM_ARM_FLAGS=${AFLAGS}" >> $GITHUB_ENV
306
- - name : Get Swift Argument Parser package
307
- uses : actions/checkout@v4
308
- with :
309
- repository : apple/swift-argument-parser
310
- path : swift-argument-parser
311
- - name : Build Swift Argument Parser package
312
- run : |
313
- cd swift-argument-parser
314
- rm Examples/count-lines/CountLines.swift Tools/changelog-authors/*.swift
315
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
316
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
317
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
318
- - name : Get Swift crypto package
319
- uses : actions/checkout@v4
320
- with :
321
- repository : apple/swift-crypto
322
- path : swift-crypto
323
- - name : Build Swift crypto package
324
- run : |
325
- cd swift-crypto
326
- perl -pi -e 's%\\\\(testsDirectory)/.*Vectors%/data/local/tmp/pack/crypto-vectors%' Tests/{Crypto,_CryptoExtras}Tests/Utils/{RFCVector,Wycheproof}.swift
327
- perl -pi -e 's%#file%"/data/local/tmp/pack/crypto-vectors"%;s%../_CryptoExtrasVectors/%%' Tests/_CryptoExtrasTests/TestRSABlindSigning.swift
328
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
329
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
330
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
331
306
- name : Get Swift NIO package
332
307
uses : actions/checkout@v4
333
308
with :
@@ -336,109 +311,7 @@ jobs:
336
311
- name : Build Swift NIO package
337
312
run : |
338
313
cd swift-nio
339
- git apply ../sdk-config/swift-nio-disable-ecn-tests.patch ../sdk-config/swift-nio-filesystem.patch
340
- if ${{ startsWith(matrix.os, 'macos') }}; then
341
- git apply -R ../sdk-config/swift-nio-revert-async.patch
342
- fi
343
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
344
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
345
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
346
- - name : Get Swift Numerics package
347
- uses : actions/checkout@v4
348
- with :
349
- repository : apple/swift-numerics
350
- path : swift-numerics
351
- - name : Build Swift Numerics package
352
- run : |
353
- cd swift-numerics
354
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
355
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
356
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
357
- - name : Get Swift System package
358
- uses : actions/checkout@v4
359
- with :
360
- repository : apple/swift-system
361
- path : swift-system
362
- - name : Build Swift System package
363
- run : |
364
- git apply sdk-config/swift-system-tests.patch
365
- cd swift-system
366
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
367
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
368
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
369
- - name : Get Swift Collections package
370
- uses : actions/checkout@v4
371
- with :
372
- repository : apple/swift-collections
373
- path : swift-collections
374
- - name : Build Swift Collections package
375
- run : |
376
- cd swift-collections
377
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
378
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
379
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
380
- - name : Get Swift Atomics package
381
- uses : actions/checkout@v4
382
- with :
383
- repository : apple/swift-atomics
384
- path : swift-atomics
385
- ref : 1.2.0
386
- - name : Get Swift NIO SSH package
387
- uses : actions/checkout@v4
388
- with :
389
- repository : apple/swift-nio-ssh
390
- path : sns
391
- - name : Build Swift NIO SSH package
392
- run : |
393
- cd sns
394
- perl -pi -e 's%url: .*swift-([a-z]*)\.git.*$%path: \"../swift-\1\"),%g' Package.swift
395
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
396
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
397
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
398
- - name : Get Swift NIO SSL package
399
- uses : actions/checkout@v4
400
- with :
401
- repository : apple/swift-nio-ssl
402
- path : snl
403
- - name : Build Swift NIO SSL package
404
- run : |
405
- cd snl
406
- git apply ../sdk-config/swift-nio-ssl-test.patch
407
- SWIFTCI_USE_LOCAL_DEPS=1 ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
408
- SWIFTCI_USE_LOCAL_DEPS=1 ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
409
- SWIFTCI_USE_LOCAL_DEPS=1 ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
410
- - name : Get Yams package
411
- uses : actions/checkout@v4
412
- with :
413
- repository : jpsim/Yams
414
- path : yams
415
- - name : Build Yams package
416
- run : |
417
- cd yams
418
- perl -pi -e 's% fixturesDirectory + \"/SourceKitten#289% \"/data/local/tmp/pack%' Tests/YamsTests/PerformanceTests.swift
419
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
420
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
421
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
422
- - name : Get Swift NIO HTTP/2 package
423
- uses : actions/checkout@v4
424
- with :
425
- repository : apple/swift-nio-http2
426
- path : snh
427
- - name : Build Swift NIO HTTP/2 package
428
- run : |
429
- cd snh
430
- perl -pi -e 's%url: .*swift-([a-z]*)\.git.*$%path: \"../swift-\1\"),%g' Package.swift
431
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
432
- ${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
433
- - name : Get Swift Algorithms package
434
- uses : actions/checkout@v4
435
- with :
436
- repository : apple/swift-algorithms
437
- path : sa
438
- - name : Build Swift Algorithms package
439
- run : |
440
- cd sa
441
- perl -pi -e 's%url: .*$%path: \"../swift-numerics\"),%' Package.swift
314
+ git apply ../sdk-config/swift-nio-disable-ecn-tests.patch ../sdk-config/swift-nio-filesystem.patch ../sdk-config/swift-nio-debug-async.patch
442
315
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_AARCH_FLAGS}
443
316
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_X_FLAGS}
444
317
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_ARM_FLAGS}
@@ -464,56 +337,15 @@ jobs:
464
337
adb shell "run-as com.termux ln -s README.md /data/data/com.termux/pack/Test\ Data/README.md.symlink"
465
338
adb shell "run-as com.termux ln -s Foo /data/data/com.termux/pack/Test\ Data/Foo.symlink"
466
339
adb shell "run-as com.termux sh -c 'TMPDIR=/data/data/com.termux /data/data/com.termux/pack/swift-nioPackageTests.xctest'"
467
- adb shell "TMPDIR=/data/local/tmp /data/local/tmp/pack/swift-systemPackageTests.xctest"
468
340
EOF
469
341
470
342
mkdir pack
471
343
TARGET="x86_64-unknown-linux-android$ANDROID_API_LEVEL"
472
344
473
- cp swift-argument-parser/.build/$TARGET/debug/{generate-manual,math,repeat,roll,swift-argument-parserPackageTests.xctest} pack
474
- echo 'adb shell /data/local/tmp/pack/swift-argument-parserPackageTests.xctest' >> ~/test-toolchain.sh
475
-
476
- wget -q https://raw.githubusercontent.com/termux/termux-elf-cleaner/v2.1.1/elf-cleaner.cpp
477
- wget -q https://raw.githubusercontent.com/termux/termux-elf-cleaner/v2.1.1/elf.h
478
- wget -q https://raw.githubusercontent.com/termux/termux-elf-cleaner/v2.1.1/arghandling.h
479
- wget -q https://raw.githubusercontent.com/termux/termux-elf-cleaner/v2.1.1/arghandling.c
480
- clang -c arghandling.c
481
- clang -o elf-cleaner arghandling.o elf-cleaner.cpp -DCOPYRIGHT=\"foo\" -DPACKAGE_NAME=\"termux-elf-cleaner\" -DPACKAGE_VERSION=\"2.2.1\"
482
- ./elf-cleaner --api-level $ANDROID_API_LEVEL pack/{generate-manual,math,repeat,roll} || true
483
-
484
- cp swift-crypto/.build/$TARGET/debug/swift-cryptoPackageTests.xctest pack
485
- echo 'adb shell /data/local/tmp/pack/swift-cryptoPackageTests.xctest' >> ~/test-toolchain.sh
486
-
487
345
cp swift-nio/.build/$TARGET/debug/swift-nioPackageTests.xctest pack
488
346
489
- cp swift-numerics/.build/$TARGET/debug/swift-numericsPackageTests.xctest pack
490
- echo 'adb shell /data/local/tmp/pack/swift-numericsPackageTests.xctest' >> ~/test-toolchain.sh
491
-
492
- cp swift-system/.build/$TARGET/debug/swift-systemPackageTests.xctest pack
493
- cp swift-collections/.build/$TARGET/debug/swift-collectionsPackageTests.xctest pack
494
- echo 'adb shell /data/local/tmp/pack/swift-collectionsPackageTests.xctest' >> ~/test-toolchain.sh
495
-
496
- cp sns/.build/$TARGET/debug/swift-nio-sshPackageTests.xctest pack
497
- echo 'adb shell /data/local/tmp/pack/swift-nio-sshPackageTests.xctest' >> ~/test-toolchain.sh
498
-
499
- cp snl/.build/$TARGET/debug/swift-nio-sslPackageTests.xctest pack
500
- echo 'adb shell /data/local/tmp/pack/swift-nio-sslPackageTests.xctest' >> ~/test-toolchain.sh
501
-
502
- cp snh/.build/$TARGET/debug/swift-nio-http2PackageTests.xctest pack
503
- echo 'adb shell /data/local/tmp/pack/swift-nio-http2PackageTests.xctest' >> ~/test-toolchain.sh
504
-
505
- cp yams/.build/$TARGET/debug/YamsPackageTests.xctest pack
506
- echo 'adb shell /data/local/tmp/pack/YamsPackageTests.xctest' >> ~/test-toolchain.sh
507
-
508
- cp sa/.build/$TARGET/debug/swift-algorithmsPackageTests.xctest pack
509
- echo 'adb shell /data/local/tmp/pack/swift-algorithmsPackageTests.xctest' >> ~/test-toolchain.sh
510
-
511
- mkdir pack/crypto-vectors pack/swift-crypto_CryptoTests.resources
512
- cp swift-crypto/Tests/Test\ Vectors/* swift-crypto/Tests/_CryptoExtrasVectors/* pack/crypto-vectors
513
- cp swift-crypto/Tests/CryptoTests/HPKE/hpke-test-vectors.json pack/swift-crypto_CryptoTests.resources
514
347
rm swift-nio/Tests/NIOFileSystemIntegrationTests/Test\ Data/*symlink
515
348
cp -r swift-nio/Tests/NIOFileSystemIntegrationTests/Test\ Data/ swift-nio/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift pack
516
- cp yams/Tests/YamsTests/Fixtures/SourceKitten#289/debug.yaml pack
517
349
cp ~/.${{ startsWith(matrix.os, 'ubuntu') && 'config/' || '' }}swiftpm/swift-sdks/${{ steps.version.outputs.tag }}-android-${ANDROID_API_LEVEL}-*.artifactbundle/swift*sdk/android*sysroot/usr/lib/x86_64-linux-android/lib*so pack
518
350
519
351
# need to free up some space or else the emulator fails to launch:
0 commit comments