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:
4848 - name : Build Android SDK
4949 working-directory : swift-ci/sdks/android
5050 run : |
51- sudo apt install ninja-build
51+ sudo apt -q install ninja-build
5252 ./build
5353 #TARGET_ARCHS=${{ matrix.arch }} ./build
5454 - name : Upload SDK artifactbundle
5555 uses : actions/upload-artifact@v4
5656 with :
5757 compression-level : 0
5858 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
5976
Original file line number Diff line number Diff line change 11#! /bin/bash
22# Swift SDK for Android: Build Script
3- set -ex
3+ set -e
44
55# Docker sets TERM to xterm if using a pty; we probably want
66# xterm-256color, otherwise we only get eight colors
@@ -37,7 +37,7 @@ function header {
3737function groupstart {
3838 local text=" $1 "
3939 if [[ ! -z " $CI " ]]; then
40- echo " ::group::{ ${text} }"
40+ echo " ::group::${text} "
4141 fi
4242 header $text
4343}
Original file line number Diff line number Diff line change @@ -34,6 +34,20 @@ function header {
3434 echo " "
3535}
3636
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+
3751function usage {
3852 cat << EOF
3953usage: fetch-source.sh [--swift-scheme <scheme>|--swift-tag <tag>
120134cd " $source_dir "
121135
122136# Fetch Swift
123- header " Fetching Swift"
124-
125137mkdir -p swift-project
138+
139+ groupstart " Fetching Swift"
126140pushd swift-project > /dev/null
127141
128142[[ -d swift ]] || git clone ${github} apple/swift.git
@@ -141,28 +155,28 @@ else
141155fi
142156
143157popd > /dev/null
158+ groupend
144159
145160# Fetch libxml2
146- header " Fetching libxml2"
147-
161+ groupstart " Fetching libxml2"
148162[[ -d libxml2 ]] || git clone ${github} GNOME/libxml2.git
149163pushd libxml2 > /dev/null 2>&1
150164git checkout v${LIBXML2_VERSION}
151165popd > /dev/null 2>&1
166+ groupend
152167
153168# Fetch curl
154- header " Fetching curl"
155-
156- [[ -d curl ]] || git clone ${github} curl/curl.git
169+ groupstart " Fetching curl"
157170pushd curl > /dev/null 2>&1
158171git checkout curl-$( echo ${CURL_VERSION} | tr ' .' ' _' )
159172popd > /dev/null 2>&1
173+ groupend
160174
161175# Fetch BoringSSL
162- header " Fetching BoringSSL"
163-
176+ groupstart " Fetching BoringSSL"
164177[[ -d boringssl ]] || git clone https://boringssl.googlesource.com/boringssl
165178pushd boringssl > /dev/null 2>&1
166179git checkout ${BORINGSSL_VERSION}
167180popd > /dev/null 2>&1
181+ groupend
168182
You can’t perform that action at this time.
0 commit comments