-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcloudbuild.yaml
88 lines (81 loc) · 1.78 KB
/
cloudbuild.yaml
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
timeout: 3600s # Cache misses are slow to rebuild
steps:
- id: "Load cache"
name: gcr.io/cloud-builders/gsutil
entrypoint: bash
args:
- "-c"
- |
source .ci/ci-cache.sh
load-cache
- id: "Build dependencies"
waitFor:
- "Load cache"
name: "haskell:8.6.3"
entrypoint: bash
args:
- "-c"
- |
cabal v2-update
cabal v2-install -j stylish-haskell hlint
cabal v2-build -j --enable-tests -fwith-e2e-tests --only-dependencies all
- id: "Save cache"
waitFor:
- "Build dependencies"
name: gcr.io/cloud-builders/gsutil
entrypoint: bash
args:
- "-c"
- |
source .ci/ci-cache.sh
save-cache
- id: "Start IPFS daemon"
waitFor:
- "Load cache"
name: "gcr.io/cloud-builders/docker"
args:
- run
- "--name=ipfs-test-network"
- "--detach"
- "--publish=5001:5001"
- "--network=cloudbuild"
- "eu.gcr.io/opensourcecoin/ipfs-test-network"
- id: "Format (haskell)"
waitFor:
- "Save cache"
name: "haskell:8.6.3"
args:
- "./.ci/check-haskell-format.sh"
- id: "Lint (hlint)"
waitFor:
- "Save cache"
name: "haskell:8.6.3"
args:
- "/builder/home/.cabal/bin/hlint"
- "binary-varint"
- "git-remote-ipfs"
- "ipfs-api"
- "ipld-cid"
- multibase
- "multihash-cryptonite"
- "multihash-serialise"
- id: "Build and Test"
waitFor:
- "Save cache"
name: "haskell:8.6.3"
entrypoint: bash
args:
- "-c"
- |
cabal v2-configure --enable-tests
cabal v2-build -j all
cabal v2-test -j all
- id: "E2E Tests"
waitFor:
- "Save cache"
- "Start IPFS daemon"
name: "haskell:8.6.3"
env:
- "IPFS_API_URL=http://ipfs-test-network:5001"
args:
- "./.ci/e2e.sh"