.gitlab-ci.yml 1.06 KB
Newer Older
Ralf Jung's avatar
Ralf Jung committed
1
image: ralfjung/opam-ci:latest
Ralf Jung's avatar
Ralf Jung committed
2

Ralf Jung's avatar
Ralf Jung committed
3
4
5
6
7
8
9
10
stages:
  - build

variables:
  CPU_CORES: "10"

.template: &template
  stage: build
Ralf Jung's avatar
Ralf Jung committed
11
  tags:
Ralf Jung's avatar
Ralf Jung committed
12
  - fp
Ralf Jung's avatar
Ralf Jung committed
13
  script:
Ralf Jung's avatar
Ralf Jung committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  # prepare
  - . build/opam-ci.sh $OPAM_PINS
  - env | egrep '^(CI_BUILD_REF|CI_RUNNER)' > build-env.txt
  # build
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
  - 'cat build-log.txt | egrep "[a-zA-Z0-9_/-]+ \((real|user): [0-9]" | tee build-time.txt'
  # maybe validate
  - 'if [[ -n "$VALIDATE" ]]; then make validate; fi'
  # maybe create opam package
  - 'if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == master ]]; then 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; fi'
  cache:
    key: "$CI_JOB_NAME"
    paths:
    - opamroot/
Ralf Jung's avatar
Ralf Jung committed
28
  only:
Ralf Jung's avatar
fix CI    
Ralf Jung committed
29
  - gen_proofmode
Ralf Jung's avatar
Ralf Jung committed
30
31
32
33
34
35
  - /^ci/
  except:
  - triggers

## Build jobs

Ralf Jung's avatar
Ralf Jung committed
36
build-coq.8.7.2:
Ralf Jung's avatar
Ralf Jung committed
37
38
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
39
    OPAM_PINS: "coq version 8.7.2"