File tree Expand file tree Collapse file tree 2 files changed +53
-15
lines changed Expand file tree Collapse file tree 2 files changed +53
-15
lines changed Original file line number Diff line number Diff line change 1+ name : Benchmarks
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ types : [ opened, reopened, synchronize ]
9+
10+ permissions :
11+ contents : read
12+
13+ jobs :
14+ benchmark :
15+ name : Run Benchmarks
16+ runs-on : ubuntu-24.04-arm
17+ permissions :
18+ pull-requests : write
19+ steps :
20+ - name : Checkout source code
21+ uses : actions/checkout@v4
22+
23+ - name : Install Rust
24+ uses : dtolnay/rust-toolchain@master
25+ with :
26+ components : ' llvm-tools-preview'
27+ toolchain : stable
28+
29+ - name : Install benchmarking tools
30+ uses : bencherdev/bencher@main
31+
32+ - name : Run benchmarks
33+ if : ${{ github.event_name == 'pull_request' }}
34+ env :
35+ BENCHER_API_TOKEN : ${{ secrets.BENCHER_API_TOKEN }}
36+ BENCHER_PROJECT : theseus-rs-postgresql-embedded
37+ BENCHER_ADAPTER : rust_criterion
38+ run : |
39+ bencher run \
40+ --branch $GITHUB_HEAD_REF \
41+ --ci-number "${{ github.event.number }}" \
42+ --github-actions "${{ secrets.GITHUB_TOKEN }}" \
43+ --err \
44+ "cargo bench"
45+
46+ - name : Run benchmarks
47+ if : ${{ github.event_name != 'pull_request' }}
48+ env :
49+ BENCHER_API_TOKEN : ${{ secrets.BENCHER_API_TOKEN }}
50+ BENCHER_PROJECT : theseus-rs-postgresql-embedded
51+ BENCHER_ADAPTER : rust_criterion
52+ run : |
53+ bencher run "cargo bench"
Original file line number Diff line number Diff line change 8585 verbose : true
8686 env :
8787 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
88-
89- - name : Install benchmarking tools
90- if : ${{ github.ref == 'refs/heads/main' && matrix.platform == 'linux-x64' }}
91- uses : bencherdev/bencher@main
92- with :
93- version : 0.5.1
94-
95- - name : Run benchmarks
96- if : ${{ github.ref == 'refs/heads/main' && matrix.platform == 'linux-x64' }}
97- env :
98- BENCHER_API_TOKEN : ${{ secrets.BENCHER_API_TOKEN }}
99- BENCHER_PROJECT : theseus-rs-postgresql-embedded
100- BENCHER_ADAPTER : rust_criterion
101- run : |
102- bencher run "cargo bench --features blocking"
You can’t perform that action at this time.
0 commit comments