Skip to content

Commit e783389

Browse files
committed
update comment on fetch-depth
1 parent 749a335 commit e783389

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/pr_criterion.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- main
6+
name: benchmark pull requests
7+
jobs:
8+
runBenchmark:
9+
name: run benchmark
10+
permissions:
11+
pull-requests: write
12+
13+
# If we're running on a PR, use ubuntu-latest - a shared runner. We can't use the self-hosted
14+
# runners on arbitrary PRs, and we don't want to unleash that load on the pool anyway.
15+
# If we're running on main, use the OTEL self-hosted runner pool.
16+
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'self-hosted' }}
17+
if: |
18+
${{
19+
github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'performance') ||
20+
github.event_name == 'push'
21+
}}
22+
env:
23+
# For PRs, compare against the base branch
24+
# For pushes to main, compare against the previous commit
25+
BRANCH_NAME: ${{ github.event_name == 'pull_request' && github.base_ref || github.event.before }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 10 # Fetch current commit and a few layers up, so that we have enough to diff against the previous commit
30+
- uses: arduino/setup-protoc@v3
31+
with:
32+
repo-token: ${{ secrets.GITHUB_TOKEN }}
33+
- uses: dtolnay/rust-toolchain@master
34+
with:
35+
toolchain: stable
36+
- uses: boa-dev/criterion-compare-action@v3
37+
with:
38+
cwd: opentelemetry
39+
branchName: ${{ env.BRANCH_NAME }}
40+
- uses: boa-dev/criterion-compare-action@v3
41+
with:
42+
cwd: opentelemetry-appender-tracing
43+
features: spec_unstable_logs_enabled
44+
branchName: ${{ env.BRANCH_NAME }}
45+
- uses: boa-dev/criterion-compare-action@v3
46+
with:
47+
cwd: opentelemetry-sdk
48+
features: rt-tokio,testing,metrics,logs,spec_unstable_metrics_views
49+
branchName: ${{ env.BRANCH_NAME }}

0 commit comments

Comments
 (0)