Skip to content

Commit 500c215

Browse files
committed
ci: update build to run benchmarks
1 parent 0302cb4 commit 500c215

File tree

6 files changed

+42
-46
lines changed

6 files changed

+42
-46
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,25 @@ jobs:
9090

9191
- name: Run benchmarks
9292
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
93-
run: cargo bench --features blocking
93+
env:
94+
BENCHER_PROJECT: theseus-rs-postgresql-embedded
95+
BENCHER_ADAPTER: rust_criterion
96+
run: |
97+
cargo bench --bench archive --features blocking -- --output-format criterion | \
98+
bencher run
99+
--if-branch '${{ env.PR_HEAD }}' \
100+
--else-if-branch '${{ env.PR_BASE }}' \
101+
--else-if-branch '${{ env.PR_DEFAULT }}' \
102+
--ci-number '${{ env.PR_NUMBER }}' \
103+
--github-actions "${{ secrets.GITHUB_TOKEN }}" \
104+
--token "${{ secrets.BENCHER_API_TOKEN }}" \
105+
--err
106+
cargo bench --bench embedded --features blocking -- --output-format criterion | \
107+
bencher run
108+
--if-branch '${{ env.PR_HEAD }}' \
109+
--else-if-branch '${{ env.PR_BASE }}' \
110+
--else-if-branch '${{ env.PR_DEFAULT }}' \
111+
--ci-number '${{ env.PR_NUMBER }}' \
112+
--github-actions "${{ secrets.GITHUB_TOKEN }}" \
113+
--token "${{ secrets.BENCHER_API_TOKEN }}" \
114+
--err

Cargo.lock

Lines changed: 2 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ version = "0.4.0"
1515
[workspace.dependencies]
1616
anyhow = { version = "1.0" }
1717
bytes = { version = "1.5" }
18-
criterion = { version = "0.5", features = ["async_futures", "async_tokio"] }
18+
criterion = { version = "0.5" }
1919
flate2 = { version = "1.0" }
2020
hex = { version = "0.4" }
2121
home = { version = "0.5" }

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
5858
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
5959
additional terms or conditions.
6060

61+
<a href="https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/theseus-rs/postgresql-embedded">
62+
<img
63+
src="https://img.shields.io/static/v1?label=Local%20Dev%20Container&logo=visualstudiocode&message=Open&color=orange"
64+
alt="VSCode Development Container"
65+
/>
66+
</a>
67+
<br/>
68+
<a href="https://github.dev/theseus-rs/postgresql-embedded">
69+
<img
70+
src="https://img.shields.io/static/v1?label=GitHub%20Codespaces&logo=github&message=Open&color=orange"
71+
alt="GitHub Codespaces"
72+
/>
73+
</a>
74+
6175
## Prior Art
6276
Projects that inspired this one:
6377
* [zonkyio/embedded-postgres-binaries](https://github.com/zonkyio/embedded-postgres-binaries)

postgresql_archive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ features = ["blocking"]
4444
targets = ["x86_64-unknown-linux-gnu"]
4545

4646
[[bench]]
47-
name = "archive"
4847
harness = false
48+
name = "archive"

postgresql_embedded/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ features = ["blocking", "tokio"]
4747
targets = ["x86_64-unknown-linux-gnu"]
4848

4949
[[bench]]
50-
name = "embedded"
5150
harness = false
51+
name = "embedded"
52+

0 commit comments

Comments
 (0)