Skip to content

Commit 877e5e3

Browse files
committed
Android SDK build
1 parent ddd2c4b commit 877e5e3

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/pull_request.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,29 @@ jobs:
5757
5858
# build arch specified by the matrix
5959
#TARGET_ARCHS=${{ matrix.arch }} ./build
60+
- name: Get artifact info
61+
id: paths
62+
run: |
63+
echo "swift-path=$(ls ${{ runner.temp }}/swift-android-sdk/host-toolchain/*/usr/bin/swift)" >> $GITHUB_OUTPUT
64+
echo "artifact-name=$(basename ${{ runner.temp }}/swift-android-sdk/products/*.artifactbundle.tar.gz)" >> $GITHUB_OUTPUT
65+
echo "artifact-path=$(realpath ${{ runner.temp }}/swift-android-sdk/products/*.artifactbundle.tar.gz)" >> $GITHUB_OUTPUT
6066
- name: Upload SDK artifactbundle
6167
uses: actions/upload-artifact@v4
6268
with:
6369
compression-level: 0
64-
path: ${{ runner.temp }}/swift-android-sdk/products/*.artifactbundle.tar.gz
70+
name: ${{ steps.paths.outputs.artifact-name }}
71+
path: ${{ steps.paths.outputs.artifact-path }}
6572
- name: Install SDK Locally
6673
run:
67-
$RUNNER_TEMP/swift-android-sdk/host-toolchain/*/usr/bin/swift sdk install $RUNNER_TEMP/swift-android-sdk/products/*.artifactbundle.tar.gz
74+
${{ steps.paths.outputs.swift-path }} sdk install ${{ steps.paths.outputs.artifact-path }}
6875
- name: Build Demo Project
6976
run: |
7077
cd $RUNNER_TEMP
7178
mkdir DemoProject
7279
cd DemoProject
73-
$RUNNER_TEMP/swift-android-sdk/host-toolchain/*/usr/bin/swift package init
74-
$RUNNER_TEMP/swift-android-sdk/host-toolchain/*/usr/bin/swift build --build-tests --sdk --swift-sdk aarch64-unknown-linux-android28
80+
${{ steps.paths.outputs.swift-path }} --version
81+
${{ steps.paths.outputs.swift-path }} package init
82+
${{ steps.paths.outputs.swift-path }} build --build-tests --sdk --swift-sdk x86_64-unknown-linux-android28
7583
- name: Test Swift Package on Android
7684
# TODO: need to implement installed-sdk option in swift-android-action
7785
if: false

0 commit comments

Comments
 (0)