-
Notifications
You must be signed in to change notification settings - Fork 112
/
prepare_linux.sh
executable file
·54 lines (44 loc) · 1.01 KB
/
prepare_linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
#
# IMPORTANT: This file should only include production
# dependencies. Dependencies for integration tests should be in the
# ./prepare_linux_integration_test_setup_only.sh file in this
# directory.
#
set -ex
function retry {
ok="false"
for i in $(seq $1); do
if bash -c "$2" ; then
ok="true"
break
fi
echo "Retrying... $2"
sleep 5s
done
if [[ "$ok" == "false" ]]; then
echo "Failed after retries... $2"
exit 1
fi
}
# Set up Node.js, jq
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get update -y
sudo apt-get install -y nodejs cmake
# Set up Go
./scripts/ci/prepare_go.sh
#
# IMPORTANT: Only run in Github CI.
#
if [[ "$1" == "--integration-tests" ]]; then
./scripts/ci/prepare_linux_integration_test_setup_only.sh
fi
# Set up project
sudo npm install --global yarn
retry 5 yarn
race=""
if [[ "$1" == "--integration-tests" ]] || [[ "$1" == "--race" ]]; then
race="-race"
fi
# Install ODBC
./runner/plugins/odbc/build.sh $race