diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 98b963cc..b5a0473c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,13 +23,12 @@ jobs: target: x86_64-unknown-linux-musl - name: Build binary - working-directory: tools/${{ matrix.build }} - run: cargo build --verbose --release --target x86_64-unknown-linux-musl + run: cargo build -p ${{ matrix.build }} --verbose --release --target x86_64-unknown-linux-musl - name: Upload release archive uses: softprops/action-gh-release@v1 with: - files: tools/${{ matrix.build }}/target/x86_64-unknown-linux-musl/release/${{ matrix.build }} + files: target/x86_64-unknown-linux-musl/release/${{ matrix.build }} build-release: name: Build release for ${{ matrix.target }} diff --git a/Cargo.lock b/Cargo.lock index abd86805..39ce6286 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1585,6 +1585,15 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + [[package]] name = "object" version = "0.36.3" @@ -2727,6 +2736,17 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simplelog" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16257adbfaef1ee58b1363bdc0664c9b8e1e30aed86049635fb5f147d065a9c0" +dependencies = [ + "log", + "termcolor", + "time", +] + [[package]] name = "slab" version = "0.4.9" @@ -2933,6 +2953,23 @@ dependencies = [ "libc", ] +[[package]] +name = "system-stats" +version = "0.1.0" +dependencies = [ + "futures-util", + "log", + "serde", + "serde_json", + "simplelog", + "structopt", + "sysinfo 0.26.9", + "thiserror", + "tokio 1.39.3", + "tokio-stream", + "tokio-util 0.7.11", +] + [[package]] name = "tar" version = "0.4.41" @@ -3032,7 +3069,9 @@ checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "libc", "num-conv", + "num_threads", "powerfmt", "serde", "time-core", diff --git a/Cargo.toml b/Cargo.toml index cc644fba..2eeda661 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,17 +3,8 @@ serial = { git = "https://github.com/bytebeamio/serial-rs", branch = "android_fi [workspace] resolver = "2" -members = [ - "uplink", - "storage", - "tools/utils", -] -exclude = [ - "tools/deserialize-backup", - "tools/simulator", - "tools/system-stats", - "tools/tunshell", -] +members = ["uplink", "storage", "tools/utils", "tools/system-stats"] +exclude = ["tools/deserialize-backup", "tools/simulator", "tools/tunshell"] [workspace.dependencies] bytes = "1" diff --git a/tools/system-stats/Cargo.toml b/tools/system-stats/Cargo.toml index f5235776..b3f15202 100644 --- a/tools/system-stats/Cargo.toml +++ b/tools/system-stats/Cargo.toml @@ -5,14 +5,14 @@ edition = "2021" authors = ["Devdutt Shenoi "] [dependencies] -futures-util = { version = "0.3", features = ["sink"] } -log = "0.4" -serde = { version = "1", features = ["derive"] } -serde_json = "1.0" +futures-util = { workspace = true, features = ["sink"] } +log = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } simplelog = "0.12.0" structopt = "0.3" sysinfo = "0.26" -thiserror = "1" -tokio = { version = "1", features = ["rt-multi-thread", "macros", "net"] } -tokio-stream = "0.1" -tokio-util = { version = "0.7", features = ["codec", "time"] } \ No newline at end of file +thiserror = { workspace = true } +tokio = { workspace = true, features = ["macros", "net"] } +tokio-stream = { workspace = true } +tokio-util = { workspace = true }