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

3
4
stages:
  - build
Ralf Jung's avatar
Ralf Jung committed
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
Ralf Jung's avatar
Ralf Jung committed
19
  # build
20
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
Ralf Jung's avatar
Ralf Jung committed
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'
Ralf Jung's avatar
Ralf Jung committed
23
  cache:
Ralf Jung's avatar
Ralf Jung committed
24
    key: "$CI_JOB_NAME"
Ralf Jung's avatar
Ralf Jung committed
25
26
27
    paths:
    - opamroot/
  only:
28
  - gen_proofmode
29
  - /^ci/
Ralf Jung's avatar
Ralf Jung committed
30

31
opam:
Ralf Jung's avatar
Ralf Jung committed
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" -F "variables[OPAM_PREFIX]=branch.gen_proofmode" https://gitlab.mpi-sws.org/api/v4/projects/581/trigger/pipeline
Ralf Jung's avatar
Ralf Jung committed
36
  variables:
Ralf Jung's avatar
Ralf Jung committed
37
    OPAM_PKG: "coq-iris"
38
  only:
39
  - gen_proofmode
Ralf Jung's avatar
Ralf Jung committed
40
41
  except:
  - triggers
42

Jacques-Henri Jourdan's avatar
Jacques-Henri Jourdan committed
43
build-coq.8.7.1:
Ralf Jung's avatar
Ralf Jung committed
44
45
  <<: *template
  variables:
Jacques-Henri Jourdan's avatar
Jacques-Henri Jourdan committed
46
    OPAM_PINS: "coq version 8.7.1"
47
48
49
  artifacts:
    paths:
    - build-time.txt
Ralf Jung's avatar
Ralf Jung committed
50
    - build-env.txt
Ralf Jung's avatar
Ralf Jung committed
51
52
  except:
  - triggers