File tree Expand file tree Collapse file tree 3 files changed +43
-12
lines changed
swift-ci/sdks/android/scripts Expand file tree Collapse file tree 3 files changed +43
-12
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,29 @@ jobs:
48
48
- name : Build Android SDK
49
49
working-directory : swift-ci/sdks/android
50
50
run : |
51
- sudo apt install ninja-build
51
+ sudo apt -q install ninja-build
52
52
./build
53
53
#TARGET_ARCHS=${{ matrix.arch }} ./build
54
54
- name : Upload SDK artifactbundle
55
55
uses : actions/upload-artifact@v4
56
56
with :
57
57
compression-level : 0
58
58
path : $RUNNER_TEMP/swift-android-sdk/products/*.artifactbundle.tar.gz
59
+ - name : Install SDK Locally
60
+ run :
61
+ $RUNNER_TEMP/host-toolchain/*/usr/bin/swift sdk install $RUNNER_TEMP/swift-android-sdk/products/*.artifactbundle.tar.gz
62
+ - name : Build Demo Project
63
+ run : |
64
+ cd $RUNNER_TEMP
65
+ mkdir DemoProject
66
+ cd DemoProject
67
+ $RUNNER_TEMP/host-toolchain/*/usr/bin/swift package init
68
+ $RUNNER_TEMP/host-toolchain/*/usr/bin/swift build --build-tests --sdk --swift-sdk aarch64-unknown-linux-android28
69
+ - name : Test Swift Package on Android
70
+ # TODO: need to implement installed-sdk option in swift-android-action
71
+ if : false
72
+ uses : skiptools/swift-android-action@main
73
+ with :
74
+ package-path : $RUNNER_TEMP/DemoProject
75
+ installed-sdk : aarch64-unknown-linux-android28
59
76
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Swift SDK for Android: Build Script
3
- set -ex
3
+ set -e
4
4
5
5
# Docker sets TERM to xterm if using a pty; we probably want
6
6
# xterm-256color, otherwise we only get eight colors
@@ -37,7 +37,7 @@ function header {
37
37
function groupstart {
38
38
local text=" $1 "
39
39
if [[ ! -z " $CI " ]]; then
40
- echo " ::group::{ ${text} }"
40
+ echo " ::group::${text} "
41
41
fi
42
42
header $text
43
43
}
Original file line number Diff line number Diff line change @@ -34,6 +34,20 @@ function header {
34
34
echo " "
35
35
}
36
36
37
+ function groupstart {
38
+ local text=" $1 "
39
+ if [[ ! -z " $CI " ]]; then
40
+ echo " ::group::${text} "
41
+ fi
42
+ header $text
43
+ }
44
+
45
+ function groupend {
46
+ if [[ ! -z " $CI " ]]; then
47
+ echo " ::endgroup::"
48
+ fi
49
+ }
50
+
37
51
function usage {
38
52
cat << EOF
39
53
usage: fetch-source.sh [--swift-scheme <scheme>|--swift-tag <tag>
120
134
cd " $source_dir "
121
135
122
136
# Fetch Swift
123
- header " Fetching Swift"
124
-
125
137
mkdir -p swift-project
138
+
139
+ groupstart " Fetching Swift"
126
140
pushd swift-project > /dev/null
127
141
128
142
[[ -d swift ]] || git clone ${github} apple/swift.git
@@ -141,28 +155,28 @@ else
141
155
fi
142
156
143
157
popd > /dev/null
158
+ groupend
144
159
145
160
# Fetch libxml2
146
- header " Fetching libxml2"
147
-
161
+ groupstart " Fetching libxml2"
148
162
[[ -d libxml2 ]] || git clone ${github} GNOME/libxml2.git
149
163
pushd libxml2 > /dev/null 2>&1
150
164
git checkout v${LIBXML2_VERSION}
151
165
popd > /dev/null 2>&1
166
+ groupend
152
167
153
168
# Fetch curl
154
- header " Fetching curl"
155
-
156
- [[ -d curl ]] || git clone ${github} curl/curl.git
169
+ groupstart " Fetching curl"
157
170
pushd curl > /dev/null 2>&1
158
171
git checkout curl-$( echo ${CURL_VERSION} | tr ' .' ' _' )
159
172
popd > /dev/null 2>&1
173
+ groupend
160
174
161
175
# Fetch BoringSSL
162
- header " Fetching BoringSSL"
163
-
176
+ groupstart " Fetching BoringSSL"
164
177
[[ -d boringssl ]] || git clone https://boringssl.googlesource.com/boringssl
165
178
pushd boringssl > /dev/null 2>&1
166
179
git checkout ${BORINGSSL_VERSION}
167
180
popd > /dev/null 2>&1
181
+ groupend
168
182
You can’t perform that action at this time.
0 commit comments