File tree Expand file tree Collapse file tree 4 files changed +44
-0
lines changed Expand file tree Collapse file tree 4 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1616 export SWIFTENV_ROOT="$HOME/.swiftenv"
1717 export PATH="$SWIFTENV_ROOT/bin:$PATH"
1818 eval "$(swiftenv init -)"
19+ ./scripts/install-toolchain.sh
1920 swiftenv install $TOOLCHAIN_DOWNLOAD
2021 make perf-tester
2122 node ci/perf-tester
Original file line number Diff line number Diff line change 2323 export SWIFTENV_ROOT="$HOME/.swiftenv"
2424 export PATH="$SWIFTENV_ROOT/bin:$PATH"
2525 eval "$(swiftenv init -)"
26+ ./scripts/install-toolchain.sh
2627 swiftenv install $TOOLCHAIN_DOWNLOAD
2728 make bootstrap
2829 make test
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