Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: CI asv benchmarks #144

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
image: quantumtinkerer/research

cache:
paths:
- .pip


stages:
- test
- deploy


before_script:
- mkdir -p .pip
- pip install asv scikit-optimize
- pip install -r test-requirements.txt
- asv machine --config=benchmarks/asv.conf.json --yes


test:
stage: test
script:
- pip install -r test-requirements.txt
- conda install -y -q scikit-optimize
Expand All @@ -9,12 +27,48 @@ test:
paths:
- htmlcov


authors check:
stage: test
script:
- MISSING_AUTHORS=$(git shortlog -s HEAD | sed -e "s/^[0-9\t ]*//"| xargs -i sh -c 'grep -q "{}" AUTHORS.md || echo "{} missing from authors"')
- if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi
allow_failure: true


check whitespace style:
script: ./check_whitespace
allow_failure: true


benchmarks for master:
stage: test
script:
- asv run --config=benchmarks/asv.conf.json --skip-existing-commits ALL
artifacts:
paths:
- benchmarks/results
- benchmarks/env
expire_in: 7d
only:
- master


benchmarks not master:
stage: test
script:
- asv run --config=benchmarks/asv.conf.json master..${CI_COMMIT_REF_NAME}
except:
- master


upload benchmarks:
stage: deploy
before_script:
- mkdir -p ~/.ssh && ssh-keyscan tnw-tn1.tudelft.net >> ~/.ssh/known_hosts
- echo $WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script:
- asv publish
- "rsync -ravz --delete benchmarks/html/* [email protected]:"
after_script:
- rm -rf ~/.ssh