-
Notifications
You must be signed in to change notification settings - Fork 723
Fix the Android CI workflow by adding a post-install step the configure the SDK #3424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
ee8fbc9
7932b35
d99b7dd
1636b5d
987b251
cb85a53
eea2e71
41ffac1
082fca2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ version="${INSTALL_SWIFT_VERSION:=""}" | |
| arch="${INSTALL_SWIFT_ARCH:="aarch64"}" | ||
| os_image="${INSTALL_SWIFT_OS_IMAGE:="ubuntu22.04"}" | ||
| sdk="${INSTALL_SWIFT_SDK:="static-sdk"}" | ||
| android_ndk_version="${INSTALL_ANDROID_NDK:="r27d"}" | ||
|
|
||
| if [[ ! ( -n "$branch" && -z "$version" ) && ! ( -z "$branch" && -n "$version") ]]; then | ||
| fatal "Exactly one of build or version must be defined." | ||
|
|
@@ -127,3 +128,20 @@ swift --version | |
|
|
||
| log "Installing Swift SDK" | ||
| swift sdk install "$sdk_path" | ||
|
|
||
| log "Swift SDK Post-install" | ||
| if [[ "$sdk" == "android-sdk" ]]; then | ||
| # guess some common places where the swift-sdks folder lives | ||
| cd ~/Library/org.swift.swiftpm || cd ~/.config/swiftpm || cd ~/.local/swiftpm || cd ~/.swiftpm || cd /root/.swiftpm || exit 1 | ||
|
||
|
|
||
| # download and link the NDK | ||
| android_ndk_url="https://dl.google.com/android/repository/android-ndk-${android_ndk_version}-$(uname -s).zip" | ||
| log "Android Native Development Kit URL: ${android_ndk_url}" | ||
| "$CURL_BIN" -fsSL -o ndk.zip --retry 3 "${android_ndk_url}" | ||
| unzip -q ndk.zip | ||
marcprux marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| rm ndk.zip | ||
| export ANDROID_NDK_HOME="${PWD}/android-ndk-${android_ndk_version}" | ||
| bundledir=$(find . -type d -maxdepth 2 -name '*android*.artifactbundle' | head -n 1) | ||
| "${bundledir}"/swift-android/scripts/setup-android-sdk.sh | ||
| cd - || exit | ||
| fi | ||
Uh oh!
There was an error while loading. Please reload this page.