File tree Expand file tree Collapse file tree 3 files changed +42
-8
lines changed Expand file tree Collapse file tree 3 files changed +42
-8
lines changed Original file line number Diff line number Diff line change 66 strategy :
77 matrix :
88 os : [macOS-10.15, Ubuntu-18.04]
9- include :
10- - os : macOS-10.15
11- toolchain : https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.3-SNAPSHOT-2020-08-10-a/swift-wasm-5.3-SNAPSHOT-2020-08-10-a-osx.tar.gz
12- - os : Ubuntu-18.04
13- toolchain : https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.3-SNAPSHOT-2020-08-10-a/swift-wasm-5.3-SNAPSHOT-2020-08-10-a-linux.tar.gz
149 runs-on : ${{ matrix.os }}
1510 steps :
1611 - name : Checkout
2318 export SWIFTENV_ROOT="$HOME/.swiftenv"
2419 export PATH="$SWIFTENV_ROOT/bin:$PATH"
2520 eval "$(swiftenv init -)"
26- swiftenv install $TOOLCHAIN_DOWNLOAD
2721 make bootstrap
2822 make test
29- env :
30- TOOLCHAIN_DOWNLOAD : ${{ matrix.toolchain }}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
22
33.PHONY : bootstrap
44bootstrap :
5+ ./scripts/install-toolchain.sh
56 npm install
67
78.PHONY : build
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -eu
3+
4+ scripts_dir=" $( cd " $( dirname $0 ) " && pwd) "
5+
6+ swift_version=" $( cat $scripts_dir /../.swift-version) "
7+ swift_tag=" swift-$swift_version "
8+
9+ if [ -z " $( which swiftenv) " ]; then
10+ echo " swiftenv not installed, please install it before this script."
11+ exit 1
12+ fi
13+
14+ if [ ! -z " $( swiftenv versions | grep $swift_version ) " ]; then
15+ echo " $swift_version is already installed."
16+ exit 0
17+ fi
18+
19+ case $( uname -s) in
20+ Darwin)
21+ toolchain_download=" $swift_tag -osx.tar.gz"
22+ ;;
23+ Linux)
24+ if [ $( grep RELEASE /etc/lsb-release) == " DISTRIB_RELEASE=18.04" ]; then
25+ toolchain_download=" $swift_tag -ubuntu18.04.tar.gz"
26+ elif [ $( grep RELEASE /etc/lsb-release) == " DISTRIB_RELEASE=20.04" ]; then
27+ toolchain_download=" $swift_tag -ubuntu20.04.tar.gz"
28+ else
29+ echo " Unknown Ubuntu version"
30+ exit 1
31+ fi
32+ ;;
33+ * )
34+ echo " Unrecognised platform $( uname -s) "
35+ exit 1
36+ ;;
37+ esac
38+
39+ toolchain_download_url=" https://github.com/swiftwasm/swift/releases/download/$swift_tag /$toolchain_download "
40+
41+ swiftenv install " $toolchain_download_url "
You can’t perform that action at this time.
0 commit comments