@@ -67,12 +67,21 @@ jobs:
67
67
ARTIFACT_PATH=$(realpath ${{ runner.temp }}/swift-android-sdk/products/*.artifactbundle.tar.gz)
68
68
echo "artifact-path=${ARTIFACT_PATH}" >> $GITHUB_OUTPUT
69
69
70
+ ARTIFACT_EXT=".artifactbundle.tar.gz"
71
+ ARTIFACT_NAME=$(basename ${ARTIFACT_PATH} ${ARTIFACT_EXT})"
70
72
# artifacts need a unique name so we suffix with the matrix arch(s)
71
- ARTIFACT_SUFFIX=""
72
73
if [[ ! -z "${{ matrix.arch }}" ]]; then
73
- ARTIFACT_SUFFIX="-$ {{ matrix.arch }}"
74
+ ARTIFACT_NAME="${ARTIFACT_NAME}-$(echo $ {{ matrix.arch }} | tr ',' '-') "
74
75
fi
75
- echo "artifact-name=$(basename ${ARTIFACT_PATH} .tar.gz)${ARTIFACT_SUFFIX}.tar.gz" >> $GITHUB_OUTPUT
76
+ ARTIFACT_NAME="${ARTIFACT_NAME}${ARTIFACT_EXT}"
77
+
78
+ # There is no way to prevent even a single-file artifact from being zipped:
79
+ # https://github.com/actions/upload-artifact?tab=readme-ov-file#zip-archives
80
+ # so we tack ".zip" on to the end of the name
81
+ ARTIFACT_NAME="${ARTIFACT_NAME}.zip"
82
+
83
+ # e.g.: swift-6.1-RELEASE_android-0.1-x86_64.artifactbundle.tar.gz
84
+ echo "artifact-name=${ARTIFACT_NAME}" >> $GITHUB_OUTPUT
76
85
- name : Upload SDK artifactbundle
77
86
uses : actions/upload-artifact@v4
78
87
with :
90
99
# recent releases require that ANDROID_NDK_ROOT *not* be set
91
100
# see https://github.com/finagolfin/swift-android-sdk/issues/207
92
101
echo "ANDROID_NDK_ROOT=" >> $GITHUB_ENV
93
- - name : Build swift-algorithms
94
- run : |
95
- cd ${{ runner.temp }}
96
- git clone https://github.com/apple/swift-algorithms.git
97
- cd swift-algorithms
98
- ${{ steps.paths.outputs.swift-path }} build --build-tests --swift-sdk x86_64-unknown-linux-android28
99
- - name : Test swift-algorithms on Android
100
- uses : skiptools/swift-android-action@main
101
- with :
102
- # package-path: ${{ runner.temp }}/DemoProject
103
- package-path : ${{ runner.temp }}/swift-algorithms
104
- installed-sdk : x86_64-unknown-linux-android28
105
- installed-swift : ${{ steps.paths.outputs.swift-root }}
106
102
- name : Build Demo Project
107
- if : false
108
103
run : |
109
104
cd ${{ runner.temp }}
110
105
mkdir DemoProject
@@ -118,3 +113,16 @@ jobs:
118
113
echo 'import Dispatch' >> Sources/DemoProject/DemoProject.swift
119
114
echo 'import Android' >> Sources/DemoProject/DemoProject.swift
120
115
${{ steps.paths.outputs.swift-path }} build --build-tests --swift-sdk x86_64-unknown-linux-android28
116
+ - name : Build swift-algorithms
117
+ run : |
118
+ cd ${{ runner.temp }}
119
+ git clone https://github.com/apple/swift-algorithms.git
120
+ cd swift-algorithms
121
+ ${{ steps.paths.outputs.swift-path }} build --build-tests --swift-sdk x86_64-unknown-linux-android28
122
+ - name : Test swift-algorithms on Android
123
+ uses : skiptools/swift-android-action@main
124
+ with :
125
+ # package-path: ${{ runner.temp }}/DemoProject
126
+ package-path : ${{ runner.temp }}/swift-algorithms
127
+ installed-sdk : x86_64-unknown-linux-android28
128
+ installed-swift : ${{ steps.paths.outputs.swift-root }}
0 commit comments