-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated bechmarks to gitlab (#1151)
* ci: bench pipeline refactored to gitlab * fix: missing label trigger * Corrected env variable GITHUB_SHA * fix: corrected url * ci: actions trigger and download benchmarks correctly (at least in my machine) --------- Co-authored-by: Fabian Hoppe <112093564+mrfh92@users.noreply.github.com> Co-authored-by: Claudia Comito <39374113+ClaudiaComito@users.noreply.github.com>
- Loading branch information
1 parent
7482f14
commit f9d1919
Showing
4 changed files
with
83 additions
and
90 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Benchmarks report | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
job_id: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
bench_report: | ||
name: Benchmark report | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: "Download artifact" | ||
run: | | ||
curl --location \ | ||
--header "PRIVATE-TOKEN: ${{ secrets.GITLAB_TOKEN }}" \ | ||
--output perun_benchmarks.json \ | ||
"https://codebase.helmholtz.cloud/api/v4/projects/7930/jobs/${{ inputs.job_id }}/artifacts/heat/bench_data/perun_benchmarks.json" | ||
- name: Save benchmark result and update gh-pages-chart | ||
if: ${{github.ref == 'refs/heads/main'}} | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
# Benchmark action input and output | ||
tool: "customSmallerIsBetter" | ||
output-file-path: perun_benchmarks.json | ||
# Alert configuration | ||
fail-on-alert: false # Don't fail on main branch | ||
comment-on-alert: true | ||
# Save benchmarks from the main branch | ||
save-data-file: true | ||
# Pages configuration | ||
auto-push: true | ||
gh-pages-branch: gh-pages | ||
benchmark-data-dir-path: dev/bench | ||
- name: Compare benchmark result | ||
if: ${{github.ref != 'refs/heads/main'}} | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
# Benchmark action input and output | ||
tool: 'customSmallerIsBetter' | ||
output-file-path: perun_benchmarks.json | ||
# Alert configuration | ||
fail-on-alert: true | ||
comment-on-alert: true | ||
# Ignore results from non main branches. | ||
save-data-file: false | ||
# Pages configuration | ||
auto-push: false | ||
gh-pages-branch: gh-pages | ||
benchmark-data-dir-path: dev/bench |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Trigger benchmarks | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request_target: | ||
types: [opened, synchronize, reopened, labeled] | ||
|
||
jobs: | ||
trigger-benchmark: | ||
name: Trigger Benchmark | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger benchmarks (PR) | ||
id: setup_pr | ||
if: contains(github.event.pull_request.labels.*.name, 'benchmark PR') | ||
run: | | ||
curl -s -X POST --fail -F token=${{ secrets.BENCH_PIPE_TRIGGER }} -F "ref=main" -F "variables[PR]=${{ github.event.pull_request.number }}" https://codebase.helmholtz.cloud/api/v4/projects/7930/trigger/pipeline -o /dev/null | ||
- name: Trigger benchmarks (Push main) | ||
id: setup_push | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
curl -s -X POST \ | ||
--fail \ | ||
-F "token=${{ secrets.BENCH_PIPE_TRIGGER }}" \ | ||
-F "ref=main" \ | ||
-F "variables[SHA]=$GITHUB_SHA" \ | ||
https://codebase.helmholtz.cloud/api/v4/projects/7930/trigger/pipeline -o /dev/null |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.