Skip to content
10 changes: 8 additions & 2 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest] # ubuntu-latest is not working at the moment
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- expected-version: 5.9-dev

- os: ubuntu-latest
expected-version: 5.10

name: Test Swift toolchain install on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -23,4 +28,5 @@ jobs:
tag: DEVELOPMENT-SNAPSHOT-2023-05-20-a

- name: check swift version
run: swift --version
run: swift --version && swift --version | grep -q 'version ${{ matrix.expected-version }} '
shell: bash
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ runs:
if [[ "${{ steps.validation.outputs.use_custom_url }}" == "1" ]]; then
mv "${{ inputs.release-asset-name }}" swift-toolchain.tar.gz
else
curl -sL https://download.swift.org/${{ inputs.branch }}/ubuntu${release/./}/swift-${{ inputs.tag }}/swift-${{ inputs.tag }}-ubuntu${release}.tar.gz -o swift-toolchain.tar.gz
curl -sL https://download.swift.org/${{ inputs.branch }}/ubuntu${VERSION_ID/./}/swift-${{ inputs.tag }}/swift-${{ inputs.tag }}-ubuntu${VERSION_ID}.tar.gz -o swift-toolchain.tar.gz
fi
tar zxf swift-toolchain.tar.gz -C ${HOME}
rm -f swift-toolchain.tar.gz
Expand Down Expand Up @@ -285,5 +285,5 @@ runs:
installer -pkg swift-${{ inputs.tag }}-osx.pkg -target CurrentUserHomeDirectory
rm -f swift-${{ inputs.tag }}-osx.pkg

echo "TOOLCHAINS=$(plutil -extract 'CFBundleIdentifier' xml1 ${HOME}/Library/Developer/Toolchains/swift-${{ inputs.tag }}.xctoolchain/Info.plist | xmllint --xpath '//plist/string/text()' -)" >> $GITHUB_ENV
echo "TOOLCHAINS=$(plutil -convert swift ${HOME}/Library/Developer/Toolchains/swift-${{ inputs.tag }}.xctoolchain/Info.plist -o - | grep '"org.swift.' | sed -E -e 's/.*"(org.swift[^"]*)".*/\1/')" >> $GITHUB_ENV
Comment thread
dabrahams marked this conversation as resolved.
Outdated
shell: bash