enable external inputs #138
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 a pull request | |
on: | |
pull_request: | |
concurrency: | |
# Skip intermediate builds: always. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true # allways cancle old runs on new push | |
permissions: | |
pull-requests: write | |
actions: write | |
contents: read | |
jobs: | |
run_benchmarks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # fetch all history | |
- uses: julia-actions/setup-julia@v2 | |
- uses: julia-actions/cache@v2 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- name: Run benchmarks | |
env: | |
JULIA_NUM_THREADS: auto | |
working-directory: benchmark | |
run: | | |
julia --color=yes ./run_benchmarks.jl -t ${{github.event.pull_request.head.ref}} -b ${{github.event.pull_request.base.ref}} --no-data-export --prefix "" | |
echo '### Benchmark Results' > body.md | |
echo '' >> body.md | |
echo '```' >> body.md | |
cat comparison.txt >> body.md | |
echo '```' >> body.md | |
echo '' >> body.md | |
- name: Upload plot | |
uses: actions/upload-artifact@v4 | |
id: artifact-upload-step | |
with: | |
name: comparison.pdf | |
path: benchmark/comparison.pdf | |
- name: Link to graphic | |
run: | | |
echo '${{ steps.artifact-upload-step.outputs.artifact-url }}' >> benchmark/body.md | |
- uses: int128/hide-comment-action@v1 # hide all previous comments | |
- name: Comment on PR | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-path: benchmark/body.md |