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

3
4
stages:
  - build
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
19
  # build
20
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
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" && (( RANDOM % 10 == 0 )); then make validate; fi'
24
  cache:
25
    key: "$CI_JOB_NAME"
26
27
28
29
    paths:
    - opamroot/
  only:
  - master
30
31
  - /^ci/

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

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

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

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

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