workflow_dispatch #908
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate work precision sets | |
on: | |
repository_dispatch: | |
types: [release, workflow_dispatch] | |
# does not work at the moment | |
# 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 | |
# python benchmarks/work_precision_sets/comsol_comparison.py | |
# python benchmarks/work_precision_sets/ecker_comparison.py | |
jobs: | |
benchmarks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install pybamm | |
run: python -m pip install -U "pybamm[all,jax]" | |
- name: Run time_vs_* benchmarks for PyBaMM | |
run: | | |
python benchmarks/work_precision_sets/time_vs_dt_max.py | |
python benchmarks/work_precision_sets/discharge_curve.py | |
- name: Update README | |
run: | | |
python -c "from make_release import get_release, get_version; get_release(); get_version()" | |
echo ${{ env.VERSION }} | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ env.VERSION }} | |
body_path: README.md |