@@ -46,17 +46,12 @@ jobs:
4646 steps :
4747 - name : Checkout repository
4848 uses : actions/checkout@v4
49+ - name : Install Dependencies
50+ run : |
51+ sudo apt install -q ninja-build patchelf
4952 - name : Build Android SDK
5053 working-directory : swift-ci/sdks/android
5154 run : |
52- sudo apt install -q ninja-build patchelf
53- # build all architectures
54- #./build
55-
56- # just build x86_64 for testing
57- #TARGET_ARCHS=x86_64 ./build
58-
59- # build arch specified by the matrix
6055 TARGET_ARCHS=${{ matrix.arch }} ./build
6156 - name : Get artifact info
6257 id : paths
6964 echo "artifact-path=${ARTIFACT_PATH}" >> $GITHUB_OUTPUT
7065
7166 ARTIFACT_EXT=".artifactbundle.tar.gz"
72- ARTIFACT_NAME=$(basename ${ARTIFACT_PATH} ${ARTIFACT_EXT})"
67+ ARTIFACT_NAME=" $(basename ${ARTIFACT_PATH} ${ARTIFACT_EXT})"
7368 # artifacts need a unique name so we suffix with the matrix arch(s)
7469 if [[ ! -z "${{ matrix.arch }}" ]]; then
7570 ARTIFACT_NAME="${ARTIFACT_NAME}-$(echo ${{ matrix.arch }} | tr ',' '-')"
@@ -93,13 +88,39 @@ jobs:
9388 run : |
9489 # need to free up some space or else when installing we get: No space left on device
9590 rm -rf ${{ runner.temp }}/swift-android-sdk/{build,src}
96- - name : Install SDK
91+ - name : Install artifactbundle
92+ shell : bash
9793 run : |
94+ set -ex
9895 ${{ steps.paths.outputs.swift-path }} sdk install ${{ steps.paths.outputs.artifact-path }}
9996 ${{ steps.paths.outputs.swift-path }} sdk configure --show-configuration $(${{ steps.paths.outputs.swift-path }} sdk list | head -n 1) x86_64-unknown-linux-android28
10097 # recent releases require that ANDROID_NDK_ROOT *not* be set
10198 # see https://github.com/finagolfin/swift-android-sdk/issues/207
10299 echo "ANDROID_NDK_ROOT=" >> $GITHUB_ENV
100+
101+ # validate some required paths in the artifactbundle
102+ cd ${HOME}/.config/swiftpm/swift-sdks/*.artifactbundle/*/*/usr
103+ pwd
104+
105+ ls lib/swift/android
106+ ls lib/swift/android/*
107+ ls lib/swift/android/*/swiftrt.o
108+ ls lib/*-linux-android/*/crtbegin_dynamic.o
109+
110+ ls lib/swift_static-*
111+ ls lib/swift_static-*/android
112+ ls lib/swift_static-*/android/libFoundationEssentials.a
113+
114+ ls lib/*-linux-android/libFoundationEssentials.so
115+ ls lib/*-linux-android/libFoundationNetworking.so
116+ ls lib/*-linux-android/libFoundationInternationalization.so
117+ ls lib/*-linux-android/lib_FoundationICU.so
118+ ls lib/*-linux-android/libFoundationXML.so
119+ ls lib/*-linux-android/libTesting.so
120+
121+ ls lib/swift/clang/lib
122+ ls lib/swift/clang/lib/linux
123+ ls lib/swift/clang/lib/linux/*/libunwind.a
103124 - name : Build Demo Project
104125 run : |
105126 cd ${{ runner.temp }}
@@ -114,6 +135,12 @@ jobs:
114135 echo 'import Dispatch' >> Sources/DemoProject/DemoProject.swift
115136 echo 'import Android' >> Sources/DemoProject/DemoProject.swift
116137 ${{ steps.paths.outputs.swift-path }} build --build-tests --swift-sdk x86_64-unknown-linux-android28
138+ - name : Test Demo Project on Android
139+ uses : skiptools/swift-android-action@main
140+ with :
141+ package-path : ${{ runner.temp }}/DemoProject
142+ installed-sdk : x86_64-unknown-linux-android28
143+ installed-swift : ${{ steps.paths.outputs.swift-root }}
117144 - name : Build swift-algorithms
118145 run : |
119146 cd ${{ runner.temp }}
0 commit comments