@@ -312,15 +312,15 @@ runs:
312
312
# Swift Android SDK 6.2+ targets API 28+
313
313
SWIFT_SDK_ANROID_API="28"
314
314
# 6.2+ no longer includes the API in the artifactbundle name
315
- # it also uses an underscore instead of a dash before "android"
316
- SWIFT_SDK_ID="${SWIFT_SDK_ID}_android-${SWIFT_SDK_VERSION}"
315
+ SWIFT_SDK_ID="${SWIFT_SDK_ID}-android-${SWIFT_SDK_VERSION}"
317
316
fi
318
317
ANDROID_SDK_URL="https://github.com/skiptools/swift-android-toolchain/releases/download/${{ steps.setup.outputs.swift-version }}/${SWIFT_SDK_ID}.artifactbundle.tar.gz"
319
318
320
319
echo "ANDROID_SDK_URL: ${ANDROID_SDK_URL}"
321
320
curl -fsSL --retry 8 --retry-connrefused ${ANDROID_SDK_URL} --output ${SWIFT_SDK_ID}.artifactbundle.tar.gz
322
321
323
- SWIFT_SDK_TARGET="${{ steps.setup.outputs.android-sdk-arch }}-unknown-linux-android${SWIFT_SDK_ANROID_API}"
322
+ SWIFT_SDK_ARCH=${{ steps.setup.outputs.android-sdk-arch }}"
323
+ SWIFT_SDK_TARGET="${SWIFT_SDK_ARCH}-unknown-linux-android${SWIFT_SDK_ANROID_API}"
324
324
echo "SWIFT_SDK_TARGET=${SWIFT_SDK_TARGET}" >> $GITHUB_ENV
325
325
326
326
# first check if it already installed (we may be running this workflow multiple times for an action, in which case it will already be present)
@@ -342,7 +342,9 @@ runs:
342
342
echo "SWIFT_ARTIFACTBUNDLE_SDK_ROOT_PATH=${SWIFT_ARTIFACTBUNDLE_SDK_ROOT_PATH}" >> $GITHUB_ENV
343
343
344
344
# extract the swiftResourcesPath from the swift-sdk.json
345
- SWIFT_RESOURCES_ROOT_PATH=$(cat ${SWIFT_ARTIFACTBUNDLE_ROOT}/swift-sdk.json | jq -r '.targetTriples[] | .swiftResourcesPath' | head -n 1)
345
+ # note that we need to use the right path for the architecure;
346
+ # we use a crude grep pattern for SWIFT_SDK_ARCH
347
+ SWIFT_RESOURCES_ROOT_PATH=$(cat ${SWIFT_ARTIFACTBUNDLE_ROOT}/swift-sdk.json | jq -r '.targetTriples[] | .swiftResourcesPath' | grep "${SWIFT_SDK_ARCH}" | head -n 1)
346
348
SWIFT_ARTIFACTBUNDLE_RESOURCES_ROOT_PATH="${SWIFT_ARTIFACTBUNDLE_ROOT}/${SWIFT_RESOURCES_ROOT_PATH}"
347
349
348
350
echo "SWIFT_ARTIFACTBUNDLE_RESOURCES_ROOT_PATH=${SWIFT_ARTIFACTBUNDLE_RESOURCES_ROOT_PATH}" >> $GITHUB_ENV
0 commit comments