-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
52 lines (44 loc) · 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
workflow:
auto_cancel:
on_new_commit: interruptible
default:
interruptible: true
tags:
- nix
variables:
NIX_BUILD_FLAGS: "--no-update-lock-file --print-build-logs --show-trace"
before_script:
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@drf-gitlab.cea.fr".insteadOf "ssh://[email protected]"
run_checks:
stage: test
script:
- nix flake check $NIX_BUILD_FLAGS
editorconfig:
stage: test
script:
- nix run 'nixpkgs#eclint' --inputs-from .
formatting:
stage: test
script:
- nix fmt -- --check .
manpages:
stage: deploy
script:
- nix build $NIX_BUILD_FLAGS '.#docs'
- cp -Lr ./result/share/man manpages
artifacts:
name: "manpages-$CI_COMMIT_REF_SLUG"
paths:
- manpages
pages:
stage: deploy
script:
- nix build $NIX_BUILD_FLAGS '.#docs'
- cp -Lr ./result/share/doc/epnix/html public
artifacts:
name: "book"
paths:
- public
dependencies: []
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH