Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
436dc4c
Temporarily skip other CI.
trexfeathers Oct 15, 2021
afd066f
Integrate ASV with Nox.
trexfeathers Oct 15, 2021
1df2bd5
GHA correct benchmarks directory path.
trexfeathers Oct 15, 2021
f33c999
GHA make .asv directory first.
trexfeathers Oct 15, 2021
29ffe46
GHA different handling of PR_BASE_SHA.
trexfeathers Oct 15, 2021
82a5f62
GHA different handling of PR_BASE_SHA.
trexfeathers Oct 15, 2021
2f84fac
GHA different handling of PR_BASE_SHA.
trexfeathers Oct 15, 2021
127edcd
GHA cache Nox-ASV env dir.
trexfeathers Oct 15, 2021
dd473eb
GHA display stdout and redirect to file.
trexfeathers Oct 15, 2021
dbdec04
GHA better branch handling.
trexfeathers Oct 15, 2021
6223022
GHA better branch handling.
trexfeathers Oct 15, 2021
1816e11
GHA mkdir --parents.
trexfeathers Oct 15, 2021
7fb1853
GHA also cache .nox directory.
trexfeathers Oct 15, 2021
75dc6a1
Restore Cirrus tasks.
trexfeathers Oct 15, 2021
415e90a
nox_asv_plugin licence header.
trexfeathers Oct 18, 2021
58135b7
GHA benchmarking fixed cache handling.
trexfeathers Oct 19, 2021
abc42eb
Nox ASV lazy import of _normalize_path.
trexfeathers Oct 19, 2021
f712540
Nox ASV raise RuntimeError after logging ASV error.
trexfeathers Oct 19, 2021
b031d55
Nox ASV simplify cached noxfile location.
trexfeathers Oct 19, 2021
ad3f16c
Nox ASV comment explaining Nox env location.
trexfeathers Oct 19, 2021
ef96386
Nox ASV disable user input requirements (i.e. matrix in asv.conf.json).
trexfeathers Oct 19, 2021
febc8e6
Nox ASV simplify cached noxfile location.
trexfeathers Oct 19, 2021
253c28b
Nox ASV added updated environment notification.
trexfeathers Oct 19, 2021
a9f90c1
Nox ASV make sure session_name is a string - improves type hinting.
trexfeathers Oct 19, 2021
acf12ef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2021
076fac9
Nox ASV just use try and finally during setup.
trexfeathers Oct 19, 2021
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
39 changes: 22 additions & 17 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,34 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Checkout the branches
- name: Fetch the PR base branch too
run: |
git fetch --depth=1 origin ${{ github.event.pull_request.base.ref }}
git branch _base FETCH_HEAD
git fetch --depth=1 origin ${{ github.ref }}
git branch _head FETCH_HEAD
echo PR_BASE_SHA=$(git rev-parse _base) >> $GITHUB_ENV

- name: Setup asv
- name: Install Nox
run: |
pip install asv
cd benchmarks
asv machine --yes
pip install nox

- name: Run benchmarks on source and target
run: |
cd benchmarks
asv continuous --factor 1.2 _base _head

- name: Write a compare file to the output folder
if: ${{ always() }}
- name: Cache .nox and .asv/env directories
id: cache-env-dir
uses: actions/cache@v2
with:
path: |
.nox
benchmarks/.asv/env
# Make sure GHA never gets an exact cache match by using the unique
# github.sha. This means it will always store this run as a new
# cache (Nox may have made relevant changes during run). Cache
# restoration still succeeds via the partial restore-key match.
key: ${{ runner.os }}-${{ github.sha }}
restore-keys: ${{ runner.os }}

- name: Run CI benchmarks
run: |
cd benchmarks
asv compare -s _base _head > .asv/compare.txt
mkdir --parents benchmarks/.asv
nox --session="benchmarks(ci compare)" | tee benchmarks/.asv/ci_compare.txt

- name: Archive asv results
if: ${{ always() }}
Expand All @@ -45,4 +50,4 @@ jobs:
name: asv-report
path: |
benchmarks/.asv/results
benchmarks/.asv/compare.txt
benchmarks/.asv/ci_compare.txt
13 changes: 8 additions & 5 deletions benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
"project": "scitools-iris",
"project_url": "https://github.com/SciTools/iris",
"repo": "..",
"environment_type": "conda-lock",
"environment_type": "nox-conda",
"show_commit_url": "http://github.com/scitools/iris/commit/",

"benchmark_dir": "./benchmarks",
"env_dir": ".asv/env",
"results_dir": ".asv/results",
"html_dir": ".asv/html",
"plugins": [".conda_lock_plugin"],
// this is not an asv standard config entry, just for our plugin
// path to lockfile, relative to project base
"conda_lockfile": "requirements/ci/nox.lock/py38-linux-64.lock"
"plugins": [".nox_asv_plugin"],
// The commit to checkout to first run Nox to set up the environment.
"nox_setup_commit": "HEAD",
// The path of the noxfile's location relative to the project root.
"noxfile_rel_path": "noxfile.py",
// The ``--session`` arg to be used with ``--install-only`` to prep an environment.
"nox_session_name": "tests"
}
71 changes: 0 additions & 71 deletions benchmarks/conda_lock_plugin.py

This file was deleted.

Loading