-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.disabled.yml
139 lines (120 loc) · 3.24 KB
/
.gitlab-ci.disabled.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
image: registry.gitlab.com/konn/computational-algebra/build-pre:0.6.0.0-p1
variables:
GIT_STRATEGY: fetch
stages:
- build
- test
- deploy
.cached_dirs: &cached-dirs
paths:
- '.stack-work/'
- '.stack-root/'
- '*/.stack-work'
- '.apt/'
- '.hspec-failures'
.header-ghc-84: &header-ghc-84
image: registry.gitlab.com/konn/computational-algebra/build/ghc-8.4:0.6.0.0-p4
variables:
STACK_YAML: "stack-804.yaml"
GHC: 804
cache:
key: "${CI_COMMIT_REF_SLUG}-ghc-8.4"
<<: *cached-dirs
.header-ghc-86: &header-ghc-86
image: registry.gitlab.com/konn/computational-algebra/build/ghc-8.6:0.6.0.0-p3
variables:
STACK_YAML: "stack-806.yaml"
GHC: 806
cache:
key: "${CI_COMMIT_REF_SLUG}-ghc-8.6"
<<: *cached-dirs
.header-ghc-88: &header-ghc-88
image: registry.gitlab.com/konn/computational-algebra/build/ghc-8.8:0.6.0.0-p4
variables:
STACK_YAML: "stack-808.yaml"
GHC: 808
cache:
key: "${CI_COMMIT_REF_SLUG}-ghc-8.8"
<<: *cached-dirs
.header-ghc-88: &header-ghc-810
image: registry.gitlab.com/konn/computational-algebra/build/ghc-8.10:0.6.0.0
variables:
STACK_YAML: "stack-8.10.4.yaml"
GHC: 810
cache:
key: "${CI_COMMIT_REF_SLUG}-ghc-8.8"
<<: *cached-dirs
before_script:
- echo $CI_PROJECT_DIR
- export PATH="$HOME/.local/bin:$PATH"
- export LD_LIBRARY_PATH="$(dirname $(stack path --global-pkg-db))/rts:$LD_LIBRARY_PATH"
.build-script: &build-script
stage: build
script:
- stack --version
- echo "$STACK_YAML"
- stack setup
- stack build --no-terminal --test --no-run-tests --coverage
.test-script: &test-script
stage: test
script:
- stack setup
- stack --no-terminal test --no-rerun-tests --coverage
build:ghc-8.4:
<<: *header-ghc-84
<<: *build-script
build:ghc-8.6:
<<: *header-ghc-86
<<: *build-script
build:ghc-8.8:
<<: *header-ghc-88
<<: *build-script
build:ghc-8.10:
<<: *header-ghc-810
<<: *build-script
test:ghc-8.4:
dependencies:
- build:ghc-8.4
<<: *header-ghc-84
<<: *test-script
coverage: '/^\s*(\d+\s*%)\s*top-level declarations used/'
test:ghc-8.6:
dependencies:
- build:ghc-8.6
<<: *header-ghc-86
<<: *test-script
test:ghc-8.8:
dependencies:
- build:ghc-8.8
<<: *header-ghc-88
<<: *test-script
test:ghc-8.10:
dependencies:
- build:ghc-8.10
<<: *header-ghc-810
<<: *test-script
deploy_documents:
only:
- master@konn/computational-algebra
image: registry.gitlab.com/konn/computational-algebra/build/ghc-8.8:0.6.0.0-p4
stage: deploy
allow_failure: true
dependencies:
- test:ghc-8.8
cache:
key: "${CI_COMMIT_REF_SLUG}-ghc-8.8"
policy: pull
<<: *cached-dirs
script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s) # Run ssh-agent inside build env
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_SECRET_KEY" | ssh-add - > /dev/null
- stack build --haddock --fast --no-haddock-deps
- git remote add github git@github.com:konn/computational-algebra.git
- git worktree add gh-pages-devel github/gh-pages-devel
- ln -s $(stack path --local-doc-root) ./gh-pages-devel/docs
- cd gh-pages-devel
- stack build --fast && stack exec -- site build
- stack exec -- site deploy