.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
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
  # maybe generate and upload doc (has to be in this job as we need coq installed)
Ralf Jung's avatar
Ralf Jung committed
24
  - 'if [[ -n "$DOCDIR" && "$CI_COMMIT_REF_NAME" == master ]]; 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:/stdpp"
Ralf Jung's avatar
Ralf Jung committed
58
59
60
61
62
63
  tags:
  - fp-timing
  artifacts:
    paths:
    - build-time.txt
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
64
65
66
  except:
  - triggers

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

Ralf Jung's avatar
Ralf Jung committed
75
build-coq.8.6.1:
76
77
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
78
    OPAM_PINS: "coq version 8.6.1"
Ralf Jung's avatar
Ralf Jung committed
79
80
  except:
  - triggers
81

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