Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@ description: "Setup Environment"
runs:
using: "composite"
steps:
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustc-codegen-cranelift-preview, rustfmt
cache-on-failure: true
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- uses: taiki-e/install-action@nextest
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
39 changes: 39 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CodSpeed

on:
push:
branches:
- "main" # or "master"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest-16
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-environment
- name: Cache Repos
id: cache-repos
uses: actions/cache@v4
with:
path: /tmp/pink-bench
key: ${{ runner.os }}-pink-bench-${{ hashFiles('benches/parse.rs') }}

- name: Build the benchmark target(s)
run: |
cargo install cargo-codspeed --locked
cargo codspeed build --features stable
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
run: RUST_LOG=info,resolution=warn cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ jobs:
run: |
~/.cargo/bin/cargo-nextest nextest run --workspace --features stable
env:
CARGO_TERM_COLOR: always
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
Loading
Loading