Skip to content

top: implement SUMMARY display #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 11, 2025
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
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update -y
sudo apt-get -yq --no-install-suggests --no-install-recommends install libsystemd-dev
- run: cargo check

test:
Expand All @@ -26,6 +30,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update -y
sudo apt-get -yq --no-install-suggests --no-install-recommends install libsystemd-dev
- run: cargo test --all

fmt:
Expand Down Expand Up @@ -71,6 +79,10 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- if: ${{ contains(matrix.job.os, 'ubuntu') }}
run: |
sudo apt-get update -y
sudo apt-get -yq --no-install-suggests --no-install-recommends install libsystemd-dev
- name: Test
run: cargo test --no-fail-fast
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- if: ${{ contains(matrix.job.os, 'ubuntu') }}
run: |
sudo apt-get update -y
sudo apt-get -yq --no-install-suggests --no-install-recommends install libsystemd-dev
- name: Initialize workflow variables
id: vars
shell: bash
Expand Down
69 changes: 66 additions & 3 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ thiserror = "2.0.4"
uucore = "0.0.30"
walkdir = "2.5.0"
windows = { version = "0.60.0" }
windows-sys = { version = "0.59.0", default-features = false }
xattr = "1.3.1"

[dependencies]
Expand Down
11 changes: 10 additions & 1 deletion src/uu/top/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,22 @@ keywords = ["acl", "uutils", "cross-platform", "cli", "utility"]
categories = ["command-line-utilities"]

[dependencies]
uucore = { workspace = true, features = ["utmpx"] }
uucore = { workspace = true, features = ["utmpx", "uptime"] }
clap = { workspace = true }
libc = { workspace = true }
nix = { workspace = true }
prettytable-rs = { workspace = true }
sysinfo = { workspace = true }
chrono = { workspace = true }
bytesize = { workspace = true }
[target.'cfg(target_os="windows")'.dependencies]
windows-sys = { workspace = true, features = [
"Win32_System_RemoteDesktop",
"Win32_System_SystemInformation",
] }

[target.'cfg(target_os="linux")'.build-dependencies]
pkg-config = "0.3.31"

[lib]
path = "src/top.rs"
Expand Down
4 changes: 4 additions & 0 deletions src/uu/top/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
#[cfg(target_os = "linux")]
pkg_config::find_library("libsystemd").unwrap();
}
Loading
Loading