Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tests/regression_…
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
wkerzendorf committed Dec 11, 2023
2 parents e5dedcc + df439d8 commit 0044907
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 103 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- master

pull_request_target:
branches:
- '*'
- master

types:
- opened
- reopened
Expand Down Expand Up @@ -38,10 +40,10 @@ jobs:
- name: Checkout pull/${{ github.event.number }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.sha }}
fetch-depth: 0
if: github.event_name == 'pull_request_target'

- name: Restore Atom Data
uses: actions/cache/restore@v3
id: atom-data-restore
Expand All @@ -62,24 +64,34 @@ jobs:
with:
path: benchmarks/data/kurucz_cd23_chianti_H_He.h5
key: atom-data

- name: Setup Mamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: benchmark
init-shell: >-
bash
create-args: >-
python
asv
mamba
- name: Install asv
run: pip install asv==0.5.*
run: pip install asv

- name: Accept all asv questions
run: asv machine --yes

- name: Run benchmarks for last 5 commits if not PR
if: github.event_name != 'pull_request_target'
continue-on-error: true
run: |
git log -n 5 --pretty=format:"%H" >> tag_commits.txt
asv run HASHFILE:tag_commits.txt | tee asv-output.log
if grep -q failed asv-output.log; then
echo "Some benchmarks have failed!"
exit 1
fi
- name: Generate Graphs and HTML
if: github.event_name != 'pull_request_target'
run: asv publish
Expand Down
2 changes: 1 addition & 1 deletion asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"
],
"branches": ["master"],
"environment_type": "conda",
"environment_type": "mamba",
"show_commit_url": "https://github.com/tardis-sn/tardis/commit",
"conda_environment_file": "tardis_env3.yml",
"benchmark_dir": "benchmarks",
Expand Down
2 changes: 2 additions & 0 deletions tardis/montecarlo/montecarlo_numba/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def test_montecarlo_radial1d():
assert False


@pytest.fixture(scope="function")
def montecarlo_main_loop_config(
@pytest.fixture(scope="function")
def montecarlo_main_loop_config(
config_montecarlo_1e5_verysimple,
Expand Down
Loading

0 comments on commit 0044907

Please sign in to comment.