.gitlab-ci.yml 4.15 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
François Bobot's avatar
François Bobot committed
10
    DEFAULT: "master"
11 12
    FRAMA_CI_OPT: "--override frama-c:$CI_COMMIT_REF_NAME,$CI_COMMIT_SHA"

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

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

frama-c:
François Bobot's avatar
François Bobot committed
32 33 34
  stage: build
  variables:
    OCAML: "4_05"
35
  script:
François Bobot's avatar
François Bobot committed
36
   - nix/frama-ci.sh build -A frama-c.installed
37
  tags:
François Bobot's avatar
François Bobot committed
38
   - nix
39

François Bobot's avatar
François Bobot committed
40 41 42 43
lint:
  stage: build
  variables:
    OCAML: "4_05"
44
  script:
François Bobot's avatar
François Bobot committed
45 46
   - nix/frama-ci.sh build -A frama-c.lint
  coverage: '/lint coverage: \d+\.\d+/'
47
  tags:
François Bobot's avatar
François Bobot committed
48
   - nix
49

François Bobot's avatar
François Bobot committed
50 51 52 53
tests:
  stage: tests
  variables:
    OCAML: "4_05"
54
  script:
François Bobot's avatar
François Bobot committed
55
   - nix/frama-ci.sh build -A frama-c.tests
56
  tags:
François Bobot's avatar
François Bobot committed
57
   - nix
58

François Bobot's avatar
François Bobot committed
59 60 61 62
wp-qualif:
  stage: tests
  variables:
    OCAML: "4_05"
63
  script:
François Bobot's avatar
François Bobot committed
64
   - nix/frama-ci.sh build -A frama-c.wp-qualif
65
  tags:
François Bobot's avatar
François Bobot committed
66
   - nix
67 68
  allow_failure: true

François Bobot's avatar
François Bobot committed
69 70 71 72
genassigns:
  stage: tests
  variables:
    OCAML: "4_05"
73
  script:
François Bobot's avatar
François Bobot committed
74
   - nix/frama-ci.sh build -A genassigns.tests
75
  tags:
François Bobot's avatar
François Bobot committed
76
   - nix
77

François Bobot's avatar
François Bobot committed
78 79 80 81
counter-examples:
  stage: tests
  variables:
    OCAML: "4_05"
82
  script:
François Bobot's avatar
François Bobot committed
83
   - nix/frama-ci.sh build -A counter-examples.tests
84
  tags:
François Bobot's avatar
François Bobot committed
85
   - nix
86

François Bobot's avatar
François Bobot committed
87 88 89 90
acsl-importer:
  stage: tests
  variables:
    OCAML: "4_05"
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 98 99
volatile:
  stage: tests
  variables:
    OCAML: "4_05"
100
  script:
François Bobot's avatar
François Bobot committed
101
   - nix/frama-ci.sh build -A volatile.tests
102
  tags:
François Bobot's avatar
François Bobot committed
103
   - nix
104 105

Security:
François Bobot's avatar
François Bobot committed
106 107 108
  stage: tests
  variables:
    OCAML: "4_05"
109
  script:
François Bobot's avatar
François Bobot committed
110
   - nix/frama-ci.sh build -A security.tests
111
  tags:
François Bobot's avatar
François Bobot committed
112
   - nix
113

François Bobot's avatar
François Bobot committed
114 115 116 117
CFP:
  stage: tests
  variables:
    OCAML: "4_05"
118
  script:
François Bobot's avatar
François Bobot committed
119
   - nix/frama-ci.sh build -A context-from-precondition.tests
120
  tags:
François Bobot's avatar
François Bobot committed
121
   - nix
122

123 124
build-distrib-tarball:
  stage: build
125 126 127
  variables:
    OCAML: "4_05"
  script:
128
   - nix/frama-ci.sh build -A frama-c.build-distrib-tarball
129 130 131
  tags:
   - nix

132 133
build-from-distrib-tarball:
  stage: tests
134 135 136
  variables:
    OCAML: "4_05"
  script:
137
   - nix/frama-ci.sh build -A frama-c.build-from-distrib-tarball
138 139 140
  tags:
   - nix

François Bobot's avatar
François Bobot committed
141
.build_template: &internal_template
François Bobot's avatar
François Bobot committed
142 143 144
  stage: distrib_and_compatibility
  variables:
    OCAML: "4_05"
145
  tags:
François Bobot's avatar
François Bobot committed
146
   - nix
147

François Bobot's avatar
François Bobot committed
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
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
163 164
.build_template: &frama-c-ocaml
  stage: distrib_and_compatibility
165
  script:
François Bobot's avatar
François Bobot committed
166
   - nix/frama-ci.sh build -A frama-c.tests
167
  tags:
François Bobot's avatar
François Bobot committed
168 169 170 171 172 173
   - nix

frama-c-ocaml-4.06:
  variables:
    OCAML: "4_06"
  <<: *frama-c-ocaml
François Bobot's avatar
François Bobot committed
174 175
  only:
  - schedules
François Bobot's avatar
François Bobot committed
176 177 178 179 180 181

frama-c-ocaml-4.07:
  variables:
    OCAML: "4_07"
  <<: *frama-c-ocaml

François Bobot's avatar
François Bobot committed
182 183 184 185 186 187
#frama-c-ocaml-4.08:
#  variables:
#    OCAML: "4_08"
#  <<: *frama-c-ocaml


François Bobot's avatar
François Bobot committed
188 189 190 191
caveat-importer:
  stage: tests
  variables:
    OCAML: "4_05"
192
  script:
François Bobot's avatar
François Bobot committed
193
   - nix/frama-ci.sh build -A caveat-importer.tests
194
  tags:
François Bobot's avatar
François Bobot committed
195
   - nix
196

François Bobot's avatar
François Bobot committed
197 198 199 200
mthread:
  stage: tests
  variables:
    OCAML: "4_05"
201
  script:
François Bobot's avatar
François Bobot committed
202
   - nix/frama-ci.sh build -A mthread.tests
203
  tags:
François Bobot's avatar
François Bobot committed
204
   - nix
205

François Bobot's avatar
François Bobot committed
206 207 208 209
pathcrawler:
  stage: tests
  variables:
    OCAML: "4_05"
210
  script:
François Bobot's avatar
François Bobot committed
211
   - nix/frama-ci.sh build -A pathcrawler.tests
212
  tags:
François Bobot's avatar
François Bobot committed
213
   - nix
214

215 216 217 218 219 220 221 222
e-acsl-tests-dev:
  stage: tests
  variables:
    OCAML: "4_05"
  script:
   - nix/frama-ci.sh build -A frama-c.e-acsl-tests-dev
  tags:
   - nix
223 224 225 226 227 228 229 230 231 232 233

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:
234
  - schedules