Skip to content

Commit 34ae290

Browse files
committed
Update CI
1 parent c441f05 commit 34ae290

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/scripts/install-and-build-with-sdk.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ while [[ $# -gt 0 ]]; do
3232
INSTALL_ANDROID=true
3333
shift
3434
;;
35+
--android-sdk=*)
36+
ANDROID_SDK_NAME="${1#*=}"
37+
shift
38+
;;
3539
--static)
3640
INSTALL_STATIC_LINUX=true
3741
shift
@@ -637,12 +641,12 @@ build() {
637641
if [[ "$INSTALL_ANDROID" == true ]]; then
638642
log "Running Swift build with Android Swift SDK"
639643

640-
# FIXME: we will be changing the name in the next nightly
644+
# FIXME: we will be trimming "-0.1" from the name in the next nightly
641645
local sdk_name="${ANDROID_SDK_TAG}-android-0.1"
642646
#local sdk_name="${ANDROID_SDK_TAG}_android"
643647

644648
alias swift='$SWIFT_EXECUTABLE_FOR_ANDROID_SDK'
645-
local build_command="$SWIFT_BUILD_COMMAND --swift-sdk $sdk_name"
649+
local build_command="$SWIFT_BUILD_COMMAND --swift-sdk ${ANDROID_SDK_NAME:-$sdk_name}"
646650
if [[ -n "$SWIFT_BUILD_FLAGS" ]]; then
647651
build_command="$build_command $SWIFT_BUILD_FLAGS"
648652
fi

.github/workflows/test-sdks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
timeout-minutes: 60
2020
steps:
2121
- name: Create Package
22-
run: swift package init --name SwiftDemo
22+
run: swift package init --name hello --type executable
2323
- name: Build Android
2424
run: |
2525
curl -s --retry 3 https://raw.githubusercontent.com/swift-android-sdk/github-workflows/refs/heads/android-workflow/.github/workflows/scripts/install-and-build-with-sdk.sh | \
26-
bash -s -- --android --flags="$BUILD_FLAGS" ${{ matrix.swift_version }}
26+
bash -s -- --android --flags="$BUILD_FLAGS" --android-sdk=aarch64-unknown-linux-android28 ${{ matrix.swift_version }}
2727
- name: Check Binary
2828
run: file .build/debug/hello
2929

0 commit comments

Comments
 (0)