Skip to content

Commit b164fcd

Browse files
committed
🐛 fix bench
1 parent 0878c72 commit b164fcd

File tree

1 file changed

+20
-66
lines changed

1 file changed

+20
-66
lines changed

.github/workflows/bench.yml

Lines changed: 20 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -6,88 +6,42 @@ on:
66
- main
77
pull_request:
88
types: [opened, synchronize]
9-
# Allow manual triggering
10-
workflow_dispatch:
119

1210
jobs:
13-
benchmark:
14-
name: Run tests and benchmarks
11+
build:
1512
runs-on: ubuntu-latest
1613

1714
steps:
18-
- name: Checkout repository
19-
uses: actions/checkout@v4
20-
with:
21-
fetch-depth: 1
15+
- uses: actions/checkout@v1
2216

23-
- uses: jetli/wasm-pack-action@v0.4.0
17+
- name: Cache cargo registry
18+
uses: actions/cache@v1
2419
with:
25-
version: "latest"
20+
path: ~/.cargo/registry
21+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
2622

27-
- name: Install just
28-
uses: extractions/setup-just@v1
23+
- name: Cache cargo build
24+
uses: actions/cache@v1
2925
with:
30-
just-version: "1.39"
26+
path: target
27+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
3128

32-
- name: Install Rust toolchain
33-
uses: actions-rs/toolchain@v1
29+
- uses: actions-rs/toolchain@v1
3430
with:
35-
profile: minimal
3631
toolchain: stable
3732
override: true
38-
components: rustfmt, clippy
39-
targets: wasm32-unknown-unknown
4033

41-
- name: Setup rust cache
42-
uses: Swatinem/rust-cache@v2
34+
- uses: actions-rs/cargo@v1
4335
with:
44-
shared-key: "benchmark-cache"
45-
cache-directories: |
46-
~/.cargo/registry
47-
~/.cargo/git
48-
target
49-
50-
- name: Check formatting
51-
run: just fmt
52-
53-
- name: Run lints
54-
run: just lint
36+
command: check
5537

56-
- name: Run tests
57-
run: just test
38+
- name: test
39+
run: cargo test
5840

59-
- name: Run benchmarks
60-
run: just bench
61-
env:
62-
CARGO_TERM_COLOR: always
41+
- name: bench
42+
run: cargo bench
6343

64-
- name: Store benchmark result
65-
uses: benchmark-action/github-action-benchmark@v1
44+
- uses: actions/upload-artifact@v4
6645
with:
67-
name: Rust Benchmark
68-
tool: "criterion"
69-
output-file-path: target/criterion/**/new/*.json
70-
alert-threshold: "150%"
71-
github-token: ${{ secrets.GITHUB_TOKEN }}
72-
auto-push: true
73-
# Comment the following lines to use GitHub Pages instead
74-
gh-pages-branch: gh-pages
75-
benchmark-data-dir-path: dev/bench/data
76-
# Uncomment the following lines to publish to GitHub Pages
77-
# publish-to-github-pages: true
78-
# github-pages-branch: gh-pages
79-
# static-site-dir: dev/bench/
80-
81-
- name: Check benchmark results
82-
if: github.event_name == 'pull_request'
83-
run: |
84-
if [ -f dev/bench/data/latest.json ]; then
85-
echo "Comparing benchmark results..."
86-
fi
87-
88-
- name: Build documentation
89-
run: just docs
90-
91-
env:
92-
CARGO_TERM_COLOR: always
93-
RUST_BACKTRACE: 1
46+
name: rsstable_${{ github.sha }}_bench
47+
path: ./target/criterion

0 commit comments

Comments
 (0)