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

3 4
stages:
  - build
5
  - deploy
6

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

10
.template: &template
11
  stage: build
12
  tags:
Ralf Jung's avatar
Ralf Jung committed
13
  - fp-timing
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
18
  # build
19
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
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'
22
  - 'if test -n "$VALIDATE" && (( RANDOM % 10 == 0 )); then make validate; fi'
23
  cache:
24
    key: "$CI_JOB_NAME"
25 26 27 28
    paths:
    - opamroot/
  only:
  - master
29 30
  - /^ci/

31
opam:
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 37
  variables:
    OPAM_PKG: "coq-stdpp"
38 39
  only:
  - master
Ralf Jung's avatar
Ralf Jung committed
40 41
  except:
  - triggers
42

Ralf Jung's avatar
Ralf Jung committed
43
build-coq.8.7.dev:
44 45
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
46
    OPAM_PINS: "coq version 8.7.dev"
Ralf Jung's avatar
Ralf Jung committed
47 48
  except:
  - triggers
49

Ralf Jung's avatar
Ralf Jung committed
50
build-coq.8.7.0:
51 52
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
53
    OPAM_PINS: "coq version 8.7.0"
Ralf Jung's avatar
Ralf Jung committed
54 55
  except:
  - triggers
56

Ralf Jung's avatar
Ralf Jung committed
57
build-coq.8.6.1:
58 59
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
60
    OPAM_PINS: "coq version 8.6.1"
Ralf Jung's avatar
Ralf Jung committed
61
    VALIDATE: "1"
62 63 64
  artifacts:
    paths:
    - build-time.txt
Ralf Jung's avatar
Ralf Jung committed
65
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
66 67
  except:
  - triggers
68

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