-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
108 lines (95 loc) · 4.04 KB
/
.travis.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
language: haskell
ghc:
- "8.6.1"
cabal: "2.4"
sudo: required
services:
- docker
# Cache .stack for build_times--
addons:
apt:
sources:
- sourceline: 'ppa:tah83/secp256k1'
packages:
- libsecp256k1-dev
cache:
directories:
- $HOME/.stack
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# From https://github.com/google/proto-lens/blob/5ab25dfeb51f700204db4aa8a9e7fbc5a74ed1e9/.travis.yml#L41-L44
- curl -L https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protoc-3.7.1-linux-x86_64.zip > protoc-release.zip
- unzip -p protoc-release.zip bin/protoc > $HOME/.local/bin/protoc
- chmod a+x $HOME/.local/bin/protoc
- rm protoc-release.zip
install:
- travis_wait 120 stack --skip-ghc-check setup
jobs:
include:
- stage: Cleanliness is next to Godliness
name: "Ensure that code matches style guidelines for PRs to master"
# When branch is `master` we run `haskell-stylish` and fail if git working directory becomes dirty
if: branch = master
script:
- echo "test formatting"
- travis_wait 120 stack --skip-ghc-check install hlint-2.2.11 stylish-haskell-0.10.0.0 weeder-1.0.8
- make stylish && git diff-index --quiet HEAD
- make hlint
- make weeder
- echo "test tutorial"
- travis_wait 120 stack --skip-ghc-check install markdown-unlit-0.5.0
- make test-tutorial
- stage: Core Tests
name: "Test Core and Client Libraries"
script:
- echo "Test libraries"
# this image is needed for the sdk IAVLSpec
- docker run --name iavl -p 8090:8090 -p 8091:8091 -d foamspace/iavl:latest /iavlserver -db-name "test" -datadir "." -grpc-endpoint "0.0.0.0:8090" -gateway-endpoint "0.0.0.0:8091"
- make test-libraries
- docker rm -f iavl
- echo "Test Libraries with Nix"
- echo "This stage is currently disabled as Nix doesn't seem to play well with libsecp256k1"
- echo "Test IAVL Client"
- docker run --name iavl -p 8090:8090 -p 8091:8091 -d foamspace/iavl:latest /iavlserver -db-name "test" -datadir "." -grpc-endpoint "0.0.0.0:8090" -gateway-endpoint "0.0.0.0:8091"
- make test-iavl-client
- docker rm -f iavl
- echo "Test Tendermint Client"
- docker-compose -f hs-tendermint-client/docker-compose.yaml -p test-hs-tendermint-client up -d
- make test-kv-store
- docker-compose -f hs-tendermint-client/docker-compose.yaml -p test-hs-tendermint-client down -v --rmi local
- echo "Test simple-storage"
- make docker-test-prebake
- make deploy-simple-storage-docker
#- timeout 5 sh -c 'until curl http://localhost:26657/health; do echo "waiting for tendermint to be ready"; sleep 1; done'
#- sh -c 'docker-compose logs test-hs-abci-examples-simple-storage-e2e'
- make test-simple-storage
- make deploy-simple-storage-docker-down
- echo "Test nameservice"
- make docker-test-prebake
- make deploy-nameservice-test
# - timeout 5 sh -c 'until curl http://localhost:26657/health; do echo "waiting for tendermint to be ready"; sleep 1; done'
# - sh -c 'docker-compose logs test-hs-abci-examples-nameservice-e2e'
- make test-nameservice
- make deploy-nameservice-test-down
- stage: publish website
script:
- echo "building website"
- travis_wait 120 stack --skip-ghc-check install tintin
- make build-site
- make build-docs-local
- mkdir -p ./hs-abci-docs/.stack-work/tintin/rendered/haddocks
- find ./ -type f -name "index.html" | grep -v tintin | sed 's/index.html//g' | xargs -I {} cp -r {} hs-abci-docs/.stack-work/tintin/rendered/haddocks/
- echo "kepler.dev" > ./hs-abci-docs/.stack-work/tintin/rendered/CNAME
deploy:
provider: pages
local-dir: ./hs-abci-docs/.stack-work/tintin/rendered
email: deploy@travis-ci.org
name: Deployment Bot
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
on:
branch: master