-
-
Notifications
You must be signed in to change notification settings - Fork 928
ci: breakdown benchmarks #7641
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
ci: breakdown benchmarks #7641
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Benchmarks CSS | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| types: [ opened, synchronize ] | ||
| branches: | ||
| - main | ||
| - next | ||
| paths: | ||
| - 'Cargo.lock' | ||
| - 'crates/biome_css_analyze/**/*.rs' | ||
| - 'crates/biome_css_formatter/**/*.rs' | ||
| - 'crates/biome_css_parser/**/*.rs' | ||
| - 'crates/biome_css_*/**/*.rs' | ||
| - 'crates/biome_rowan/**/*.rs' | ||
| - 'crates/biome_parser/**/*.rs' | ||
| push: | ||
| branches: | ||
| - main | ||
| - next | ||
| paths: | ||
| - 'Cargo.lock' | ||
| - 'crates/biome_css_analyze/**/*.rs' | ||
| - 'crates/biome_css_formatter/**/*.rs' | ||
| - 'crates/biome_css_parser/**/*.rs' | ||
| - 'crates/biome_css_*/**/*.rs' | ||
| - 'crates/biome_rowan/**/*.rs' | ||
| - 'crates/biome_parser/**/*.rs' | ||
|
|
||
| env: | ||
| RUST_LOG: info | ||
|
|
||
| jobs: | ||
| bench: | ||
| permissions: | ||
| pull-requests: write | ||
| name: Bench | ||
| runs-on: depot-ubuntu-24.04-arm-16 | ||
| strategy: | ||
| matrix: | ||
| package: | ||
| - biome_css_parser | ||
| - biome_css_formatter | ||
| - biome_css_analyze | ||
|
|
||
| steps: | ||
|
|
||
| - name: Checkout PR Branch | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
|
|
||
| - name: Install toolchain | ||
| uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1.2.2 | ||
| with: | ||
| channel: stable | ||
| cache-target: release | ||
| bins: cargo-codspeed | ||
| cache-base: main | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Compile | ||
| timeout-minutes: 20 | ||
| run: cargo codspeed build -p ${{ matrix.package }} | ||
| env: | ||
| CARGO_BUILD_JOBS: 3 # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build | ||
|
|
||
| - name: Run the benchmarks | ||
| uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1 | ||
| timeout-minutes: 50 | ||
| with: | ||
| run: cargo codspeed run | ||
| token: ${{ secrets.CODSPEED_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,72 @@ | ||||||||||||
| name: Benchmarks GraphQL | ||||||||||||
|
|
||||||||||||
| on: | ||||||||||||
| workflow_dispatch: | ||||||||||||
| pull_request: | ||||||||||||
| types: [ opened, synchronize ] | ||||||||||||
| branches: | ||||||||||||
| - main | ||||||||||||
| - next | ||||||||||||
| paths: | ||||||||||||
| - 'Cargo.lock' | ||||||||||||
| - 'crates/biome_graphql_formatter/**/*.rs' | ||||||||||||
| - 'crates/biome_graphql_parser/**/*.rs' | ||||||||||||
| - 'crates/biome_graphql_*/**/*.rs' | ||||||||||||
| - 'crates/biome_rowan/**/*.rs' | ||||||||||||
| - 'crates/biome_parser/**/*.rs' | ||||||||||||
| push: | ||||||||||||
| branches: | ||||||||||||
| - main | ||||||||||||
| - next | ||||||||||||
| paths: | ||||||||||||
| - 'Cargo.lock' | ||||||||||||
| - 'crates/biome_graphql_formatter/**/*.rs' | ||||||||||||
| - 'crates/biome_graphql_parser/**/*.rs' | ||||||||||||
| - 'crates/biome_graphql_*/**/*.rs' | ||||||||||||
| - 'crates/biome_rowan/**/*.rs' | ||||||||||||
| - 'crates/biome_parser/**/*.rs' | ||||||||||||
|
|
||||||||||||
| env: | ||||||||||||
| RUST_LOG: info | ||||||||||||
|
|
||||||||||||
| jobs: | ||||||||||||
| bench: | ||||||||||||
| permissions: | ||||||||||||
| pull-requests: write | ||||||||||||
|
Comment on lines
+34
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restore contents read scope. Checkout needs Suggested tweak: permissions:
- pull-requests: write
+ pull-requests: write
+ contents: read📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| name: Bench | ||||||||||||
| runs-on: depot-ubuntu-24.04-arm-16 | ||||||||||||
| strategy: | ||||||||||||
| matrix: | ||||||||||||
| package: | ||||||||||||
| - biome_graphql_parser | ||||||||||||
| - biome_graphql_formatter | ||||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
|
|
||||||||||||
| - name: Checkout PR Branch | ||||||||||||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||||||||||||
| with: | ||||||||||||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||||||||||||
|
|
||||||||||||
| - name: Install toolchain | ||||||||||||
| uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1.2.2 | ||||||||||||
| with: | ||||||||||||
| channel: stable | ||||||||||||
| cache-target: release | ||||||||||||
| bins: cargo-codspeed | ||||||||||||
| cache-base: main | ||||||||||||
| env: | ||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
|
|
||||||||||||
| - name: Compile | ||||||||||||
| timeout-minutes: 20 | ||||||||||||
| run: cargo codspeed build -p ${{ matrix.package }} | ||||||||||||
| env: | ||||||||||||
| CARGO_BUILD_JOBS: 3 # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build | ||||||||||||
|
|
||||||||||||
| - name: Run the benchmarks | ||||||||||||
| uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1 | ||||||||||||
| timeout-minutes: 50 | ||||||||||||
| with: | ||||||||||||
| run: cargo codspeed run | ||||||||||||
| token: ${{ secrets.CODSPEED_TOKEN }} | ||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,75 @@ | ||||||||||||
| name: Benchmarks JS | ||||||||||||
|
|
||||||||||||
| on: | ||||||||||||
| workflow_dispatch: | ||||||||||||
| pull_request: | ||||||||||||
| types: [ opened, synchronize ] | ||||||||||||
| branches: | ||||||||||||
| - main | ||||||||||||
| - next | ||||||||||||
| paths: | ||||||||||||
| - 'Cargo.lock' | ||||||||||||
| - 'crates/biome_js_analyze/**/*.rs' | ||||||||||||
| - 'crates/biome_js_formatter/**/*.rs' | ||||||||||||
| - 'crates/biome_js_parser/**/*.rs' | ||||||||||||
| - 'crates/biome_js_*/**/*.rs' | ||||||||||||
| - 'crates/biome_rowan/**/*.rs' | ||||||||||||
| - 'crates/biome_parser/**/*.rs' | ||||||||||||
| push: | ||||||||||||
| branches: | ||||||||||||
| - main | ||||||||||||
| - next | ||||||||||||
| paths: | ||||||||||||
| - 'Cargo.lock' | ||||||||||||
| - 'crates/biome_js_analyze/**/*.rs' | ||||||||||||
| - 'crates/biome_js_formatter/**/*.rs' | ||||||||||||
| - 'crates/biome_js_parser/**/*.rs' | ||||||||||||
| - 'crates/biome_js_*/**/*.rs' | ||||||||||||
| - 'crates/biome_rowan/**/*.rs' | ||||||||||||
| - 'crates/biome_parser/**/*.rs' | ||||||||||||
|
|
||||||||||||
| env: | ||||||||||||
| RUST_LOG: info | ||||||||||||
|
|
||||||||||||
| jobs: | ||||||||||||
| bench: | ||||||||||||
| permissions: | ||||||||||||
| pull-requests: write | ||||||||||||
|
Comment on lines
+36
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs contents scope for checkout. Right now the token can’t read the repo on push events, so the workflow will fail before building. Patch proposal: permissions:
- pull-requests: write
+ pull-requests: write
+ contents: read📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| name: Bench | ||||||||||||
| runs-on: depot-ubuntu-24.04-arm-16 | ||||||||||||
| strategy: | ||||||||||||
| matrix: | ||||||||||||
| package: | ||||||||||||
| - biome_js_parser | ||||||||||||
| - biome_js_formatter | ||||||||||||
| - biome_js_analyze | ||||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
|
|
||||||||||||
| - name: Checkout PR Branch | ||||||||||||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||||||||||||
| with: | ||||||||||||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||||||||||||
|
|
||||||||||||
| - name: Install toolchain | ||||||||||||
| uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1.2.2 | ||||||||||||
| with: | ||||||||||||
| channel: stable | ||||||||||||
| cache-target: release | ||||||||||||
| bins: cargo-codspeed | ||||||||||||
| cache-base: main | ||||||||||||
| env: | ||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
|
|
||||||||||||
| - name: Compile | ||||||||||||
| timeout-minutes: 20 | ||||||||||||
| run: cargo codspeed build -p ${{ matrix.package }} | ||||||||||||
| env: | ||||||||||||
| CARGO_BUILD_JOBS: 3 # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build | ||||||||||||
|
|
||||||||||||
| - name: Run the benchmarks | ||||||||||||
| uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1 | ||||||||||||
| timeout-minutes: 50 | ||||||||||||
| with: | ||||||||||||
| run: cargo codspeed run | ||||||||||||
| token: ${{ secrets.CODSPEED_TOKEN }} | ||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,75 @@ | ||||||||||||
| name: Benchmarks JSON | ||||||||||||
|
|
||||||||||||
| on: | ||||||||||||
| workflow_dispatch: | ||||||||||||
| pull_request: | ||||||||||||
| types: [ opened, synchronize ] | ||||||||||||
| branches: | ||||||||||||
| - main | ||||||||||||
| - next | ||||||||||||
| paths: | ||||||||||||
| - 'Cargo.lock' | ||||||||||||
| - 'crates/biome_json_analyze/**/*.rs' | ||||||||||||
| - 'crates/biome_json_formatter/**/*.rs' | ||||||||||||
| - 'crates/biome_json_parser/**/*.rs' | ||||||||||||
| - 'crates/biome_json_*/**/*.rs' | ||||||||||||
| - 'crates/biome_rowan/**/*.rs' | ||||||||||||
| - 'crates/biome_parser/**/*.rs' | ||||||||||||
| push: | ||||||||||||
| branches: | ||||||||||||
| - main | ||||||||||||
| - next | ||||||||||||
| paths: | ||||||||||||
| - 'Cargo.lock' | ||||||||||||
| - 'crates/biome_json_analyze/**/*.rs' | ||||||||||||
| - 'crates/biome_json_formatter/**/*.rs' | ||||||||||||
| - 'crates/biome_json_parser/**/*.rs' | ||||||||||||
| - 'crates/biome_json_*/**/*.rs' | ||||||||||||
| - 'crates/biome_rowan/**/*.rs' | ||||||||||||
| - 'crates/biome_parser/**/*.rs' | ||||||||||||
|
|
||||||||||||
| env: | ||||||||||||
| RUST_LOG: info | ||||||||||||
|
|
||||||||||||
| jobs: | ||||||||||||
| bench: | ||||||||||||
| permissions: | ||||||||||||
| pull-requests: write | ||||||||||||
|
Comment on lines
+36
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add contents read permission. With only Apply this diff: permissions:
- pull-requests: write
+ pull-requests: write
+ contents: read📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| name: Bench | ||||||||||||
| runs-on: depot-ubuntu-24.04-arm-16 | ||||||||||||
| strategy: | ||||||||||||
| matrix: | ||||||||||||
| package: | ||||||||||||
| - biome_json_parser | ||||||||||||
| - biome_json_formatter | ||||||||||||
| - biome_json_analyze | ||||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
|
|
||||||||||||
| - name: Checkout PR Branch | ||||||||||||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||||||||||||
| with: | ||||||||||||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||||||||||||
|
|
||||||||||||
| - name: Install toolchain | ||||||||||||
| uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1.2.2 | ||||||||||||
| with: | ||||||||||||
| channel: stable | ||||||||||||
| cache-target: release | ||||||||||||
| bins: cargo-codspeed | ||||||||||||
| cache-base: main | ||||||||||||
| env: | ||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
|
|
||||||||||||
| - name: Compile | ||||||||||||
| timeout-minutes: 20 | ||||||||||||
| run: cargo codspeed build -p ${{ matrix.package }} | ||||||||||||
| env: | ||||||||||||
| CARGO_BUILD_JOBS: 3 # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build | ||||||||||||
|
|
||||||||||||
| - name: Run the benchmarks | ||||||||||||
| uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1 | ||||||||||||
| timeout-minutes: 50 | ||||||||||||
| with: | ||||||||||||
| run: cargo codspeed run | ||||||||||||
| token: ${{ secrets.CODSPEED_TOKEN }} | ||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t forget contents: read.
The checkout step needs that scope; otherwise every push run falls over instantly.
Same fix as elsewhere:
📝 Committable suggestion
🤖 Prompt for AI Agents