benchmark #46
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
name: benchmark | |
on: | |
workflow_run: | |
workflows: [tests] | |
types: [completed] | |
jobs: | |
run-benchmark: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Configure Email | |
run: git config --local user.email benchmark@actions.yaml | |
- name: Configure Name | |
run: git config --local user.name benchmark.yml | |
- name: Git Status | |
run: git status | |
- name: Run Benchmark | |
run: make microbenchmark CXX=clang++ CC=clang | |
- name: Stash Benchmark Results | |
run: git add micro-benchmark.md | |
- name: Commit Changes | |
run: git commit -m "..." | |
- name: Remove Other Changes | |
run: git checkout . | |
- name: Clean Artifacts | |
run: git clean -f -d | |
- name: Checkout Benchmark Branch | |
run: git checkout benchmarks | |
- name: Checkout Benchmark Markdown Results | |
run: git checkout main micro-benchmark.md | |
- name: Save Changes | |
run: git commit -m "run::$(date)" | |
- name: Push Changes To Benchmark Branch | |
run: git push --force | |
run-benchmark-failed: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | |
steps: | |
- name: rquirements failed | |
run: echo the tests failed | |
- name: force fail benchmark workflow | |
run: exit 1 |