-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtravis.sh
executable file
·44 lines (36 loc) · 933 Bytes
/
travis.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
#!/bin/bash
set -o errexit -o nounset -o pipefail
which shellcheck > /dev/null && shellcheck "$0"
WORKSPACE="$PWD"
(
cd external/libpqxx
./configure --disable-documentation --prefix="$PWD/../libpqxx-installation" && make -j 4 install
)
(
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j 4
ctest
)
(
mkdir snapshots && cd snapshots
# Testnet snapshot
if [[ "$NETWORK" == "testnet" ]]; then
wget https://testnet-snapshot.lisknode.io/blockchain.db.gz
else
wget https://snapshot.lisknode.io/blockchain.db.gz
fi
)
(
# shellcheck disable=SC2030
PATH="$(pwd)/build:$PATH"
./validate-snapshot-file "$NETWORK" snapshots/blockchain.db.gz
)
(
mkdir "$HOME/custom_dir" && cd "$HOME/custom_dir"
npm init --yes
npm install "$WORKSPACE"
# shellcheck disable=SC2031
PATH="$(npm bin):$PATH"
validate-snapshot-database --help
)