image: ralfjung/opam-ci:opam2

stages:
  - build

variables:
  CPU_CORES: "10"

.template: &template
  stage: build
  tags:
  - fp
  script:
  - git clone https://gitlab.mpi-sws.org/iris/ci.git ci -b opam2
  - ci/buildjob
  cache:
    key: "$CI_JOB_NAME"
    paths:
    - opamroot/
  only:
  - master@iris/iris
  - /^ci/@iris/iris
  except:
  - triggers
  - schedules
  - api

## Build jobs

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

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

build-coq.8.10.2:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.10.2"
    OPAM_PKG: "coq-iris"
    DOC_DIR: "coqdoc@center.mpi-sws.org:iris"
    DOC_OPTS: "--external https://plv.mpi-sws.org/coqdoc/stdpp/ stdpp"
    TIMING_CONF: "coq-8.10.2"
  tags:
  - fp-timing

build-coq.8.9.1:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.9.1"

build-coq.8.8.2:
  <<: *template
  variables:
    OPAM_PINS: "coq version 8.8.2"
