@@ -57,21 +57,29 @@ jobs:
57
57
58
58
# build arch specified by the matrix
59
59
#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
60
66
- name : Upload SDK artifactbundle
61
67
uses : actions/upload-artifact@v4
62
68
with :
63
69
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 }}
65
72
- name : Install SDK Locally
66
73
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 }}
68
75
- name : Build Demo Project
69
76
run : |
70
77
cd $RUNNER_TEMP
71
78
mkdir DemoProject
72
79
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
75
83
- name : Test Swift Package on Android
76
84
# TODO: need to implement installed-sdk option in swift-android-action
77
85
if : false
0 commit comments