File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
Sources/NIOPerformanceTester Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,6 @@ jobs:
109109 name : Android Swift SDK
110110 # Workaround https://github.com/nektos/act/issues/1875
111111 uses : apple/swift-nio/.github/workflows/android_sdk.yml@main
112- with :
113- additional_command_arguments : " --target NIOCore"
114112
115113 release-builds :
116114 name : Release builds
Original file line number Diff line number Diff line change @@ -28,7 +28,12 @@ import NIOCore
2828import NIOEmbedded
2929import NIOFoundationCompat
3030import NIOHTTP1
31+ #if os(Android)
32+ // workaround for error: reference to var 'stdout' is not concurrency-safe because it involves shared mutable state
33+ @preconcurrency import NIOPosix
34+ #else
3135import NIOPosix
36+ #endif
3237import NIOWebSocket
3338
3439// Use unbuffered stdout to help detect exactly which test was running in the event of a crash.
Original file line number Diff line number Diff line change @@ -127,3 +127,18 @@ swift --version
127127
128128log " Installing Swift SDK"
129129swift sdk install " $sdk_path "
130+
131+ if [[ " $sdk " == " android-sdk" ]]; then
132+ log " Swift SDK Post-install"
133+ # guess some common places where the swift-sdks file lives
134+ cd ~ /Library/org.swift.swiftpm || cd ~ /.config/swiftpm || cd ~ /.local/swiftpm || cd ~ /.swiftpm || cd /root/.swiftpm
135+
136+ # download and link the NDK
137+ local android_ndk_version=" r27d"
138+ curl -fsSL -o ndk.zip --retry 3 " https://dl.google.com/android/repository/android-ndk-${android_ndk_version} -$( uname -s) .zip"
139+ unzip -q ndk.zip
140+ rm ndk.zip
141+ export ANDROID_NDK_HOME=" ${PWD} /android-ndk-${android_ndk_version} "
142+ ./swift-sdks/* android* .artifactbundle/swift-android/scripts/setup-android-sdk.sh
143+ cd -
144+ fi
You can’t perform that action at this time.
0 commit comments