.gitlab-ci.yml 1.95 KB
Newer Older
1
2
image: ralfjung/opam-ci:latest

3
4
5
stages:
  - build

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

9
.template: &template
10
  stage: build
Ralf Jung's avatar
Ralf Jung committed
11
  tags:
Ralf Jung's avatar
Ralf Jung committed
12
  - fp
Ralf Jung's avatar
Ralf Jung committed
13
14
  script:
  # prepare
Ralf Jung's avatar
Ralf Jung committed
15
  - . build/opam-ci.sh $OPAM_PINS
Ralf Jung's avatar
Ralf Jung committed
16
  - env | egrep '^(CI_BUILD_REF|CI_RUNNER)' > build-env.txt
17
  # build
18
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
19
  - 'if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi'
Ralf Jung's avatar
Ralf Jung committed
20
  - 'cat build-log.txt | egrep "[a-zA-Z0-9_/-]+ \((real|user): [0-9]" | tee build-time.txt'
Ralf Jung's avatar
Ralf Jung committed
21
22
  # maybe validate
  - 'if [[ -n "$VALIDATE" ]]; then make validate; fi'
23
  # maybe generate and upload doc (has to be in this job as we need coq installed)
Ralf Jung's avatar
Ralf Jung committed
24
  - 'if [[ -n "$DOCDIR" && "$CI_COMMIT_REF_NAME" == master ]]; then build/coqdoc; fi'
Ralf Jung's avatar
Ralf Jung committed
25
26
  # 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'
27
  cache:
28
    key: "$CI_JOB_NAME"
29
30
31
32
    paths:
    - opamroot/
  only:
  - master
33
  - /^ci/
Ralf Jung's avatar
Ralf Jung committed
34
35
  except:
  - triggers
36

Ralf Jung's avatar
Ralf Jung committed
37
38
39
40
41
42
43
44
## Build jobs

build-coq.dev:
  <<: *template
  variables:
    OPAM_PINS: "coq version dev"
    VALIDATE: "1"

Ralf Jung's avatar
Ralf Jung committed
45
46
47
48
49
50
build-coq.8.8.dev:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.8.dev"
    VALIDATE: "1"

51
build-coq.8.7.2:
52
53
  <<: *template
  variables:
54
    OPAM_PINS: "coq version 8.7.2"
Ralf Jung's avatar
Ralf Jung committed
55
    OPAM_PKG: "coq-stdpp"
Ralf Jung's avatar
Ralf Jung committed
56
    DOCDIR: "coqdoc@center.mpi-sws.org:/stdpp"
Ralf Jung's avatar
Ralf Jung committed
57
58
59
60
61
62
  tags:
  - fp-timing
  artifacts:
    paths:
    - build-time.txt
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
63

64
65
66
67
68
build-coq.8.7.1:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.7.1"

Ralf Jung's avatar
Ralf Jung committed
69
build-coq.8.7.0:
70
71
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
72
    OPAM_PINS: "coq version 8.7.0"
73

Ralf Jung's avatar
Ralf Jung committed
74
build-coq.8.6.1:
75
76
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
77
    OPAM_PINS: "coq version 8.6.1"
78

Ralf Jung's avatar
Ralf Jung committed
79
build-coq.8.6.0:
80
81
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
82
    OPAM_PINS: "coq version 8.6"