benchmarking script #7
Workflow file for this run
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: [pull_request, push] | |
jobs: | |
benchmark: | |
runs-on: ubuntu-latest | |
container: dolfinx/dolfinx:stable | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install local package and dependencies | |
run: | | |
pip install .[test] | |
- name: Download previous benchmark data | |
uses: actions/cache@v1 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-benchmark | |
- name: Run benchmark | |
run: | | |
pytest benchmark.py --benchmark-json output.json | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: 'pytest' | |
output-file-path: output.json | |
external-data-json-path: ./cache/benchmark-data.json | |
fail-on-alert: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
comment-on-alert: true |