|
6 | 6 | concurrency: |
7 | 7 | # Skip intermediate builds: always. |
8 | 8 | group: ${{ github.workflow }}-${{ github.ref }} |
9 | | - cancel-in-progress: true # allways cancle old runs on new push |
| 9 | + cancel-in-progress: true # always cancel old runs on new push |
10 | 10 |
|
11 | 11 | permissions: |
12 | 12 | pull-requests: write |
13 | 13 | actions: write |
14 | 14 | contents: read |
15 | 15 |
|
16 | 16 | jobs: |
17 | | - run_benchmarks: |
18 | | - runs-on: ubuntu-latest |
19 | | - |
20 | | - steps: |
21 | | - - uses: actions/checkout@v4 |
22 | | - with: |
23 | | - fetch-depth: 0 # fetch all history |
24 | | - - uses: julia-actions/setup-julia@v2 |
25 | | - - uses: julia-actions/cache@v2 |
26 | | - - uses: julia-actions/julia-buildpkg@v1 |
27 | | - - name: Run benchmarks |
28 | | - env: |
29 | | - JULIA_NUM_THREADS: auto |
30 | | - working-directory: benchmark |
31 | | - run: | |
32 | | - julia --color=yes ./run_benchmarks.jl -t ${{github.event.pull_request.head.ref}} -b ${{github.event.pull_request.base.ref}} --no-data-export --prefix "" |
33 | | - echo '### Benchmark Results' > body.md |
34 | | - echo '' >> body.md |
35 | | - echo '```' >> body.md |
36 | | - cat comparison.txt >> body.md |
37 | | - echo '```' >> body.md |
38 | | - echo '' >> body.md |
39 | | - - name: Upload plot |
40 | | - uses: actions/upload-artifact@v4 |
41 | | - id: artifact-upload-step |
42 | | - with: |
43 | | - name: comparison.pdf |
44 | | - path: benchmark/comparison.pdf |
45 | | - - name: Link to graphic |
46 | | - run: | |
47 | | - echo '${{ steps.artifact-upload-step.outputs.artifact-url }}' >> benchmark/body.md |
48 | | - - uses: int128/hide-comment-action@v1 # hide all previous comments |
49 | | - - name: Comment on PR |
50 | | - uses: peter-evans/create-or-update-comment@v3 |
51 | | - with: |
52 | | - issue-number: ${{ github.event.pull_request.number }} |
53 | | - body-path: benchmark/body.md |
| 17 | + run_benchmarks: |
| 18 | + if: "!contains(github.event.pull_request.title, '[no benchmark]') && !contains(github.event.pull_request.body, '[no benchmark]')" |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + with: |
| 23 | + fetch-depth: 0 # fetch all history |
| 24 | + - uses: julia-actions/setup-julia@v2 |
| 25 | + - uses: julia-actions/cache@v2 |
| 26 | + - uses: julia-actions/julia-buildpkg@v1 |
| 27 | + - name: Run benchmarks |
| 28 | + env: |
| 29 | + JULIA_NUM_THREADS: auto |
| 30 | + working-directory: benchmark |
| 31 | + run: | |
| 32 | + julia --color=yes ./run_benchmarks.jl -t ${{github.event.pull_request.head.ref}} -b ${{github.event.pull_request.base.ref}} --no-data-export --prefix "" |
| 33 | + echo '### Benchmark Results' > body.md |
| 34 | + echo '' >> body.md |
| 35 | + echo '```' >> body.md |
| 36 | + cat comparison.txt >> body.md |
| 37 | + echo '```' >> body.md |
| 38 | + echo '' >> body.md |
| 39 | + - name: Upload plot |
| 40 | + uses: actions/upload-artifact@v4 |
| 41 | + id: artifact-upload-step |
| 42 | + with: |
| 43 | + name: comparison.pdf |
| 44 | + path: benchmark/comparison.pdf |
| 45 | + - name: Link to graphic |
| 46 | + run: | |
| 47 | + echo '${{ steps.artifact-upload-step.outputs.artifact-url }}' >> benchmark/body.md |
| 48 | + - uses: int128/hide-comment-action@v1 # hide all previous comments |
| 49 | + - name: Comment on PR |
| 50 | + uses: peter-evans/create-or-update-comment@v3 |
| 51 | + with: |
| 52 | + issue-number: ${{ github.event.pull_request.number }} |
| 53 | + body-path: benchmark/body.md |
0 commit comments