Skip to content
name: Generate work precision sets
on:
release:
types: [published]
workflow_dispatch:
jobs:
benchmarks_on_release:
if: github.repository_owner == 'pybamm-team'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Get current date
run: echo "VERSION=$(date +'%y.%-m')" >> $GITHUB_ENV
- name: Install PyBaMM
run: python -m pip install pybamm==${{ env.VERSION }}
- name: Run time_vs_* benchmarks for PyBaMM v${{ env.VERSION }}
run: |
python benchmarks/work_precision_sets/time_vs_dt_max.py
python benchmarks/work_precision_sets/time_vs_mesh_size.py
python benchmarks/work_precision_sets/time_vs_no_of_states.py
python benchmarks/work_precision_sets/time_vs_reltols.py
python benchmarks/work_precision_sets/time_vs_abstols.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
delete-branch: true
branch-suffix: short-commit-hash
commit-message: Work precision sets for PyBaMM version ${{ env.VERSION }}
title: Work precision sets for PyBaMM version ${{ env.VERSION }}
body: |
Update work precision sets for PyBaMM version ${{ env.VERSION }} in `release_work_precision_sets.md`