Skip to content

Commit cb85a53

Browse files
committed
Cleanup NDK install section of script
1 parent 987b251 commit cb85a53

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/workflows/android_sdk.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
fi
3939
4040
# Generate matrix with parsed environment variables
41-
# FIXME: move script back from swift-android-sdk repo to swift-nio
4241
cat >> "$GITHUB_OUTPUT" << EOM
4342
android-sdk-matrix=$(echo '{
4443
"config":[
@@ -48,7 +47,7 @@ jobs:
4847
"platform":"Linux",
4948
"runner":"ubuntu-latest",
5049
"image":"ubuntu:jammy",
51-
"setup_command":"apt update -q && apt install -y -q curl jq tar && curl -s --retry 3 https://raw.githubusercontent.com/apple/swift-nio/main/scripts/install_swift_prerequisites.sh | bash && curl -s --retry 3 https://raw.githubusercontent.com/swift-android-sdk/swift-nio/main/scripts/install_swift_sdk.sh | INSTALL_SWIFT_BRANCH=main INSTALL_SWIFT_ARCH=x86_64 INSTALL_SWIFT_SDK=android-sdk bash && hash -r",
50+
"setup_command":"apt update -q && apt install -y -q curl jq tar && curl -s --retry 3 https://raw.githubusercontent.com/apple/swift-nio/main/scripts/install_swift_prerequisites.sh | bash && curl -s --retry 3 https://raw.githubusercontent.com/apple/swift-nio/main/scripts/install_swift_sdk.sh | INSTALL_SWIFT_BRANCH=main INSTALL_SWIFT_ARCH=x86_64 INSTALL_SWIFT_SDK=android-sdk bash && hash -r",
5251
"command":"curl -s --retry 3 https://raw.githubusercontent.com/apple/swift-nio/main/scripts/swift-build-with-android-sdk.sh | bash -s --",
5352
"command_arguments":"${{ inputs.additional_command_arguments }}",
5453
"env":'"$env_vars_json"'

.github/workflows/pull_request.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ jobs:
108108
android-sdk:
109109
name: Android Swift SDK
110110
# Workaround https://github.com/nektos/act/issues/1875
111-
uses: swift-android-sdk/swift-nio/.github/workflows/android_sdk.yml@main
112-
# FIXME: restore this from swift-android-sdk to apple
113-
#uses: apple/swift-nio/.github/workflows/android_sdk.yml@main
111+
uses: apple/swift-nio/.github/workflows/android_sdk.yml@main
114112

115113
release-builds:
116114
name: Release builds

scripts/install_swift_sdk.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,14 @@ swift sdk install "$sdk_path"
130130

131131
log "Swift SDK Post-install"
132132
if [[ "$sdk" == "android-sdk" ]]; then
133-
# guess some common places where the swift-sdks file lives
133+
# guess some common places where the swift-sdks folder lives
134134
cd ~/Library/org.swift.swiftpm || cd ~/.config/swiftpm || cd ~/.local/swiftpm || cd ~/.swiftpm || cd /root/.swiftpm || exit 1
135135

136136
# download and link the NDK
137137
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"
138+
android_ndk_url="https://dl.google.com/android/repository/android-ndk-${android_ndk_version}-$(uname -s).zip"
139+
log "Android Native Development Kit URL: ${android_ndk_url}"
140+
curl -fsSL -o ndk.zip --retry 3 "${android_ndk_url}"
139141
unzip -q ndk.zip
140142
rm ndk.zip
141143
export ANDROID_NDK_HOME="${PWD}/android-ndk-${android_ndk_version}"

0 commit comments

Comments
 (0)