Skip to content

Commit

Permalink
Add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
rkierulf committed Jun 27, 2024
1 parent be1d32f commit c138eea
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/Benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Benchmarks
on:
pull_request:
branches:
- main
paths:
- "KomaMRICore/src/**/*"
- "KomaMRICore/ext/**/*"
- "KomaMRICore/Project.toml"
- "KomaMRIBase/src/**/*"
- "KomaMRIBase/Project.toml"
- "bench/**/*"
- ".buildkite/**/*"
- "Project.toml"
push:
branches:
- main
- benchmark #TO-DO: remove this
paths:
- "KomaMRICore/src/**/*"
- "KomaMRICore/ext/**/*"
- "KomaMRICore/Project.toml"
- "KomaMRIBase/src/**/*"
- "KomaMRIBase/Project.toml"
- "bench/**/*"
- ".buildkite/**/*"
- "Project.toml"

jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Download Buildkite Artifacts
id: download
uses: EnricoMi/download-buildkite-artifact-action@v1
with:
buildkite_token: ${{ secrets.BUILDKITE_TOKEN }}
ignore_build_states: blocked,canceled,skipped,not_run,failed
ignore_job_states: timed_out,failed
output_path: artifacts
log_level: DEBUG #TO-DO: remove this
permissions:
metadata: read
contents: read
statuses: read

- name: Locate Benchmarks Artifact
id: locate
if: ${{ steps.download.download_state == success}}
run: echo "path=$(find artifacts -type f -name combinedbenchmarks.json)" >> $GITHUB_OUTPUT


- name: Upload Benchmark Results
if: ${{ steps.download.download_state == success && steps.locate.path != '' }}
uses: benchmark-action/github-action-benchmark@v1
name: KomaMRI Benchmarks
tool: 'julia'
output-file-path: ${{ steps.locate.path }}
summary-always: true
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-always: true
alert-threshold: "150%"
fail-on-alert: false
auto-push: ${{ github.event_name != 'pull_request' }}

0 comments on commit c138eea

Please sign in to comment.