.gitlab-ci.yml 1.58 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
  # maybe validate
  - 'if [[ -n "$VALIDATE" ]]; then make validate; fi'
  # maybe create opam package
Ralf Jung's avatar
Ralf Jung committed
24
  - 'if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == gen_proofmode ]]; 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" -F "variables[OPAM_PREFIX]=branch.gen_proofmode" 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
    paths:
    - opamroot/
  only:
30
  - gen_proofmode
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
38
39
40
41
42
43
## Build jobs

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

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

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

build-coq.8.7.1:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.7.1"