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

Fix periodic benchmarks and remove version cap on asv #3379

Merged
merged 4 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
13 changes: 9 additions & 4 deletions .github/workflows/benchmark_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt install gfortran gcc libopenblas-dev

- name: Install python dependencies
# Pin asv==0.5.1 to fix failing benchmarks. Related to https://github.com/airspeed-velocity/asv/issues/1323
run: |
python -m pip install --upgrade pip wheel setuptools virtualenv asv==0.5.1 wget cmake casadi numpy
- name: Install SuiteSparse and Sundials
python -m pip install --upgrade pip wheel setuptools virtualenv wget cmake casadi numpy virtualenv packaging
python -m pip install asv[virtualenv]
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved

- name: Install SuiteSparse and SUNDIALS
run: python scripts/install_KLU_Sundials.py

- name: Fetch base branch
run: |
# This workflow also runs for merge commits
Expand All @@ -49,7 +53,8 @@ jobs:
HEAD_COMMIT=$(git rev-parse HEAD)
echo $BASE_COMMIT | tee commits_to_compare.txt
echo $HEAD_COMMIT | tee -a commits_to_compare.txt
asv run HASHFILE:commits_to_compare.txt --m "GitHubRunner" --show-stderr --strict -v
asv run HASHFILE:commits_to_compare.txt --m "GitHubRunner" --show-stderr -v
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved

- name: Compare commits' benchmark results
run: |
BASE_COMMIT=$(head -1 commits_to_compare.txt)
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/periodic_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt-get install gfortran gcc libopenblas-dev

- name: Install python dependencies
run: |
python -m pip install --upgrade pip wheel setuptools virtualenv asv wget cmake casadi numpy
- name: Install SuiteSparse and Sundials
python -m pip install --upgrade pip wheel setuptools virtualenv wget cmake casadi numpy virtualenv packaging
python -m pip install asv[virtualenv]
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved

- name: Install SuiteSparse and SUNDIALS
run: python scripts/install_KLU_Sundials.py

- name: Run benchmarks
run: |
asv machine --machine "GitHubRunner"
asv run --machine "GitHubRunner" NEW --show-stderr --strict -v
asv run --machine "GitHubRunner" NEW --show-stderr -v
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved
env:
SUNDIALS_INST: $HOME/.local
LD_LIBRARY_PATH: $HOME/.local/lib

- name: Upload results as artifact
uses: actions/upload-artifact@v3
with:
Expand All @@ -55,18 +62,22 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install asv
run: pip install asv

- name: Checkout pybamm-bench repo
uses: actions/checkout@v4
with:
repository: pybamm-team/pybamm-bench
token: ${{ secrets.BENCH_PAT }}

- name: Download results artifact
uses: actions/download-artifact@v3
with:
name: asv_new_results
path: new_results

- name: Copy new results and push to pybamm-bench repo
env:
PUSH_BENCH_EMAIL: ${{ secrets.PUSH_BENCH_EMAIL }}
Expand All @@ -78,6 +89,7 @@ jobs:
git add results
git commit -am "Add new results"
git push

- name: Publish results
run: |
asv publish
Expand Down
Loading