Skip to content

Commit

Permalink
Test with multiple toolchain versions (#135)
Browse files Browse the repository at this point in the history
* Test for multiple version of toolchains

* Add `wasm-5.4.0-RELEASE` to `test.yml` workflow

* Test with 5.3.1 instead of 5.3.0

* Also test with macOS 11

* Test with Ubuntu 20.04

Co-authored-by: Max Desiatov <max@desiatov.com>
  • Loading branch information
kateinoigakukun and MaxDesiatov authored Sep 1, 2021
1 parent 7f41fb4 commit c5074e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ jobs:
name: Build and Test
strategy:
matrix:
os: [macOS-10.15, Ubuntu-18.04]
os: [macos-10.15, macos-11, ubuntu-18.04, ubuntu-20.04]
toolchain:
- wasm-5.3.1-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

0 comments on commit c5074e7

Please sign in to comment.