Forked from
kwant / kwant
740 commits behind the upstream repository.
.gitlab-ci.yml 5.64 KiB
image: kwant/testing
stages:
- build
- test
- deploy
variables:
# rsync is used to send documentation to our web servers: we never send any
# secret information, and using 'ssh-keyscan' causes the CI server's IP to be blacklisted
IGNORE_HOSTKEY: "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
mirror repository:
stage: build
only:
- branches@kwant/kwant
allow_failure: true
variables:
REPOS: "git@github.com:kwant-project/kwant.git git@gitlab.com:kwant/kwant.git"
before_script:
- HOSTS=$(for REPO in $REPOS; do echo ${REPO%:*} | cut -d'@' -f2; done)
- mkdir ~/.ssh && chmod 700 ~/.ssh
- for HOST in $HOSTS; do ssh-keyscan $HOST >> ~/.ssh/known_hosts; done
- echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
after_script:
- rm -rf ~/.ssh
script:
- ORIGIN_URL=$(git config --get remote.origin.url)
- cd $(mktemp -d); git clone --bare $ORIGIN_URL .
- for REPO in $REPOS; do git push --mirror $REPO; done
build package:
stage: build
script:
- echo -e "[DEFAULT]\ndefine_macros = CYTHON_TRACE=1" >build.conf
- ./setup.py build
- ./setup.py build_ext -i
artifacts:
untracked: true
expire_in: 1 hour
check whitespace style:
stage: build
script: ./check_whitespace
allow_failure: true
check for dependencies installed:
stage: test
script:
- if [ -d .eggs ]; then echo "$(ls -d .eggs/*/) downloaded by build, update build environment" >&2; fi
allow_failure: true
build documentation:
stage: test
script:
- pip3 install sympy
- make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W'
artifacts:
paths:
- doc/build/html/
expire_in: 1 month
run tests:
stage: test
script: