.gitlab-ci.yml 4.72 KB
Newer Older
1
stages:
François Bobot's avatar
François Bobot committed
2 3 4
 - git-update
 - build
 - tests
5
 - distrib_and_compatibility
6
 - make_public
7

8 9
variables:
    CURRENT: $CI_COMMIT_REF_NAME
Andre Maroneze's avatar
Andre Maroneze committed
10
    DEFAULT: "master"
11
    FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA"
12
    OCAML: "4_08"
13

14 15 16
check-no-old-frama-c:
  stage: git-update
  script:
François Bobot's avatar
François Bobot committed
17
   - (! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a HEAD)
18 19 20
   - git merge-base --is-ancestor a35d2118fe6999dddce9e1847eff626fae9cc37c HEAD
  tags:
   - nix
21

François Bobot's avatar
François Bobot committed
22 23 24
#avoid a nix error https://github.com/NixOS/nix/issues/2087
git-update:
  stage: git-update
25
  script:
François Bobot's avatar
François Bobot committed
26
   - nix/frama-ci.sh instantiate --eval -A frama-c.src.outPath
27
  tags:
François Bobot's avatar
François Bobot committed
28
   - nix
29 30

frama-c:
François Bobot's avatar
François Bobot committed
31
  stage: build
32
  script:
François Bobot's avatar
François Bobot committed
33
   - nix/frama-ci.sh build -A frama-c.installed
34
  tags:
François Bobot's avatar
François Bobot committed
35
   - nix
36

François Bobot's avatar
François Bobot committed
37 38
lint:
  stage: build
39
  script:
François Bobot's avatar
François Bobot committed
40 41
   - nix/frama-ci.sh build -A frama-c.lint
  coverage: '/lint coverage: \d+\.\d+/'
42
  tags:
François Bobot's avatar
François Bobot committed
43
   - nix
44

François Bobot's avatar
François Bobot committed
45 46
tests:
  stage: tests
47
  script:
François Bobot's avatar
François Bobot committed
48
   - nix/frama-ci.sh build -A frama-c.tests
49
  tags:
François Bobot's avatar
François Bobot committed
50
   - nix
51

François Bobot's avatar
François Bobot committed
52 53
wp-qualif:
  stage: tests
54
  script:
François Bobot's avatar
François Bobot committed
55
   - nix/frama-ci.sh build -A frama-c.wp-qualif
56
  tags:
François Bobot's avatar
François Bobot committed
57
   - nix
58
  allow_failure: true
59

60 61 62 63 64 65 66 67
aorai-prove:
  stage: tests
  script:
   - nix/frama-ci.sh build -A frama-c.aorai-prove
  tags:
   - nix
  allow_failure: true

François Bobot's avatar
François Bobot committed
68 69
genassigns:
  stage: tests
70
  script:
François Bobot's avatar
François Bobot committed
71
   - nix/frama-ci.sh build -A genassigns.tests
72
  tags:
François Bobot's avatar
François Bobot committed
73
   - nix
74

75 76 77
frama-clang:
  stage: tests
  script:
78
   - nix/frama-ci.sh build -A frama-clang.tests
79 80 81
  tags:
   - nix

François Bobot's avatar
François Bobot committed
82 83
counter-examples:
  stage: tests
84
  script:
François Bobot's avatar
François Bobot committed
85
   - nix/frama-ci.sh build -A counter-examples.tests
86
  tags:
François Bobot's avatar
François Bobot committed
87
   - nix
88

François Bobot's avatar
François Bobot committed
89 90
acsl-importer:
  stage: tests
91
  script:
François Bobot's avatar
François Bobot committed
92
   - nix/frama-ci.sh build -A acsl-importer.tests
93
  tags:
François Bobot's avatar
François Bobot committed
94
   - nix
95

François Bobot's avatar
François Bobot committed
96 97
volatile:
  stage: tests
98
  script:
François Bobot's avatar
François Bobot committed
99
   - nix/frama-ci.sh build -A volatile.tests
100
  tags:
François Bobot's avatar
François Bobot committed
101
   - nix
102

103 104 105 106 107 108 109
metacsl:
  stage: tests
  script:
  - nix/frama-ci.sh build -A meta.tests
  tags:
  - nix

110
Security:
François Bobot's avatar
François Bobot committed
111
  stage: tests
112
  script:
François Bobot's avatar
François Bobot committed
113
   - nix/frama-ci.sh build -A security.tests
114
  tags:
François Bobot's avatar
François Bobot committed
115
   - nix
116

François Bobot's avatar
François Bobot committed
117 118
CFP:
  stage: tests
119
  script:
François Bobot's avatar
François Bobot committed
120
   - nix/frama-ci.sh build -A context-from-precondition.tests
121
  tags:
François Bobot's avatar
François Bobot committed
122
   - nix
123

124 125
build-distrib-tarball:
  stage: build
126
  script:
127
   - nix/frama-ci.sh build -A frama-c.build-distrib-tarball
128 129 130
  tags:
   - nix

131 132
build-from-distrib-tarball:
  stage: tests
133
  script:
134
   - nix/frama-ci.sh build -A frama-c.build-from-distrib-tarball
135 136 137
  tags:
   - nix

François Bobot's avatar
François Bobot committed
138
.build_template: &internal_template
François Bobot's avatar
François Bobot committed
139
  stage: distrib_and_compatibility
140
  tags:
François Bobot's avatar
François Bobot committed
141
   - nix
142

François Bobot's avatar
François Bobot committed
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
internal:
  <<: *internal_template
  script:
   - nix/frama-ci.sh build -A frama-c.internal
  when: manual


internal_nightly:
  <<: *internal_template
  script:
   - nix/frama-ci.sh build -A frama-c.internal
  only:
  - schedules


François Bobot's avatar
François Bobot committed
158 159
.build_template: &frama-c-ocaml
  stage: distrib_and_compatibility
160
  script:
François Bobot's avatar
François Bobot committed
161
   - nix/frama-ci.sh build -A frama-c.tests
162
  tags:
François Bobot's avatar
François Bobot committed
163 164
   - nix

165 166 167 168 169 170 171 172 173 174 175 176 177
frama-c-ocaml-4.09:
  variables:
    OCAML: "4_09"
  <<: *frama-c-ocaml
  only:
  - schedules

frama-c-ocaml-4.10:
  variables:
    OCAML: "4_10"
  <<: *frama-c-ocaml


François Bobot's avatar
François Bobot committed
178 179
caveat-importer:
  stage: tests
180
  script:
François Bobot's avatar
François Bobot committed
181
   - nix/frama-ci.sh build -A caveat-importer.tests
182
  tags:
François Bobot's avatar
François Bobot committed
183
   - nix
184

François Bobot's avatar
François Bobot committed
185 186
mthread:
  stage: tests
187
  script:
François Bobot's avatar
François Bobot committed
188
   - nix/frama-ci.sh build -A mthread.tests
189
  tags:
François Bobot's avatar
François Bobot committed
190
   - nix
191

François Bobot's avatar
François Bobot committed
192 193
pathcrawler:
  stage: tests
194
  script:
François Bobot's avatar
François Bobot committed
195
   - nix/frama-ci.sh build -A pathcrawler.tests
196
  tags:
François Bobot's avatar
François Bobot committed
197
   - nix
198

199 200 201 202 203 204
e-acsl-tests-dev:
  stage: tests
  script:
   - nix/frama-ci.sh build -A frama-c.e-acsl-tests-dev
  tags:
   - nix
205

Loïc Correnson's avatar
Loïc Correnson committed
206
ivette:
Loïc Correnson's avatar
Loïc Correnson committed
207 208 209 210
  stage: build
  image: node
  cache:
    paths:
Loïc Correnson's avatar
Loïc Correnson committed
211
    - ivette/node_modules/
Loïc Correnson's avatar
Loïc Correnson committed
212 213 214 215
  script:
   - node --version
   - npm --version
   - yarn --version
Loïc Correnson's avatar
Loïc Correnson committed
216
   - make -C ivette
Loïc Correnson's avatar
Loïc Correnson committed
217 218 219
  tags:
    - docker

220 221 222 223 224 225 226 227 228 229
make_public:
  stage: make_public
  script:
   - (! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a origin/master)
   - echo "$FRAMA_C_PUBLIC_SSH_PRIVATE_KEY" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
   - nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
   - GIT_SSH=nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git push git@git.frama-c.com:pub/frama-c.git origin/master:refs/heads/master
  tags:
  - nix
  only:
230
  - schedules
231 232 233 234 235 236 237 238 239 240 241 242

make_public_meta:
  stage: make_public
  script:
   - echo "$FRAMA_C_PUBLIC_SSH_PRIVATE_KEY" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
   - nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
   - GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git clone git@git.frama-c.com:frama-c/meta.git nix/frama-c-public/meta
   - GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git -C nix/frama-c-public/meta push git@git.frama-c.com:pub/meta origin/master:refs/heads/master
  tags:
  - nix
  only:
  - schedules