.gitlab-ci.yml 1.66 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
13
  tags:
Ralf Jung's avatar
Ralf Jung committed
14
  - fp-timing
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
  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

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

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

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

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

77
build-coq.8.6:
78
  <<: *template
79
  stage: build_more
80
  variables:
Ralf Jung's avatar
Ralf Jung committed
81
    OPAM_PINS: "coq version 8.6"
Ralf Jung's avatar
Ralf Jung committed
82 83
  except:
  - triggers