@@ -46,17 +46,12 @@ jobs:
46
46
steps :
47
47
- name : Checkout repository
48
48
uses : actions/checkout@v4
49
+ - name : Install Dependencies
50
+ run : |
51
+ sudo apt install -q ninja-build patchelf
49
52
- name : Build Android SDK
50
53
working-directory : swift-ci/sdks/android
51
54
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
60
55
TARGET_ARCHS=${{ matrix.arch }} ./build
61
56
- name : Get artifact info
62
57
id : paths
69
64
echo "artifact-path=${ARTIFACT_PATH}" >> $GITHUB_OUTPUT
70
65
71
66
ARTIFACT_EXT=".artifactbundle.tar.gz"
72
- ARTIFACT_NAME=$(basename ${ARTIFACT_PATH} ${ARTIFACT_EXT})"
67
+ ARTIFACT_NAME=" $(basename ${ARTIFACT_PATH} ${ARTIFACT_EXT})"
73
68
# artifacts need a unique name so we suffix with the matrix arch(s)
74
69
if [[ ! -z "${{ matrix.arch }}" ]]; then
75
70
ARTIFACT_NAME="${ARTIFACT_NAME}-$(echo ${{ matrix.arch }} | tr ',' '-')"
@@ -93,13 +88,39 @@ jobs:
93
88
run : |
94
89
# need to free up some space or else when installing we get: No space left on device
95
90
rm -rf ${{ runner.temp }}/swift-android-sdk/{build,src}
96
- - name : Install SDK
91
+ - name : Install artifactbundle
92
+ shell : bash
97
93
run : |
94
+ set -ex
98
95
${{ steps.paths.outputs.swift-path }} sdk install ${{ steps.paths.outputs.artifact-path }}
99
96
${{ steps.paths.outputs.swift-path }} sdk configure --show-configuration $(${{ steps.paths.outputs.swift-path }} sdk list | head -n 1) x86_64-unknown-linux-android28
100
97
# recent releases require that ANDROID_NDK_ROOT *not* be set
101
98
# see https://github.com/finagolfin/swift-android-sdk/issues/207
102
99
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
103
124
- name : Build Demo Project
104
125
run : |
105
126
cd ${{ runner.temp }}
@@ -114,6 +135,12 @@ jobs:
114
135
echo 'import Dispatch' >> Sources/DemoProject/DemoProject.swift
115
136
echo 'import Android' >> Sources/DemoProject/DemoProject.swift
116
137
${{ 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 }}
117
144
- name : Build swift-algorithms
118
145
run : |
119
146
cd ${{ runner.temp }}
0 commit comments