.gitlab-ci.yml 1.94 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

Ralf Jung's avatar
Ralf Jung committed
7 8 9
variables:
  CPU_CORES: "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-timing
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
  - 'if test -n "$VALIDATE" && (( RANDOM % 10 == 0 )); then make validate; fi'
Ralf Jung's avatar
Ralf Jung committed
23
  cache:
Ralf Jung's avatar
Ralf Jung committed
24
    key: "$CI_JOB_NAME"
Ralf Jung's avatar
Ralf Jung committed
25 26 27 28
    paths:
    - opamroot/
  only:
  - master
29
  - /^ci/
Ralf Jung's avatar
Ralf Jung committed
30

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

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

53
build-coq.8.7.dev:
Ralf Jung's avatar
Ralf Jung committed
54 55
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
56
    OPAM_PINS: "coq version 8.7.dev   coq-mathcomp-ssreflect version dev"
Ralf Jung's avatar
Ralf Jung committed
57 58
  except:
  - triggers
Ralf Jung's avatar
Ralf Jung committed
59

Ralf Jung's avatar
Ralf Jung committed
60
build-coq.8.7.0:
61 62
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
63
    OPAM_PINS: "coq version 8.7.0   coq-mathcomp-ssreflect version 1.6.4"
64 65 66
  except:
  - triggers

Ralf Jung's avatar
Ralf Jung committed
67
build-coq.8.6.1:
68
  <<: *template
Ralf Jung's avatar
Ralf Jung committed
69
  variables:
Ralf Jung's avatar
Ralf Jung committed
70
    OPAM_PINS: "coq version 8.6.1   coq-mathcomp-ssreflect version 1.6.4"
71
#    VALIDATE: "1" # coqchk fails with a stack overflow
72 73 74
  artifacts:
    paths:
    - build-time.txt
Ralf Jung's avatar
Ralf Jung committed
75
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
76 77
  except:
  - triggers