Skip to content

Commit

Permalink
checkout upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
  • Loading branch information
officialasishkumar committed Jun 28, 2024
1 parent e74980d commit aea28c5
Showing 1 changed file with 33 additions and 32 deletions.
65 changes: 33 additions & 32 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ jobs:
path: benchmarks/data/kurucz_cd23_chianti_H_He.h5
key: atom-data

- name: Copy atom data to refdata
run: |
mkdir -p tardis-refdata/atom_data
cp benchmarks/data/kurucz_cd23_chianti_H_He.h5 tardis-refdata/atom_data/
- name: Setup Mamba
uses: mamba-org/setup-micromamba@v1
with:
Expand Down Expand Up @@ -115,15 +120,12 @@ jobs:
target-branch: main
target-directory: .asv

- name: Compare HEAD with master if PR
- name: Run benchmarks
if: github.event_name == 'pull_request_target'
continue-on-error: true # TODO: step failed sporadically while testing
run: |
asv continuous ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | tee asv-cont-output.log
if grep -q failed asv-cont-output.log; then
echo "Some benchmarks have errors!"
exit 1
fi
run: asv run --config asv.conf.json

- run: git remote add upstream https://github.com/tardis-sn/tardis.git
- run: git fetch upstream master

- name: Compare Master and PR head
run: asv compare upstream/master HEAD --config asv.conf.json | tee asv-compare-output.log
Expand Down Expand Up @@ -153,29 +155,6 @@ jobs:
echo "Some benchmarks have failed!"
exit 1
fi
- name: Generate Graphs and HTML of PR
if: github.event_name == 'pull_request_target'
working-directory: PR-${{ github.event.number }}
run: asv publish

- name: Delete env files of PR
if: github.event_name == 'pull_request_target'
run: rm -r PR-${{ github.event.number }}/.asv/env

- name: Push results of PR to results repository
if: github.event_name == 'pull_request_target'
continue-on-error: true
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.BOT_TOKEN }}
with:
source-directory: PR-${{ github.event.number }}
destination-github-username: tardis-sn
destination-repository-name: tardis-benchmarks
user-email: tardis.sn.bot@gmail.com
target-branch: main
target-directory: PR
- name: Find Comment
if: always() && github.event_name == 'pull_request_target'
Expand Down Expand Up @@ -227,6 +206,28 @@ jobs:
name: asv-benchmark-results-${{ runner.os }}
path: |
.asv/results
asv-cont-output.log
asv-compare-output.log
asv-compare-changed-output.log
- name: Generate Graphs and HTML of PR
if: github.event_name == 'pull_request_target'
working-directory: PR-${{ github.event.number }}
run: asv publish

- name: Delete env files of PR
if: github.event_name == 'pull_request_target'
run: rm -r PR-${{ github.event.number }}/.asv/env

- name: Push results of PR to results repository
if: github.event_name == 'pull_request_target'
continue-on-error: true
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.BOT_TOKEN }}
with:
source-directory: PR-${{ github.event.number }}
destination-github-username: tardis-sn
destination-repository-name: tardis-benchmarks
user-email: tardis.sn.bot@gmail.com
target-branch: main
target-directory: PR

0 comments on commit aea28c5

Please sign in to comment.