Commit 3f51eb8a authored by Viacheslav Ostroukh's avatar Viacheslav Ostroukh 🚲
Browse files

sync .gitlab-ci.yml with master

This is done instead of picking all changes that were commited to master
and not reflected in stable.

Current master revision is 8a6d320b.
parent 68446fb4
Pipeline #74766 passed with stages
in 7 minutes and 47 seconds
...@@ -19,20 +19,14 @@ variables: ...@@ -19,20 +19,14 @@ variables:
stage: build-env stage: build-env
when: manual when: manual
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug-v0.16.0
entrypoint: [""] entrypoint: [""]
artifacts:
untracked: true
expire_in: 1 hour
before_script: before_script:
- mkdir -p /root/.docker - mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
build-env:ubuntu: build-env:ubuntu:
<<: *build-env <<: *build-env
only:
changes:
- docker/Dockerfile.ubuntu
script: script:
- /kaniko/executor - /kaniko/executor
--context $CI_PROJECT_DIR/docker --context $CI_PROJECT_DIR/docker
...@@ -41,9 +35,6 @@ build-env:ubuntu: ...@@ -41,9 +35,6 @@ build-env:ubuntu:
build-env:debian: build-env:debian:
<<: *build-env <<: *build-env
only:
changes:
- docker/Dockerfile.debian
script: script:
- /kaniko/executor - /kaniko/executor
--context $CI_PROJECT_DIR/docker --context $CI_PROJECT_DIR/docker
...@@ -52,10 +43,6 @@ build-env:debian: ...@@ -52,10 +43,6 @@ build-env:debian:
build-env:conda: build-env:conda:
<<: *build-env <<: *build-env
only:
changes:
- docker/Dockerfile.conda
- docker/*.yml
script: script:
- /kaniko/executor - /kaniko/executor
--context $CI_PROJECT_DIR/docker --context $CI_PROJECT_DIR/docker
...@@ -64,10 +51,6 @@ build-env:conda: ...@@ -64,10 +51,6 @@ build-env:conda:
build-env:default: build-env:default:
<<: *build-env <<: *build-env
only:
changes:
- docker/Dockerfile.conda
- docker/*.yml
script: script:
- /kaniko/executor - /kaniko/executor
--context $CI_PROJECT_DIR/docker --context $CI_PROJECT_DIR/docker
...@@ -160,6 +143,14 @@ check for dependencies installed: ...@@ -160,6 +143,14 @@ check for dependencies installed:
.test: &test .test: &test
stage: test
script:
- py.test -r w --flakes kwant --junitxml=tests.xml --durations=10
artifacts:
reports:
junit: tests.xml
.coverage: &coverage
stage: test stage: test
script: script:
- py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml --durations=10 - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml --durations=10
...@@ -209,6 +200,14 @@ test:bleeding-edge: ...@@ -209,6 +200,14 @@ test:bleeding-edge:
- schedules - schedules
allow_failure: true allow_failure: true
coverage:latest:
<<: *coverage
<<: *latest_env
dependencies:
- build:latest
only:
- schedules
## Documentation building ## Documentation building
build documentation: build documentation:
...@@ -217,7 +216,8 @@ build documentation: ...@@ -217,7 +216,8 @@ build documentation:
- build:latest - build:latest
stage: test stage: test
script: script:
- make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f - python -c 'from matplotlib import pyplot' # Pre-generate font cache
- make -C doc clean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
artifacts: artifacts:
paths: paths:
- doc/build/html/ - doc/build/html/
...@@ -229,7 +229,8 @@ build PDF documentation: ...@@ -229,7 +229,8 @@ build PDF documentation:
- build:latest - build:latest
stage: test stage: test
script: script:
- make -C doc latex SPHINXOPTS='-n -W' - python -c 'from matplotlib import pyplot' # Pre-generate font cache
- make -C doc latex SPHINXOPTS='-n -D jupyter_execute_default_kernel=kwant-latest'
- cd doc/build/latex - cd doc/build/latex
- make all-pdf - make all-pdf
artifacts: artifacts:
...@@ -252,19 +253,18 @@ check for broken links in doc: ...@@ -252,19 +253,18 @@ check for broken links in doc:
upload coverage: upload coverage:
stage: deploy stage: deploy
only: only:
- branches@kwant/kwant - schedules
dependencies:
- coverage:latest
environment: environment:
name: coverage/$CI_BUILD_REF_NAME name: coverage/$CI_BUILD_REF_NAME
url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG
on_stop: remove_coverage on_stop: remove_coverage
before_script:
- mkdir -p ~/.ssh
- echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $MASTER_WEBSITE_KEY | base64 -d | ssh-add -
- mv htmlcov $CI_BUILD_REF_SLUG - mv htmlcov $CI_BUILD_REF_SLUG
- rsync -rlv -e "$SSH_COMMAND" --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/ - rsync -rlv -e "$SSH_COMMAND" --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/
after_script:
- rm -rf ~/.ssh
remove_coverage: remove_coverage:
...@@ -275,14 +275,11 @@ remove_coverage: ...@@ -275,14 +275,11 @@ remove_coverage:
environment: environment:
name: coverage/$CI_BUILD_REF_NAME name: coverage/$CI_BUILD_REF_NAME
action: stop action: stop
before_script:
- mkdir -p ~/.ssh
- echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $MASTER_WEBSITE_KEY | base64 -d | ssh-add -
- mkdir empty/ - mkdir empty/
- rsync -rlv -e "$SSH_COMMAND" --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG - rsync -rlv -e "$SSH_COMMAND" --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
after_script:
- rm -rf ~/.ssh
upload documentation to the test server: upload documentation to the test server:
...@@ -293,13 +290,10 @@ upload documentation to the test server: ...@@ -293,13 +290,10 @@ upload documentation to the test server:
on_stop: remove_docs on_stop: remove_docs
only: only:
- branches@kwant/kwant - branches@kwant/kwant
before_script:
- mkdir -p ~/.ssh
- echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $TEST_WEBSITE_KEY | base64 -d | ssh-add -
- rsync -rlv -e "$SSH_COMMAND" --delete doc/build/html/* kwant2@test.kwant-project.org:doc/$CI_BUILD_REF_SLUG - rsync -rlv -e "$SSH_COMMAND" --delete doc/build/html/* kwant2@test.kwant-project.org:doc/$CI_BUILD_REF_SLUG
after_script:
- rm -rf ~/.ssh
remove_docs: remove_docs:
...@@ -310,14 +304,11 @@ remove_docs: ...@@ -310,14 +304,11 @@ remove_docs:
environment: environment:
name: docs review/$CI_BUILD_REF_NAME name: docs review/$CI_BUILD_REF_NAME
action: stop action: stop
before_script:
- mkdir -p ~/.ssh
- echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $TEST_WEBSITE_KEY | base64 -d | ssh-add -
- mkdir empty - mkdir empty
- rsync -arv -e "$SSH_COMMAND" --delete empty/ kwant2@test.kwant-project.org:doc/$CI_BUILD_REF_SLUG/ - rsync -arv -e "$SSH_COMMAND" --delete empty/ kwant2@test.kwant-project.org:doc/$CI_BUILD_REF_SLUG/
after_script:
- rm -rf ~/.ssh
upload dev version docs: upload dev version docs:
...@@ -327,13 +318,10 @@ upload dev version docs: ...@@ -327,13 +318,10 @@ upload dev version docs:
url: https://kwant-project.org/doc/dev url: https://kwant-project.org/doc/dev
only: only:
- master@kwant/kwant - master@kwant/kwant
before_script:
- mkdir -p ~/.ssh
- echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $MASTER_WEBSITE_KEY | base64 -d | ssh-add -
- rsync -rlv -e "$SSH_COMMAND" --delete doc/build/html/* kwant@kwant-project.org:doc/dev - rsync -rlv -e "$SSH_COMMAND" --delete doc/build/html/* kwant@kwant-project.org:doc/dev
after_script:
- rm -rf ~/.ssh
## Build documentation for tagged releases ## Build documentation for tagged releases
......
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