forked from haskell-beam/beam
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.gitlab-ci.yml
33 lines (26 loc) · 1.1 KB
/
.gitlab-ci.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
image: nixos/nix:latest
stages:
- build
- docs
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- /builds/tathougies1/beam/.stack/
- /root/.stack
- .stack-work/
- /nix
test beam-core:
stage: build
script: chown -R root /builds/tathougies1 && nix-shell --command "stack test --system-ghc --nix beam-core --flag beam-core:werror"
test beam-postgres:
stage: build
script: chown -R postgres /builds/tathougies1 && mkdir -p /var/lib/postgresql/.stack && chown -R postgres /var/lib/postgresql && nix-shell --command "su -c 'stack test --system-ghc --nix beam-postgres --flag beam-postgres:werror --allow-different-user' postgres"
build beam-sqlite:
stage: build
script: chown -R root /builds/tathougies1 && nix-shell --command "stack build --system-ghc --nix beam-sqlite --flag beam-core:werror --flag beam-sqlite:werror"
build beam-migrate:
stage: build
script: chown -R root /builds/tathougies1 && nix-shell --command "stack build --system-ghc --nix beam-migrate-cli --flag beam-migrate:werror"
build docs:
stage: docs
script: chown -R root /builds/tathougies1 && ./build-docs.sh builddocs