Skip to content

Commit ba62282

Browse files
authored
Tweak benchmark CI (#501)
[only benchmarks]
1 parent d37e9dd commit ba62282

File tree

5 files changed

+34
-48
lines changed

5 files changed

+34
-48
lines changed

.buildkite/pipeline.yml

+23-27
Original file line numberDiff line numberDiff line change
@@ -129,33 +129,29 @@ steps:
129129
timeout_in_minutes: 60
130130

131131
- wait: ~
132+
continue_on_failure: true
132133

133-
- group: ":racehorse: Benchmarks"
134-
steps:
135-
- label: "Benchmarks"
136-
plugins:
137-
- JuliaCI/julia#v1:
138-
version: "1.11"
139-
command: |
140-
julia --project=perf -e '
141-
using Pkg
134+
- label: ":racehorse: Benchmarks"
135+
plugins:
136+
- JuliaCI/julia#v1:
137+
version: "1.11"
138+
command: |
139+
julia --project=perf -e '
140+
using Pkg
142141
143-
println("--- :julia: Instantiating project")
144-
Pkg.develop([PackageSpec(path=pwd())])
145-
Pkg.instantiate()
146-
push!(LOAD_PATH, @__DIR__)
142+
println("--- :julia: Instantiating project")
143+
Pkg.develop([PackageSpec(path=pwd())])
147144
148-
println("+++ :julia: Benchmarking")
149-
include("perf/runbenchmarks.jl")'
150-
artifact_paths:
151-
- "benchmarkresults.json"
152-
agents:
153-
queue: "juliaecosystem"
154-
os: "macos"
155-
arch: "aarch64"
156-
if: |
157-
!build.pull_request.repository.fork &&
158-
(build.message =~ /\[only benchmarks\]/ ||
159-
build.message !~ /\[only/ && !build.pull_request.draft &&
160-
build.message !~ /\[skip benchmarks\]/)
161-
timeout_in_minutes: 30
145+
println("+++ :julia: Benchmarking")
146+
include("perf/runbenchmarks.jl")'
147+
artifact_paths:
148+
- "benchmarkresults.json"
149+
agents:
150+
queue: "juliaecosystem"
151+
os: "macos"
152+
arch: "aarch64"
153+
if: |
154+
build.message =~ /\[only benchmarks\]/ ||
155+
build.message !~ /\[only/ && !build.pull_request.draft &&
156+
build.message !~ /\[skip benchmarks\]/
157+
timeout_in_minutes: 30

.buildkite/secure_pipeline.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ steps:
2525
queue: "juliaecosystem"
2626
os: "macos"
2727
arch: "aarch64"
28-
if: build.message !~ /\[skip docs\]/ && !build.pull_request.draft
28+
if: |
29+
build.message =~ /\[only docs\]/ ||
30+
build.message !~ /\[only/ && !build.pull_request.draft &&
31+
build.message !~ /\[skip docs\]/
2932
timeout_in_minutes: 30
0 Bytes
Binary file not shown.

.github/workflows/Benchmark.yml

+7-17
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Benchmarks
22
permissions:
3-
contents: write # contents permission to update benchmark contents in gh-pages branch
4-
statuses: read
5-
deployments: write # deployments permission to deploy GitHub pages website
6-
pull-requests: write
3+
statuses: read # find Buildkite URL from PR status
4+
contents: write # update benchmark contents in gh-pages branch
5+
pull-requests: write # comment on PR with benchmark results
6+
deployments: write # deploy GitHub pages website
77

88
on:
9-
pull_request:
9+
pull_request_target:
1010
branches:
1111
- main
1212
paths:
@@ -16,7 +16,6 @@ on:
1616
- "perf/**/*"
1717
- ".buildkite/**/*"
1818
- "Project.toml"
19-
- ".github/workflows/Benchmark.yml"
2019
push:
2120
branches:
2221
- main
@@ -27,26 +26,17 @@ on:
2726
- "perf/**/*"
2827
- ".buildkite/**/*"
2928
- "Project.toml"
30-
- ".github/workflows/Benchmark.yml"
3129

3230
jobs:
3331
benchmark:
34-
if: |
35-
(github.event_name != 'pull_request' ||
36-
github.event.pull_request.head.repo.full_name == github.repository) &&
37-
(contains(github.event.head_commit.message, '[only benchmarks]') ||
38-
!contains(github.event.head_commit.message, '[only') &&
39-
!contains(github.event.head_commit.message, '[skip benchmarks]') &&
40-
github.event.pull_request.draft == false)
4132
runs-on: ubuntu-latest
4233
steps:
43-
- uses: actions/checkout@v4
4434
- name: Download Buildkite Artifacts
4535
id: download
4636
uses: EnricoMi/download-buildkite-artifact-action@v1
4737
with:
4838
buildkite_token: ${{ secrets.BUILDKITE_TOKEN }}
49-
ignore_build_states: blocked,canceled,skipped,not_run,failed
39+
ignore_build_states: blocked,canceled,skipped,not_run
5040
ignore_job_states: timed_out,failed
5141
output_path: artifacts
5242

@@ -66,6 +56,6 @@ jobs:
6656
github-token: ${{ secrets.GITHUB_TOKEN }}
6757
comment-always: ${{ github.event_name == 'pull_request' }}
6858
summary-always: true
69-
alert-threshold: "150%"
59+
alert-threshold: "125%"
7060
fail-on-alert: false
7161
auto-push: ${{ github.event_name != 'pull_request' }}

perf/runbenchmarks.jl

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ using BenchmarkTools
77
using StableRNGs
88
rng = StableRNG(123)
99

10-
# to find untuned benchmarks
11-
BenchmarkTools.DEFAULT_PARAMETERS.evals = 0
12-
1310
# print system information
1411
@info "System information:\n" * sprint(io->Metal.versioninfo(io))
1512

0 commit comments

Comments
 (0)