Update install-and-build-with-sdk.sh to use actual NDK location#280
Update install-and-build-with-sdk.sh to use actual NDK location#280finagolfin wants to merge 4 commits into
Conversation
| alias swift='$SWIFT_EXECUTABLE_FOR_ANDROID_SDK' | ||
|
|
||
|
|
||
| log "Using NDK at $ANDROID_NDK_HOME" |
There was a problem hiding this comment.
@jakepetroules, swift-build is not using this environment variable properly on the GitHub CI, where it is correctly set to 28c before the build starts, but the internal compile shows it using NDK 27 instead. I tried setting it in $GITHUB_ENV also in the next line, but that made no difference.
This is why I pushed to not have these flaky env vars be the primary way we configure the NDK for SwiftPM, and to always notify the user that the env var is being used and with which NDK path.
Let me know if you have any idea about this bug.
There was a problem hiding this comment.
Swift Build checks both ANDROID_NDK_ROOT and ANDROID_NDK_HOME, with the first taking precedence. Since GitHub Actions sets both, _ROOT is pointing to 27 still.
Go ahead and update GitHub actions to set both variables.
It's probably a good idea to emit a diagnostic in Swift Build if those two are set to different values.
There was a problem hiding this comment.
Yep, that was it, will clean this up and submit as a workaround for now.
swiftlang/swift-testing#1745 showed that the updated NDK env var isn't being read on CI, see if it is set.