-
-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (50 loc) · 1.75 KB
/
work_precision_sets.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
permissions:
contents: write
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]" "matplotlib<=3.7"
- name: Clean README
run: |
rm README.md
touch README.md
- name: Run time_vs_* benchmarks for PyBaMM
run: |
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: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Update README"
- 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