Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.95 KiB
Newer Older
image: ralfjung/opam-ci:latest

Ralf Jung's avatar
Ralf Jung committed
variables:
Ralf Jung's avatar
Ralf Jung committed
  CPU_CORES: "10"
Ralf Jung's avatar
Ralf Jung committed

.template: &template
Ralf Jung's avatar
Ralf Jung committed
  - fp
  script:
  # prepare
Ralf Jung's avatar
Ralf Jung committed
  - . build/opam-ci.sh $OPAM_PINS
Ralf Jung's avatar
Ralf Jung committed
  - env | egrep '^(CI_BUILD_REF|CI_RUNNER)' > build-env.txt
  - 'time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt'
  - 'if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi'
Ralf Jung's avatar
Ralf Jung committed
  - 'cat build-log.txt | egrep "[a-zA-Z0-9_/-]+ \((real|user): [0-9]" | tee build-time.txt'
Ralf Jung's avatar
Ralf Jung committed
  # maybe validate
  - 'if [[ -n "$VALIDATE" ]]; then make validate; fi'
  # maybe generate and upload doc (has to be in this job as we need coq installed)
  - 'if [[ -n "$DOCDIR" && "$CI_COMMIT_REF_NAME" == master ]]; then build/coqdoc; fi'
Ralf Jung's avatar
Ralf Jung committed
  # 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'
    key: "$CI_JOB_NAME"
    paths:
    - opamroot/
  only:
  - master
Ralf Jung's avatar
Ralf Jung committed
  except:
  - triggers
Ralf Jung's avatar
Ralf Jung committed
## Build jobs

build-coq.dev:
  <<: *template
  variables:
    OPAM_PINS: "coq version dev"
    VALIDATE: "1"

Ralf Jung's avatar
Ralf Jung committed
build-coq.8.8.dev:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.8.dev"
    VALIDATE: "1"

  <<: *template
  variables:
    OPAM_PINS: "coq version 8.7.2"
Ralf Jung's avatar
Ralf Jung committed
    OPAM_PKG: "coq-stdpp"
Ralf Jung's avatar
Ralf Jung committed
    DOCDIR: "coqdoc@center.mpi-sws.org:/stdpp"
Ralf Jung's avatar
Ralf Jung committed
  tags:
  - fp-timing
  artifacts:
    paths:
    - build-time.txt
    - build-env.txt
build-coq.8.7.1:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.7.1"

Ralf Jung's avatar
Ralf Jung committed
build-coq.8.7.0:
Ralf Jung's avatar
Ralf Jung committed
    OPAM_PINS: "coq version 8.7.0"
build-coq.8.6.1:
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
    OPAM_PINS: "coq version 8.6.1"
Ralf Jung's avatar
Ralf Jung committed
build-coq.8.6.0:
  <<: *template
  variables:
Ralf Jung's avatar
Ralf Jung committed
    OPAM_PINS: "coq version 8.6"