.gitlab-ci.yml 1.88 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
24
  # maybe generate and upload doc (has to be in this job as we need coq installed)
  - 'if [[ -n "$DOCDIR" ]]; then build/coqdoc; fi'
25
  cache:
26
    key: "$CI_JOB_NAME"
27
28
29
30
    paths:
    - opamroot/
  only:
  - master
31
32
  - /^ci/

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

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

Ralf Jung's avatar
Ralf Jung committed
53
54
55
build-coq.8.7.1:
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
56
    OPAM_PINS: "coq version 8.7.1"
Ralf Jung's avatar
Ralf Jung committed
57
    DOCDIR: "coqdoc@center.mpi-sws.org:/www/sws-websites/plv.mpi-sws.org/iris/stdpp-doc"
Ralf Jung's avatar
Ralf Jung committed
58
59
60
  except:
  - triggers

Ralf Jung's avatar
Ralf Jung committed
61
build-coq.8.7.0:
62
  <<: *template
Ralf Jung's avatar
Ralf Jung committed
63
  stage: build_more
64
  variables:
Ralf Jung's avatar
Ralf Jung committed
65
    OPAM_PINS: "coq version 8.7.0"
Ralf Jung's avatar
Ralf Jung committed
66
67
  except:
  - triggers
68

Ralf Jung's avatar
Ralf Jung committed
69
build-coq.8.6.1:
70
71
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
72
    OPAM_PINS: "coq version 8.6.1"
73
74
75
  artifacts:
    paths:
    - build-time.txt
Ralf Jung's avatar
Ralf Jung committed
76
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
77
78
  except:
  - triggers
79

Ralf Jung's avatar
Ralf Jung committed
80
build-coq.8.6.0:
81
  <<: *template
82
  stage: build_more
83
  variables:
Ralf Jung's avatar
Ralf Jung committed
84
    OPAM_PINS: "coq version 8.6"
Ralf Jung's avatar
Ralf Jung committed
85
86
  except:
  - triggers