22
33set -ex
44
5- sudo apt update
6-
7- if [ $( grep RELEASE /etc/lsb-release) == " DISTRIB_RELEASE=18.04" ]; then
8- sudo apt install -y \
9- git ninja-build clang-10 python python-six \
10- uuid-dev libicu-dev icu-devtools libbsd-dev \
11- libedit-dev libxml2-dev libsqlite3-dev swig \
12- libpython-dev libncurses5 libncurses5-dev pkg-config \
13- libblocksruntime-dev libcurl4-openssl-dev \
14- make systemtap-sdt-dev tzdata rsync wget llvm-10 zip unzip
15- sudo ln -s -f /usr/bin/clang-10 /usr/bin/clang
16- sudo ln -s -f /usr/bin/clang++-10 /usr/bin/clang++
17- elif [ $( grep RELEASE /etc/lsb-release) == " DISTRIB_RELEASE=20.04" ]; then
18- sudo apt install -y \
19- git ninja-build clang python python-six \
20- uuid-dev libicu-dev icu-devtools libbsd-dev \
21- libedit-dev libxml2-dev libsqlite3-dev swig \
22- libpython2-dev libncurses5 libncurses5-dev pkg-config \
23- libblocksruntime-dev libcurl4-openssl-dev \
24- make systemtap-sdt-dev tzdata rsync wget llvm zip unzip
5+ if [[ " $( cat /etc/system-release) " == * " Amazon Linux release 2" * ]]; then
6+ sudo yum -y install \
7+ clang \
8+ curl-devel \
9+ gcc-c++ \
10+ git \
11+ glibc-static \
12+ libbsd-devel \
13+ libedit-devel \
14+ libicu-devel \
15+ libuuid-devel \
16+ libxml2-devel \
17+ ncurses-compat-libs \
18+ ncurses-devel \
19+ ninja-build \
20+ pexpect \
21+ pkgconfig \
22+ procps-ng \
23+ python \
24+ python-devel \
25+ python-pkgconfig \
26+ python-six \
27+ python3-devel \
28+ rsync \
29+ sqlite-devel \
30+ swig \
31+ tzdata \
32+ uuid-devel \
33+ wget \
34+ which
35+
36+ if [ ! -e /usr/local/bin/ninja ]; then
37+ sudo ln -s /usr/bin/ninja-build /usr/local/bin/ninja
38+ fi
2539else
26- echo " Unknown Ubuntu version"
27- exit 1
40+ sudo apt update
41+
42+ if [ $( grep RELEASE /etc/lsb-release) == " DISTRIB_RELEASE=18.04" ]; then
43+ sudo apt install -y \
44+ git ninja-build clang-10 python python-six \
45+ uuid-dev libicu-dev icu-devtools libbsd-dev \
46+ libedit-dev libxml2-dev libsqlite3-dev swig \
47+ libpython-dev libncurses5 libncurses5-dev pkg-config \
48+ libblocksruntime-dev libcurl4-openssl-dev \
49+ make systemtap-sdt-dev tzdata rsync wget llvm-10 zip unzip
50+ sudo ln -s -f /usr/bin/clang-10 /usr/bin/clang
51+ sudo ln -s -f /usr/bin/clang++-10 /usr/bin/clang++
52+ elif [ $( grep RELEASE /etc/lsb-release) == " DISTRIB_RELEASE=20.04" ]; then
53+ sudo apt install -y \
54+ git ninja-build clang python python-six \
55+ uuid-dev libicu-dev icu-devtools libbsd-dev \
56+ libedit-dev libxml2-dev libsqlite3-dev swig \
57+ libpython2-dev libncurses5 libncurses5-dev pkg-config \
58+ libblocksruntime-dev libcurl4-openssl-dev \
59+ make systemtap-sdt-dev tzdata rsync wget llvm zip unzip
60+ else
61+ echo " Unknown Ubuntu version"
62+ exit 1
63+ fi
64+ sudo apt clean
2865fi
29- sudo apt clean
3066
3167SOURCE_PATH=" $( cd " $( dirname $0 ) /../../../.." && pwd ) "
3268SWIFT_PATH=$SOURCE_PATH /swift
3369cd $SWIFT_PATH
3470
35- ./utils/update-checkout --clone --scheme wasm --skip-repository swift
71+ ./utils/update-checkout --clone --scheme wasm/5.6 --skip-repository swift
3672
3773# Install wasmer
38-
39- if [ ! -e ~ /.wasmer/bin/wasmer ]; then
40- curl https://get.wasmer.io -sSfL | sh
74+ # FIXME: Wasmer doesn't support linux-aarch64, consider using a different WASI-compatible runtime.
75+ if [ " $( uname -m) " != " aarch64" ]; then
76+ if [ ! -e ~ /.wasmer/bin/wasmer ]; then
77+ curl https://get.wasmer.io -sSfL | sh -s " 2.1.1"
78+ fi
4179fi
4280
4381cd $SOURCE_PATH
4482
4583if [ -z $( which cmake) ]; then
46- wget -O install_cmake.sh " https://github.com/Kitware/CMake/releases/download/v3.17.2 /cmake-3.17.2-Linux-x86_64 .sh"
84+ wget -O install_cmake.sh " https://github.com/Kitware/CMake/releases/download/v3.22.1 /cmake-3.22.1-linux- $( uname -m ) .sh"
4785 chmod +x install_cmake.sh
4886 sudo mkdir -p /opt/cmake
4987 sudo ./install_cmake.sh --skip-license --prefix=/opt/cmake
@@ -56,7 +94,7 @@ cmake --version
5694
5795if [ -z $( which sccache) ]; then
5896 sudo mkdir /opt/sccache && cd /opt/sccache
59- wget -O - " https://github.com/mozilla/sccache/releases/download/0.2.13 /sccache-0.2.13-x86_64 -unknown-linux-musl.tar.gz" | \
97+ wget -O - " https://github.com/mozilla/sccache/releases/download/0.2.14 /sccache-0.2.14- $( uname -m ) -unknown-linux-musl.tar.gz" | \
6098 sudo tar xz --strip-components 1
6199 sudo ln -sf /opt/sccache/sccache /usr/local/bin
62100fi
0 commit comments