/
pipeline.yml
91 lines (80 loc) · 2.77 KB
/
pipeline.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
env:
BUILD_DIR: "/build/cardano-wallet"
STACK_ROOT: "/build/cardano-wallet.stack"
CACHE_DIR: "/cache/cardano-wallet"
LC_ALL: "en_US.UTF-8"
TESTS_LOGDIR: "/tmp/wallet-integration-logs"
steps:
- label: 'Prevent merging to wrong branch'
if: 'build.branch == "bors/staging"'
command: './.buildkite/check-bors.sh'
agents:
system: x86_64-linux
- wait: ~
if: 'build.branch == "bors/staging"'
- label: 'Stack Rebuild'
command:
- "rm -rf $TESTS_LOGDIR && mkdir $TESTS_LOGDIR"
- "nix-build .buildkite/default.nix -o sr"
- "./sr/bin/rebuild --build-dir=$BUILD_DIR --cache-dir=$CACHE_DIR"
timeout_in_minutes: 120
artifact_paths:
- "/build/cardano-wallet/.stack-work/logs/cardano-wallet*.log"
- "/tmp/wallet-integration-logs/*/*.log"
agents:
system: x86_64-linux
- label: 'Check Cabal Configure'
command: 'nix-shell nix/cabal-shell.nix --run "scripts/buildkite/cabal-ci.sh configure"'
agents:
system: x86_64-linux
- label: 'Check auto-generated Nix'
key: nix
commands:
- './nix/regenerate.sh --cache /dev/null'
- 'nix-build ./nix -A iohkNix.checkStackProject -o check-stack-project.sh && ./check-stack-project.sh'
agents:
system: x86_64-linux
- label: 'Check Cabal Configure (Haskell.nix shellFor)'
depends_on: nix
command:
- 'nix-shell --run "echo --- Cabal update ; cabal update"'
- 'nix-shell --run "echo +++ Cabal configure ; cabal configure --enable-tests --enable-benchmarks"'
- 'nix-shell --run "echo +++ Cabal configure -frelease ; cabal configure -frelease --enable-tests --enable-benchmarks"'
agents:
system: x86_64-linux
- label: 'Check Stylish Haskell'
depends_on: nix
command: 'nix-shell --run .buildkite/check-stylish.sh'
agents:
system: x86_64-linux
- label: 'HLint'
depends_on: nix
command: 'nix-shell --run "echo +++ HLint ; hlint lib"'
agents:
system: x86_64-linux
- label: 'Validate OpenAPI Specification'
depends_on: nix
command: 'nix-shell --run "echo +++ openapi-spec-validator ; openapi-spec-validator --schema 3.0.0 specifications/api/swagger.yaml"'
agents:
system: x86_64-linux
- label: 'Docker Image'
depends_on: nix
command:
- "nix-build .buildkite/docker-build-push.nix --argstr dockerHubRepoName inputoutput/cardano-wallet -o docker-build-push"
- "./docker-build-push"
agents:
system: x86_64-linux
soft_fail:
- exit_status: '*'
- label: 'TODO list'
depends_on: nix
command: 'nix-shell --run scripts/todo-list.sh'
agents:
system: x86_64-linux
- label: 'Lint bash shell scripts'
depends_on: nix
commands:
- 'echo +++ Shellcheck'
- './scripts/shellcheck.sh'
agents:
system: x86_64-linux