Skip to content

Commit c5074e7

Browse files
kateinoigakukunMaxDesiatov
andauthoredSep 1, 2021
Test with multiple toolchain versions (#135)
* 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>
1 parent 7f41fb4 commit c5074e7

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed
 

Diff for: ‎.github/workflows/test.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ jobs:
88
name: Build and Test
99
strategy:
1010
matrix:
11-
os: [macOS-10.15, Ubuntu-18.04]
11+
os: [macos-10.15, macos-11, ubuntu-18.04, ubuntu-20.04]
12+
toolchain:
13+
- wasm-5.3.1-RELEASE
14+
- wasm-5.4.0-RELEASE
1215
runs-on: ${{ matrix.os }}
1316
steps:
1417
- name: Checkout
@@ -21,5 +24,6 @@ jobs:
2124
export SWIFTENV_ROOT="$HOME/.swiftenv"
2225
export PATH="$SWIFTENV_ROOT/bin:$PATH"
2326
eval "$(swiftenv init -)"
24-
make bootstrap
27+
SWIFT_VERSION=${{ matrix.toolchain }} make bootstrap
28+
echo ${{ matrix.toolchain }} > .swift-version
2529
make test

Diff for: ‎scripts/install-toolchain.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ set -eu
33

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

6-
swift_version="$(cat $scripts_dir/../.swift-version)"
7-
swift_tag="swift-$swift_version"
6+
default_swift_version="$(cat $scripts_dir/../.swift-version)"
7+
SWIFT_VERSION="${SWIFT_VERSION:-$default_swift_version}"
8+
swift_tag="swift-$SWIFT_VERSION"
89

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

14-
if [ ! -z "$(swiftenv versions | grep $swift_version)" ]; then
15-
echo "$swift_version is already installed."
15+
if [ ! -z "$(swiftenv versions | grep $SWIFT_VERSION)" ]; then
16+
echo "$SWIFT_VERSION is already installed."
1617
exit 0
1718
fi
1819

0 commit comments

Comments
 (0)
Please sign in to comment.