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
27 changes: 18 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
ref: "main"
- id: get-current-version
run: echo MAIN_VERSION=$(cat VERSION) >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
ref: ${{ github.head_ref || github.ref_name }}
token: ${{ secrets.RELEASE_PAT }}
- id: bump-version
run: |
Expand All @@ -78,14 +78,14 @@ jobs:

TODAY=$(date +"%y%m%d")

if [[ $MAIN_MAJOR == $TODAY ]]; then
if [[ $MAIN_MAJOR == $TODAY ]]; then
NEW_VERSION=$MAIN_MAJOR.$((MAIN_MINOR + 1))
else
NEW_VERSION=$TODAY.0
fi

LOCAL_VERSION=$(cat VERSION)
if [[ $LOCAL_VERSION == $NEW_VERSION ]]; then
if [[ $LOCAL_VERSION == $NEW_VERSION ]]; then
exit 0
fi

Expand Down Expand Up @@ -119,6 +119,7 @@ jobs:
cargo-test:
needs: [changed-files]
if: needs.changed-files.outputs.rust == 'true'
timeout-minutes: 20
runs-on:
group: ubuntu-runners
strategy:
Expand Down Expand Up @@ -146,7 +147,7 @@ jobs:
else
echo Unexpected test kind $TEST_KIND
exit 1
fi
fi

cargo-fmt:
needs: [changed-files]
Expand Down Expand Up @@ -188,7 +189,15 @@ jobs:
command: check license

docker-build-push:
needs: [changed-files, cargo-build, cargo-test, cargo-fmt, cargo-clippy, cargo-deny]
needs:
[
changed-files,
cargo-build,
cargo-test,
cargo-fmt,
cargo-clippy,
cargo-deny,
]
if: |
needs.changed-files.result != 'failure' &&
(needs.changed-files.outputs.rust == 'true' || needs.changed-files.outputs.dockerfile == 'true') &&
Expand All @@ -204,7 +213,7 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4

- uses: docker/login-action@v2
with:
registry: ghcr.io
Expand Down Expand Up @@ -250,7 +259,7 @@ jobs:

release:
needs: [changed-files]
if: github.ref_name == 'main' && needs.changed-files.outputs.version == 'true'
if: github.ref_name == 'main' && needs.changed-files.outputs.version == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -269,7 +278,7 @@ jobs:

- name: push-tag
run: |
VERSION=$(cat VERSION)
VERSION=$(cat VERSION)

git tag $VERSION
git push origin "$VERSION"
Expand Down
132 changes: 90 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pulse_api = { package = "wcn_pulse_api", path = "crates/pulse_api" }
pulse_monitor = { path = "crates/pulse_monitor" }
raft = { path = "crates/raft" }
wcn_rpc = { path = "crates/rpc" }
relay_rocks = { path = "crates/rocks" }
wcn_rocks = { path = "crates/rocks" }
metrics = "0.23"
time = "0.3"
libp2p = { version = "0.55", default-features = false, features = ["serde"] }
Expand Down Expand Up @@ -99,3 +99,5 @@ unnecessary_box_returns = "warn"
unnecessary_self_imports = "warn"
unused_peekable = "warn"
useless_let_if_seq = "warn"
result_large_err = "allow" # TODO: Remove after fixing code.
Comment thread
heilhead marked this conversation as resolved.
large_enum_variant = "allow" # TODO: Remove after fixing code.
71 changes: 71 additions & 0 deletions crates/db/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[package]
name = "wcn_db"
version = "0.1.0"
edition = "2021"
publish = false

[lib]
path = "src/lib.rs"
name = "wcn_db"

[[bin]]
path = "src/main.rs"
name = "wcn_db"

[features]
default = ["testing"]
testing = ["storage_api/rpc_client", "wcn_rpc/client"]

[lints]
workspace = true

[dependencies]
wc = { workspace = true, features = ["alloc", "future", "metrics"] }
logging = { package = "wcn_logging", path = "../logging" }
metrics = { workspace = true }
time = { workspace = true }
wcn_rpc = { workspace = true, features = ["server"] }
wcn_rocks = { workspace = true }
storage_api = { package = "wcn_storage_api2", path = "../storage_api2", default-features = false, features = [
"rpc_server",
] }
anyhow = "1"
atty = "0.2"
axum = "0.8"
base64 = "0.20"
derive_more = { workspace = true, features = [
"as_ref",
"display",
"from",
"try_into",
"deref",
] }
derivative = "2"
envy = "0.4"
futures = "0.3"
tokio = { version = "1", default-features = false, features = ["fs", "signal"] }
tokio-util = { version = "0.7", features = ["compat"] }
tokio-stream = "0.1"
serde = "1"
thiserror = "1"
metrics-exporter-prometheus = "0.15"
proc-mounts = "0.3"
sysinfo = "0.29"
tracing = "0.1"
tap = "1.0"
vergen-pretty = { version = "0.3", features = ["trace"] }
xxhash-rust = { version = "0.8", features = ["xxh3", "const_xxh3"] }

[dev-dependencies]
const-hex = "1.14"
rand = "0.9"
rand_chacha = "0.9"

[build-dependencies]
vergen = { version = "8", default-features = false, features = [
"build",
"cargo",
"git",
"gitoxide",
"rustc",
] }
Loading
Loading