Skip to content
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

Dependency cleaning / Better Windows compat #127

Merged
merged 8 commits into from
Dec 4, 2024
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
31 changes: 8 additions & 23 deletions .github/workflows/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,44 +24,30 @@ jobs:
with:
toolchain: stable
profile: minimal

# Fail cheaply and early if the code is not even formatted correctly.
- name: Cargo fmt check
run: cargo fmt --all -- --check

# Install dependencies only on Linux
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libudev-dev libpcap-dev

- name: Build vanilla
if: runner.os != 'Windows'
run: |
# For sim even robot/linux specific crate needs to at least compile.
cargo build --workspace --features macro_debug
- name: Run clippy
run: cargo clippy -- -W warnings

# For now just test the core on windows.
- name: Build vanilla
if: runner.os == 'Windows'
run: |
cargo build
cargo build --workspace --features macro_debug

- name: Build with mocks
if: runner.os != 'Windows'
run: |
cargo build --workspace --features mock

- name: Run tests
if: runner.os != 'Windows'
run: cargo test --workspace

# For now just test the core on windows.
- name: Run tests (windows)
if: runner.os == 'Windows'
run: cargo test

- name: Run clippy
if: runner.os != 'Windows'
run: cargo clippy -- -W warnings

# Integration Test for the 1 liner generation of a project.
- name: Install cargo-generate
run: cargo install cargo-generate
Expand All @@ -78,7 +64,7 @@ jobs:
cd templates
cargo generate -p cu_full --name test_project --destination $env:RUNNER_TEMP --silent

- name: Compile generated project
- name: Compile generated project
if: runner.os != 'Windows'
run: |
cd $RUNNER_TEMP/test_project
Expand All @@ -88,5 +74,4 @@ jobs:
if: runner.os == 'Windows'
run: |
cd $env:RUNNER_TEMP/test_project
cargo build --release

cargo build --release
8 changes: 0 additions & 8 deletions components/monitors/cu_consolemon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,11 @@ cu29 = { workspace = true }
compact_str = { workspace = true }
ratatui = "0.29"
pfetch-logo-parser = "0.1"
pfetch-extractor = "0.2"
pfetch = "2.11"
globset = "0.4"
dotenvy = "0.15"
glob = "0.3"
which = "7.0"
libmacchina = "7.3" # 8.0.0+ is not supported by pfetch at the time of writing
os-release = "0.1"
nix = "0.29"
ansi-to-tui = "7.0"
tui-nodes = "0.8"
tui-widgets = "0.4" # 0.4.0 brings ratatui 0.29
color-eyre = "0.6"
lipsum = "0.9"
libc = "0.2"
gag = "1.0.0"
1 change: 0 additions & 1 deletion components/payloads/cu_sensor_payloads/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ cu29-soa-derive = { workspace = true }
cu29-clock = { workspace = true }
cu29 = { workspace = true }
uom = { workspace = true }
serde = { workspace = true }
derive_more = { workspace = true }

9 changes: 2 additions & 7 deletions components/sinks/cu_iceoryx2_sink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ description = "Copper sink task for Iceoryx2."

[dependencies]
iceoryx2 = { version = "0.4.1" }
iceoryx2-bb-log = { version = "0.4.1" }
cu29 = { workspace = true }
cu29-traits = { workspace = true }
cu29-derive = { workspace = true }
cu29-log-derive = { workspace = true }
cu29-log = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-helpers = { workspace = true }
cu29-unifiedlog = { workspace = true }
cu29-export = { workspace = true }
bincode = { workspace = true }

cu29-log-runtime = { workspace = true } # needed
3 changes: 1 addition & 2 deletions components/sinks/cu_lewansoul/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ repository.workspace = true
uom = { workspace = true }
cu29 = { workspace = true }
bincode = { workspace = true }
serialport = "4.5.1"
log = "0.4.22"
serialport = "4.6.1"
2 changes: 1 addition & 1 deletion components/sinks/cu_rp_gpio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ignored = ["cu29-log", "cu29-log-runtime"] # proc macro
[dependencies]
cu29 = { workspace = true }
cu29-log = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-log-runtime = { workspace = true } # needed
cu29-log-derive = { workspace = true }
bincode = { workspace = true }
serde = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions components/sinks/cu_rp_sn754410/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ repository.workspace = true
[dependencies]
cu29 = { workspace = true }
cu29-log = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-log-runtime = { workspace = true } # needed
cu29-log-derive = { workspace = true }
cu29-traits = { workspace = true }
bincode = { workspace = true }
serde = { workspace = true }

[dev-dependencies]
cu29-derive = { workspace = true }
cu29-unifiedlog = { workspace = true }
cu29-unifiedlog = { workspace = true } # needed
cu29-helpers = { workspace = true }

[target.'cfg(target_os = "linux")'.dependencies]
rppal = { version = "0.19.0", features = ["hal"] }
rppal = { version = "0.20.0", features = ["hal"] }

[build-dependencies]
cfg_aliases = "0.2.1"
Expand Down
6 changes: 3 additions & 3 deletions components/sources/cu_ads7883/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository.workspace = true
[dependencies]
cu29 = { workspace = true }
cu29-log = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-log-runtime = { workspace = true } # needed
cu29-log-derive = { workspace = true }
bincode = { workspace = true }
serde = { workspace = true }
Expand All @@ -23,8 +23,8 @@ spidev = "0.6.0"

[dev-dependencies]
cu29-derive = { workspace = true }
cu29-unifiedlog = { workspace = true }
cu29-traits = { workspace = true }
cu29-unifiedlog = { workspace = true } # needed
cu29-traits = { workspace = true } # needed
cu29-helpers = { workspace = true }

[build-dependencies]
Expand Down
14 changes: 6 additions & 8 deletions components/sources/cu_hesai/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ repository.workspace = true

[dependencies]
cu29-clock = { workspace = true }
cu29-log = { workspace = true }
cu29-log-derive = { workspace = true }
cu29-log-runtime = { workspace = true }
cu-sensor-payloads = { workspace = true }

pcap = "2.2.0"
bytemuck = { version = "1.19.0", features = ["derive"] }
bytemuck = { version = "1.20.0", features = ["derive"] }
uom = { workspace = true }
chrono = { version = "0.4.38" }
cu29 = { workspace = true }
socket2 = { version = "0.5.7", features = ["all"] }
sysctl = "0.6"
socket2 = { version = "0.5.8", features = ["all"] }

[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
pcap = "2.2.0"

2 changes: 1 addition & 1 deletion components/sources/cu_hesai/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl<'cl> CuSrcTask<'cl> for Xt32 {
}
}

#[cfg(test)]
#[cfg(all(test, not(target_os = "windows")))]
mod tests {
use super::*;
use chrono::DateTime;
Expand Down
2 changes: 1 addition & 1 deletion components/sources/cu_hesai/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ pub fn generate_default_elevation_calibration() -> [Angle; 32] {
elevations
}

#[cfg(test)]
#[cfg(all(test, not(target_os = "windows")))]
mod tests {
use super::*;
use cu29_clock::RobotClock;
Expand Down
8 changes: 1 addition & 7 deletions components/sources/cu_iceoryx2_src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ repository.workspace = true

[dependencies]
iceoryx2 = { version = "0.4.1" }
iceoryx2-bb-log = { version = "0.4.1" }
cu29 = { workspace = true }
cu29-traits = { workspace = true }
cu29-derive = { workspace = true }
cu29-log-derive = { workspace = true }
cu29-log = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-helpers = { workspace = true }
cu29-unifiedlog = { workspace = true }
cu29-export = { workspace = true }
bincode = { workspace = true }
cu29-log-runtime = { workspace = true } # needed
6 changes: 1 addition & 5 deletions components/sources/cu_rp_encoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,12 @@ ignored = ["cu29-log", "cu29-log-runtime"]

[dependencies]
cu29 = { workspace = true }
cu29-log = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-log-derive = { workspace = true }
cu29-traits = { workspace = true }
bincode = { workspace = true }
serde = { workspace = true }
lazy_static = "1.5.0"

[target.'cfg(target_os = "linux")'.dependencies]
rppal = { version = "0.19.0", features = ["hal"] }
rppal = { version = "0.20.0", features = ["hal"] }

[build-dependencies]
cfg_aliases = "0.2.1"
Expand Down
15 changes: 6 additions & 9 deletions components/sources/cu_vlp16/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ ignored = ["cu29-log", "cu29-log-runtime", "cu29-soa-derive"] # proc macro

[dependencies]
cu29 = { workspace = true }
cu29-log = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-log-derive = { workspace = true }
bincode = { workspace = true }
cu29-soa-derive = { workspace = true }
cu-sensor-payloads = { workspace = true }
uom = { workspace = true }
serde = { workspace = true }

[target.'cfg(not(target_os = "windows"))'.dependencies]
velodyne-lidar = { version = "0.3.0", features = ["full"] }

[dev-dependencies]
[target.'cfg(target_os = "windows")'.dependencies]
velodyne-lidar = { version = "0.3.0" } # no pcap

[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
pcap-file = "2.0.0"
pretty-hex = "0.4.1"
2 changes: 1 addition & 1 deletion components/sources/cu_vlp16/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl<'cl> CuSrcTask<'cl> for Vlp16 {
}
}

#[cfg(test)]
#[cfg(all(test, not(target_os = "windows")))]
mod tests {
use pcap_file::pcap::PcapReader;
use std::fs::File;
Expand Down
4 changes: 2 additions & 2 deletions components/sources/cu_wt901/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ ignored = ["cu29-log", "cu29-log-runtime"] # proc macro
cu29 = { workspace = true }
cu29-log = { workspace = true }
cu29-log-derive = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-log-runtime = { workspace = true } # needed
cu29-traits = { workspace = true }
bincode = { workspace = true }
serde = { workspace = true }
uom = { workspace = true }

[dev-dependencies]
cu29-derive = { workspace = true }
cu29-unifiedlog = { workspace = true }
cu29-unifiedlog = { workspace = true } # needed
cu29-traits = { workspace = true }
cu29-helpers = { workspace = true }

Expand Down
1 change: 0 additions & 1 deletion components/tasks/cu_aligner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ repository.workspace = true
[dependencies]
cu29 = { workspace = true }
cu29-clock = { workspace = true }
bincode = { workspace = true }
circular-buffer = "0.1.9"
paste = "1.0.15"
3 changes: 1 addition & 2 deletions components/tasks/cu_pid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ repository.workspace = true

[dependencies]
cu29 = { workspace = true }
cu29-derive = { workspace = true }
cu29-log = { workspace = true }
cu29-log-derive = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-log-runtime = { workspace = true } # needed
cu29-traits = { workspace = true }
bincode = { workspace = true }
3 changes: 1 addition & 2 deletions core/cu29/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ compact_str = { workspace = true }
cu29-traits = { workspace = true }
cu29-log = { workspace = true }
cu29-log-derive = { workspace = true }
cu29-log-runtime = { workspace = true }
cu29-log-runtime = { workspace = true } # needed
cu29-clock = { workspace = true }
clap = { workspace = true }
uom = { workspace = true }
tempfile = { workspace = true }
arrayvec = "0.7.6"

Expand Down
4 changes: 1 addition & 3 deletions core/cu29_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ proc-macro = true

[dependencies]
cu29 = { workspace = true }
bincode = { workspace = true }
syn = { workspace = true }
quote = { workspace = true }
proc-macro2 = { workspace = true }
Expand All @@ -26,8 +25,7 @@ itertools = "0.13.0"
convert_case = "0.6.0"

[build-dependencies]
cargo_metadata = "0.18.1"
cu29-unifiedlog = { workspace = true }
cu29-unifiedlog = { workspace = true } # needed

[features]
default = []
Expand Down
3 changes: 1 addition & 2 deletions core/cu29_export/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ clap = { workspace = true }
bincode = { workspace = true }

[target.'cfg(not(target_os = "macos"))'.dependencies]
pyo3 = { version = "0.22.6", features = ["extension-module"] }

pyo3 = { version = "0.22", features = ["extension-module"] }

[dev-dependencies]
cu29-log-runtime = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion core/cu29_helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ cu29-log-derive = { workspace = true }
cu29-helpers = { workspace = true }
serde = { workspace = true }
tempdir = "0.3.7"
smallvec = "1.13.2"
4 changes: 0 additions & 4 deletions core/cu29_log_runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ ignored = ["simplelog"] # Used from conditional compilation
cu29-log = { workspace = true }
cu29-traits = { workspace = true }
cu29-clock = { workspace = true }
cu29-intern-strs = { workspace = true }
serde = { workspace = true }
bincode = { workspace = true }
once_cell = "1.19.0"
simplelog = "0.12.2"
smallvec = "1.13.2"
log = "0.4.22"
3 changes: 1 addition & 2 deletions core/cu29_soa_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ repository.workspace = true
[dependencies]
syn = { workspace = true }
quote = { workspace = true }
proc-macro2 = { workspace = true }
rand = "0.9.0-alpha.2"
syntect = "5.2.0"

[dev-dependencies]
bincode = { workspace = true }
rand = "0.9.0-beta.1"

[lib]
proc-macro = true
Expand Down
1 change: 0 additions & 1 deletion core/cu29_unifiedlog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ repository.workspace = true
cu29-traits = { workspace = true }
bincode = { workspace = true }
memmap2 = "0.9.5"
libc = "0.2.164"
page_size = "0.6.0"

[dev-dependencies]
Expand Down
5 changes: 0 additions & 5 deletions core/cu29_value/.gitignore

This file was deleted.

Loading
Loading