.gitlab-ci.yml 1.64 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
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
Ralf Jung's avatar
Ralf Jung committed
17
  # build
18
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
Ralf Jung's avatar
Ralf Jung committed
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
23
24
  # 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
25
  cache:
Ralf Jung's avatar
Ralf Jung committed
26
    key: "$CI_JOB_NAME"
Ralf Jung's avatar
Ralf Jung committed
27
28
29
30
    paths:
    - opamroot/
  only:
  - master
31
  - /^ci/
Ralf Jung's avatar
Ralf Jung committed
32
33
  except:
  - triggers
34
  - schedules
35

Ralf Jung's avatar
Ralf Jung committed
36
37
## Build jobs

38
build-coq.dev:
Ralf Jung's avatar
Ralf Jung committed
39
40
  <<: *template
  variables:
41
42
    OPAM_PINS: "coq version dev   coq-mathcomp-ssreflect version dev"
    VALIDATE: "1"
Ralf Jung's avatar
Ralf Jung committed
43

Ralf Jung's avatar
Ralf Jung committed
44
45
46
47
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
48
    OPAM_PKG: "coq-iris"
Ralf Jung's avatar
Ralf Jung committed
49
50
51
52
53
54
  tags:
  - fp-timing
  artifacts:
    paths:
    - build-time.txt
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
55

Ralf Jung's avatar
Ralf Jung committed
56
build-coq.8.7.0:
57
58
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
59
    OPAM_PINS: "coq version 8.7.0   coq-mathcomp-ssreflect version 1.6.4"
60

Ralf Jung's avatar
Ralf Jung committed
61
build-coq.8.6.1:
62
  <<: *template
Ralf Jung's avatar
Ralf Jung committed
63
  variables:
Ralf Jung's avatar
Ralf Jung committed
64
    OPAM_PINS: "coq version 8.6.1   coq-mathcomp-ssreflect version 1.6.4"