-
Notifications
You must be signed in to change notification settings - Fork 14
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
Put together SDK bundles on the CI #180
Conversation
0ec1a7a
to
c59c233
Compare
Dumb question – how will the SDK bundle (if it’s a Swift SDK?) know where the NDK is installed? |
I'm bundling the NDK sysroot with this SDK bundle, so you will no longer have to download the NDK separately. 😃 That cross-compiles fine for me locally on linux, but I will run it through the CI here to make sure it works well before releasing. |
1d0d2dc
to
fb8cdc2
Compare
2c837e7
to
0af3cae
Compare
Employ the latest SwiftPM destination config format too when testing single-arch SDKs before assembling the bundle.
- name: Get cached SDK bundle | ||
id: cache-bundle | ||
uses: actions/cache@v4 | ||
if: ${{ matrix.version != 'trunk' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing strange errors when trying to build packages with the new trunk 6.1 SDK bundle, so I'm disabling using it on the CI until that's fixed.
cp sdk-config/swift-*-android-x86_64-*${ANDROID_API_LEVEL}-sdk/usr/lib/swift/android/lib*so pack | ||
else | ||
cp ~/.${{ startsWith(matrix.os, 'ubuntu') && 'config/' || '' }}swiftpm/swift-sdks/${{ steps.version.outputs.tag }}-android-${ANDROID_API_LEVEL}-*.artifactbundle/swift*sdk/android*sysroot/usr/lib/$(echo ${{ matrix.arch }} | sed "s/v7//")-linux-android*/${ANDROID_API_LEVEL}/lib*so pack | ||
rm pack/lib{c,dl,log,m}.so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcprux, these are stub libraries provided by the NDK just for linking, so I remove them so the Swift SDK libraries don't use them by mistake instead when running on the emulator.
There is also a stub libz.so
which collides with the Termux libz.so
you recently added, so I put the latter in it's own termux-zlib/
directory in the SDK bundle below.
Since that is only needed when running the Foundation{Networking,XML}
libraries, which I don't test on the CI, I don't bother with libz.so
here, but you will have to also throw out that stub and use the Termux one if testing these extra Foundation libraries.
I experimented a bit with getting executables linked with the static stdlib also.