.gitlab-ci.yml 2.07 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
  - deploy
6
  - build_more
7

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

11
.template: &template
12
  stage: build
Ralf Jung's avatar
Ralf Jung committed
13
  tags:
Ralf Jung's avatar
Ralf Jung committed
14
  - fp-timing
Ralf Jung's avatar
Ralf Jung committed
15
16
  script:
  # prepare
Ralf Jung's avatar
Ralf Jung committed
17
  - . build/opam-ci.sh $OPAM_PINS
Ralf Jung's avatar
Ralf Jung committed
18
  - env | egrep '^(CI_BUILD_REF|CI_RUNNER)' > build-env.txt
Ralf Jung's avatar
Ralf Jung committed
19
  # build
20
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
Ralf Jung's avatar
Ralf Jung committed
21
  - 'if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi'
Ralf Jung's avatar
Ralf Jung committed
22
  - 'cat build-log.txt | egrep "[a-zA-Z0-9_/-]+ \((real|user): [0-9]" | tee build-time.txt'
23
  - 'if test -n "$VALIDATE"; then make validate; fi'
Ralf Jung's avatar
Ralf Jung committed
24
  cache:
Ralf Jung's avatar
Ralf Jung committed
25
    key: "$CI_JOB_NAME"
Ralf Jung's avatar
Ralf Jung committed
26
27
28
29
    paths:
    - opamroot/
  only:
  - master
30
  - /^ci/
Ralf Jung's avatar
Ralf Jung committed
31

32
opam:
Ralf Jung's avatar
Ralf Jung committed
33
  stage: deploy
34
35
  script:
  # Send a trigger to the repository doing the work
36
  - 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
Ralf Jung's avatar
Ralf Jung committed
37
  variables:
Ralf Jung's avatar
Ralf Jung committed
38
    OPAM_PKG: "coq-iris"
39
40
  only:
  - master
Ralf Jung's avatar
Ralf Jung committed
41
42
  except:
  - triggers
43

44
45
46
47
reverse-deps:
  stage: deploy
  script:
  # Send a trigger to reverse dependencies to have them tested
48
  - 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
49
50
  only:
  - master
Ralf Jung's avatar
Ralf Jung committed
51
52
  except:
  - triggers
53

54
build-coq.dev:
Ralf Jung's avatar
Ralf Jung committed
55
  <<: *template
56
  stage: build_more
Ralf Jung's avatar
Ralf Jung committed
57
  variables:
58
59
    OPAM_PINS: "coq version dev   coq-mathcomp-ssreflect version dev"
    VALIDATE: "1"
Ralf Jung's avatar
Ralf Jung committed
60
61
  except:
  - triggers
Ralf Jung's avatar
Ralf Jung committed
62

Ralf Jung's avatar
Ralf Jung committed
63
64
65
66
67
68
69
build-coq.8.7.1:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.7.1   coq-mathcomp-ssreflect version 1.6.4"
  except:
  - triggers

Ralf Jung's avatar
Ralf Jung committed
70
build-coq.8.7.0:
71
  <<: *template
Ralf Jung's avatar
Ralf Jung committed
72
  stage: build_more
73
  variables:
Ralf Jung's avatar
Ralf Jung committed
74
    OPAM_PINS: "coq version 8.7.0   coq-mathcomp-ssreflect version 1.6.4"
75
76
77
  except:
  - triggers

Ralf Jung's avatar
Ralf Jung committed
78
build-coq.8.6.1:
79
  <<: *template
Ralf Jung's avatar
Ralf Jung committed
80
  variables:
Ralf Jung's avatar
Ralf Jung committed
81
    OPAM_PINS: "coq version 8.6.1   coq-mathcomp-ssreflect version 1.6.4"
82
83
84
  artifacts:
    paths:
    - build-time.txt
Ralf Jung's avatar
Ralf Jung committed
85
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
86
87
  except:
  - triggers