.gitlab-ci.yml 1.97 KB
Newer Older
Ralf Jung's avatar
Ralf Jung committed
1
image: ralfjung/opam-ci:latest
Ralf Jung's avatar
Ralf Jung committed
2

3
4
stages:
  - build
Ralf Jung's avatar
Ralf Jung committed
5
  - reverse-deps
6

Ralf Jung's avatar
Ralf Jung committed
7
variables:
Ralf Jung's avatar
Ralf Jung committed
8
  CPU_CORES: "10"
Ralf Jung's avatar
Ralf Jung committed
9

10
.template: &template
11
  stage: build
Ralf Jung's avatar
Ralf Jung committed
12
  tags:
Ralf Jung's avatar
Ralf Jung committed
13
  - fp
Ralf Jung's avatar
Ralf Jung committed
14
15
  script:
  # prepare
Ralf Jung's avatar
Ralf Jung committed
16
  - . build/opam-ci.sh $OPAM_PINS
Ralf Jung's avatar
Ralf Jung committed
17
  - env | egrep '^(CI_BUILD_REF|CI_RUNNER)' > build-env.txt
Ralf Jung's avatar
Ralf Jung committed
18
  # build
19
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
Ralf Jung's avatar
Ralf Jung committed
20
  - 'if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi'
Ralf Jung's avatar
Ralf Jung committed
21
  - 'cat build-log.txt | egrep "[a-zA-Z0-9_/-]+ \((real|user): [0-9]" | tee build-time.txt'
Ralf Jung's avatar
Ralf Jung committed
22
23
24
25
  # maybe validate
  - 'if [[ -n "$VALIDATE" ]]; then make validate; fi'
  # maybe create opam package
  - 'if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == master ]]; then curl --fail -X POST -F "token=$OPAM_UPDATE_SECRET" -F "ref=master" -F "variables[REPO]=$CI_PROJECT_URL.git" -F "variables[REF]=$CI_COMMIT_REF_NAME" -F "variables[SHA]=$CI_COMMIT_SHA" -F "variables[NAME]=$OPAM_PKG" https://gitlab.mpi-sws.org/api/v4/projects/581/trigger/pipeline; fi'
Ralf Jung's avatar
Ralf Jung committed
26
  cache:
Ralf Jung's avatar
Ralf Jung committed
27
    key: "$CI_JOB_NAME"
Ralf Jung's avatar
Ralf Jung committed
28
29
30
31
    paths:
    - opamroot/
  only:
  - master
32
  - /^ci/
Ralf Jung's avatar
Ralf Jung committed
33
34
  except:
  - triggers
35

36
reverse-deps:
Ralf Jung's avatar
Ralf Jung committed
37
  stage: reverse-deps
38
39
  script:
  # Send a trigger to reverse dependencies to have them tested
40
  - curl --fail -X POST -F "token=$IRIS_EXAMPLES_SECRET" -F "ref=master" -F "variables[IRIS_REV]=$CI_COMMIT_SHA" https://gitlab.mpi-sws.org/api/v4/projects/615/trigger/pipeline
41
42
  only:
  - master
Ralf Jung's avatar
Ralf Jung committed
43
44
  except:
  - triggers
45

Ralf Jung's avatar
Ralf Jung committed
46
47
## Build jobs

48
build-coq.dev:
Ralf Jung's avatar
Ralf Jung committed
49
50
  <<: *template
  variables:
51
52
    OPAM_PINS: "coq version dev   coq-mathcomp-ssreflect version dev"
    VALIDATE: "1"
Ralf Jung's avatar
Ralf Jung committed
53

Ralf Jung's avatar
Ralf Jung committed
54
55
56
57
build-coq.8.7.1:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.7.1   coq-mathcomp-ssreflect version 1.6.4"
Ralf Jung's avatar
Ralf Jung committed
58
    OPAM_PKG: "coq-iris"
Ralf Jung's avatar
Ralf Jung committed
59
60
61
62
63
64
  tags:
  - fp-timing
  artifacts:
    paths:
    - build-time.txt
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
65

Ralf Jung's avatar
Ralf Jung committed
66
build-coq.8.7.0:
67
68
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
69
    OPAM_PINS: "coq version 8.7.0   coq-mathcomp-ssreflect version 1.6.4"
70

Ralf Jung's avatar
Ralf Jung committed
71
build-coq.8.6.1:
72
  <<: *template
Ralf Jung's avatar
Ralf Jung committed
73
  variables:
Ralf Jung's avatar
Ralf Jung committed
74
    OPAM_PINS: "coq version 8.6.1   coq-mathcomp-ssreflect version 1.6.4"