Commit a8f27348 authored by Ralf Jung's avatar Ralf Jung

update CI

parent 208bf810
...@@ -5,25 +5,14 @@ stages: ...@@ -5,25 +5,14 @@ stages:
variables: variables:
.template: &template .template: &template
stage: build stage: build
tags: tags:
- fp - fp
script: script:
# prepare - ci/buildjob
- . build/ $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'
- 'if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi'
- '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 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'
# 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"; fi'
cache: cache:
key: "$CI_JOB_NAME" key: "$CI_JOB_NAME"
paths: paths:
...@@ -33,6 +22,7 @@ variables: ...@@ -33,6 +22,7 @@ variables:
- /^ci/ - /^ci/
except: except:
- triggers - triggers
- schedules
## Build jobs ## Build jobs
...@@ -53,13 +43,11 @@ build-coq.8.7.2: ...@@ -53,13 +43,11 @@ build-coq.8.7.2:
variables: variables:
OPAM_PINS: "coq version 8.7.2" OPAM_PINS: "coq version 8.7.2"
OPAM_PKG: "coq-stdpp" OPAM_PKG: "coq-stdpp"
TIMING_CONF: "coq-8.7.2"
tags: tags:
- fp-timing - fp-timing
- build-time.txt
- build-env.txt
build-coq.8.7.1: build-coq.8.7.1:
<<: *template <<: *template
[submodule "ci"]
path = ci
url =
# Script to automatically generate and publish coqdoc via CI.
# This reads the following environment variables:
# - DOCDIR: The directory to upload the documentation to
set -e
echo "Publishing documentation from branch $CI_COMMIT_REF_NAME to $DOCDIR"
# We need a custom wrapper around SSH to use our settings, and ssh-agent for the key
eval $(ssh-agent -s)
echo "${COQDOC_KEY}" | tr -d '\r' | ssh-add -
export GIT_SSH=$(readlink -e "$(dirname "$0")/ssh")
# Enable tracing mode *after* we did the secret key stuff above
set -x
# Generate documentation
make html
# Upload documentation
rsync -a --delete -e "$GIT_SSH" html/ "$DOCDIR/"
set -e
set -x
## This script installs the build dependencies for CI builds.
# Prepare OPAM configuration
export OPAMROOT="$(pwd)/opamroot"
export OPAMJOBS="$((2*$CPU_CORES))"
export OPAM_EDITOR="$(which false)"
# Make sure we got a good OPAM.
test -d "$OPAMROOT" || (mkdir "$OPAMROOT" && opam init --no-setup -y)
eval `opam conf env`
# Make sure the pin for the builddep package is not stale.
make build-dep/opam
# Update repositories
opam update
# Make sure we got the right set of repositories registered
if echo "$@" | fgrep "dev" > /dev/null; then
# We are compiling against a dev version of something. Get ourselves the dev repositories.
test -d "$OPAMROOT/repo/coq-extra-dev" || opam repo add coq-extra-dev -p 0
test -d "$OPAMROOT/repo/coq-core-dev" || opam repo add coq-core-dev -p 5
# No dev version, make sure we do not have the dev repositories.
test -d "$OPAMROOT/repo/coq-extra-dev" && opam repo remove coq-extra-dev
test -d "$OPAMROOT/repo/coq-core-dev" && opam repo remove coq-core-dev
test -d "$OPAMROOT/repo/coq-released" || opam repo add coq-released -p 10
test -d "$OPAMROOT/repo/iris-dev" || opam repo add iris-dev -p 20
# We really want to run all of the following in one opam transaction, but due to opam limitations,
# that is not currently possible.
# Install fixed versions of some dependencies.
while (( "$#" )); do # while there are arguments left
PACKAGE="$1" ; shift
KIND="$1" ; shift
VERSION="$1" ; shift
# Check if the pin is already set
read -a PIN <<< $(opam pin list | (egrep "^$PACKAGE[. ]"))
if [[ "${PIN[1]}" == "$KIND" && "${PIN[2]}" == "$VERSION" ]]; then
echo "[opam-ci] $PACKAGE already $KIND-pinned to $VERSION"
echo "[opam-ci] $KIND-pinning $PACKAGE to $VERSION"
opam pin add -y -k "$KIND" "$PACKAGE" "$VERSION"
# Upgrade cached things.
echo "[opam-ci] Upgrading opam"
opam upgrade -y --fixup && opam upgrade -y
# Install build-dependencies.
echo "[opam-ci] Installing build-dependencies"
make build-dep OPAMFLAGS=-y
# done
set +x
coqc -v
_DIR=$(readlink -e "$(dirname "$0")")
exec ssh -o StrictHostKeyChecking=yes -o UserKnownHostsFile="${_DIR}/ssh_host_keys" "$@"
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHG8dNazSgw2XgGFi9/vEs8+VKYX66SlWVy6wx+3rZU5 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDC4vIw4pgkQc2mKEpl99wERvpBsvAqU6UwKVL02n+fNuRn2FAzH+sD4NbmVoSjoCuQ+NlGI+HSbdJDzfQUtAoWcPv+65LeJF9IK67YerAl1Kc9m0srs0QbEPKFMB2Ef48FS7QN+aJtljz28qObytsxYxwsCVX+3vcZnEiYRZVixqWCA1MBkDePnOIbUysbqoBEKG1urf0h8K72Qtpo1IO20jLUnWUSuGy+WdfVW8pDnUTFn1z+Diex0uvMvlPrgJ74S81tklTMIRaMmqBhMs6hDtAg2EmR6GMV0N8RlPnhDeKxJOHwSM786yWqiLB4BQ82l6UCyr5tizOH0LryImII1Wwx5RQivUlFGf+NwVIcUsOg4eGcXxqOEr55vg5B8P4z2iL3M5SUbg1htA8N4QmxRaamCVkNvXP6hwTdI8CIx2LUZP1OKbohT4FmiMOfNh6TiHsJw4Ke/cgo3oNDvxnadEOGhOezw4LolzB0N9UCMRxYw3nn16KqasB2gJWme0vpkKEmiCi5RoJ93rSfkfjyqjKYgsNaP3qMZm/i6NM/M008HPmG0a7nx6SYTlYK4D7YMzBmaaMgtzDQF0edvL3FCmTFmt6pc6DHhP/UqPSQJHIGzSomOTiRTR5PoXciket3W1z4ZpGUcsCl12cA3MSvcAKor7QGveR+ENUEuvzhew==
Subproject commit e5c453511fcab2d178f687a5f226efd44f54b7f4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment