-
Notifications
You must be signed in to change notification settings - Fork 86
/
build-ci.sh
executable file
·37 lines (28 loc) · 1008 Bytes
/
build-ci.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
#!/usr/bin/env bash
# A script for building everything in CI without having to sprinkle fragments of bash
# in a YAML file
# Assumes all needed tools are in scope which means it usually needs to be run
# from a nix-shell session
# fail the script if any command fails
set -e
cabal update
cabal build --enable-tests all
# Run tests in sequence as integration tests do collide
cabal test merkle-patricia-tree
cabal test plutus-cbor
cabal test plutus-merkle-tree
cabal test hydra-node
cabal test hydra-cluster
cabal test hydra-tui
# Sanity check benchmark still runs fine
# TODO: turn into a test
cabal bench hydra-cluster --benchmark-options '--scaling-factor 1'
# ignore various errors, including plutus scripts one
cabal haddock all -fhydra-development
[ ! -d docs/haddock ] && mkdir -p docs/haddock
doc_indices=$(find dist-newstyle/build -name index.html)
for index in ${doc_indices}; do
parent=$(dirname ${index})
echo "Copying ${parent} to docs/haddock"
cp -fr ${parent} docs/haddock
done