Skip to content

ci: Benchmark fix [WIP] #2942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
push:
branches:
- main
- dependabot/scottgerring/benchmark-fix
name: benchmark pull requests
permissions:
contents: read
Expand All @@ -25,10 +26,10 @@ jobs:
# If we're running on a PR, use ubuntu-latest - a shared runner. We can't use the self-hosted
# runners on arbitrary PRs, and we don't want to unleash that load on the pool anyway.
# If we're running on main, use the OTEL self-hosted runner pool.

# TODO - temporarily move main to the shared workers, until we've resolved the instance setup issue
#
# TODO - temporarily use self-hosted to get shared-worker environment going
runs-on: 'self-hosted'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR run appears to be against a special branch:

Job defined at: open-telemetry/opentelemetry-rust/.github/workflows/benchmark.yml@refs/pull/2942/merge

can you add dependabot/scottgerring/benchmark-fix to the workflow definition above?

on: 
  pull_request:
  push:
    branches:
      - main
      - dependabot/scottgerring/benchmark-fix

# runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'self-hosted' }}
runs-on: 'ubuntu-latest'
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'performance')) || github.event_name == 'push' }}
env:
# For PRs, compare against the base branch - e.g., 'main'.
Expand All @@ -43,9 +44,23 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 10 # Fetch current commit and its parent
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run benchmark inside Docker
run: |
docker run --rm \
-v "$PWD":/workspace \
-w /workspace \
rust:slim-bullseye \
bash -c "
apt-get update && apt-get install -y unzip cmake build-essential pkg-config curl git && \
cargo install cargo-criterion && \
cargo bench && \
echo 'Benchmark run complete inside Docker container'
"

# - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
with:
toolchain: stable
Expand Down
Loading