Skip to content

Test with multiple toolchain versions #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
strategy:
matrix:
os: [macOS-10.15, Ubuntu-18.04]
toolchain:
- wasm-5.3.0-RELEASE
- wasm-5.4.0-RELEASE
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -21,5 +24,6 @@ jobs:
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$PATH"
eval "$(swiftenv init -)"
make bootstrap
SWIFT_VERSION=${{ matrix.toolchain }} make bootstrap
echo ${{ matrix.toolchain }} > .swift-version
make test
9 changes: 5 additions & 4 deletions scripts/install-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ set -eu

scripts_dir="$(cd "$(dirname $0)" && pwd)"

swift_version="$(cat $scripts_dir/../.swift-version)"
swift_tag="swift-$swift_version"
default_swift_version="$(cat $scripts_dir/../.swift-version)"
SWIFT_VERSION="${SWIFT_VERSION:-$default_swift_version}"
swift_tag="swift-$SWIFT_VERSION"

if [ -z "$(which swiftenv)" ]; then
echo "swiftenv not installed, please install it before this script."
exit 1
fi

if [ ! -z "$(swiftenv versions | grep $swift_version)" ]; then
echo "$swift_version is already installed."
if [ ! -z "$(swiftenv versions | grep $SWIFT_VERSION)" ]; then
echo "$SWIFT_VERSION is already installed."
exit 0
fi

Expand Down