Skip to content
Snippets Groups Projects
Commit a8f27348 authored by Ralf Jung's avatar Ralf Jung
Browse files

update CI

parent 208bf810
No related branches found
No related tags found
No related merge requests found
...@@ -5,25 +5,14 @@ stages: ...@@ -5,25 +5,14 @@ stages:
variables: variables:
CPU_CORES: "10" CPU_CORES: "10"
GIT_SUBMODULE_STRATEGY: "recursive"
.template: &template .template: &template
stage: build stage: build
tags: tags:
- fp - fp
script: script:
# prepare - ci/buildjob
- . build/opam-ci.sh $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" https://gitlab.mpi-sws.org/api/v4/projects/581/trigger/pipeline; 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"
DOCDIR: "coqdoc@center.mpi-sws.org:/stdpp" DOC_DIR: "coqdoc@center.mpi-sws.org:/stdpp"
TIMING_PROJECT: "stdpp"
TIMING_CONF: "coq-8.7.2"
tags: tags:
- fp-timing - fp-timing
artifacts:
paths:
- build-time.txt
- build-env.txt
build-coq.8.7.1: build-coq.8.7.1:
<<: *template <<: *template
......
[submodule "ci"]
path = ci
url = https://gitlab.mpi-sws.org/FP/iris-ci.git
#!/bin/bash
# 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/"
#!/bin/bash
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 https://coq.inria.fr/opam/extra-dev -p 0
test -d "$OPAMROOT/repo/coq-core-dev" || opam repo add coq-core-dev https://coq.inria.fr/opam/core-dev -p 5
else
# 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
fi
test -d "$OPAMROOT/repo/coq-released" || opam repo add coq-released https://coq.inria.fr/opam/released -p 10
test -d "$OPAMROOT/repo/iris-dev" || opam repo add iris-dev https://gitlab.mpi-sws.org/FP/opam-dev.git -p 20
echo
# 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.
echo
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"
else
echo "[opam-ci] $KIND-pinning $PACKAGE to $VERSION"
opam pin add -y -k "$KIND" "$PACKAGE" "$VERSION"
fi
done
# Upgrade cached things.
echo
echo "[opam-ci] Upgrading opam"
opam upgrade -y --fixup && opam upgrade -y
# Install build-dependencies.
echo
echo "[opam-ci] Installing build-dependencies"
make build-dep OPAMFLAGS=-y
# done
set +x
echo
coqc -v
#!/bin/bash
_DIR=$(readlink -e "$(dirname "$0")")
exec ssh -o StrictHostKeyChecking=yes -o UserKnownHostsFile="${_DIR}/ssh_host_keys" "$@"
# center.mpi-sws.org
center.mpi-sws.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHG8dNazSgw2XgGFi9/vEs8+VKYX66SlWVy6wx+3rZU5
center.mpi-sws.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDC4vIw4pgkQc2mKEpl99wERvpBsvAqU6UwKVL02n+fNuRn2FAzH+sD4NbmVoSjoCuQ+NlGI+HSbdJDzfQUtAoWcPv+65LeJF9IK67YerAl1Kc9m0srs0QbEPKFMB2Ef48FS7QN+aJtljz28qObytsxYxwsCVX+3vcZnEiYRZVixqWCA1MBkDePnOIbUysbqoBEKG1urf0h8K72Qtpo1IO20jLUnWUSuGy+WdfVW8pDnUTFn1z+Diex0uvMvlPrgJ74S81tklTMIRaMmqBhMs6hDtAg2EmR6GMV0N8RlPnhDeKxJOHwSM786yWqiLB4BQ82l6UCyr5tizOH0LryImII1Wwx5RQivUlFGf+NwVIcUsOg4eGcXxqOEr55vg5B8P4z2iL3M5SUbg1htA8N4QmxRaamCVkNvXP6hwTdI8CIx2LUZP1OKbohT4FmiMOfNh6TiHsJw4Ke/cgo3oNDvxnadEOGhOezw4LolzB0N9UCMRxYw3nn16KqasB2gJWme0vpkKEmiCi5RoJ93rSfkfjyqjKYgsNaP3qMZm/i6NM/M008HPmG0a7nx6SYTlYK4D7YMzBmaaMgtzDQF0edvL3FCmTFmt6pc6DHhP/UqPSQJHIGzSomOTiRTR5PoXciket3W1z4ZpGUcsCl12cA3MSvcAKor7QGveR+ENUEuvzhew==
Subproject commit e5c453511fcab2d178f687a5f226efd44f54b7f4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment