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
46 changes: 32 additions & 14 deletions .github/actions/common/setup-rust-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ description: Install deps, ARM toolchain, and Rust toolchain
runs:
using: composite
steps:
- name: Cache/Restore Build Files
id: cache-check
- name: Rust build cache (crates + target)
uses: Swatinem/rust-cache@v2
with:
# Cache is scoped by OS, Rust version, target triple, and workspace hash
save-if: true
cache-all-crates: true
workspaces: |
. -> target

- name: Cache Rustup Toolchains
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
~/.rustup/toolchains/
~/.rustup/update-hashes/
key: ${{ runner.os }}-rustup-stable-thumbv7em-none-eabihf

- name: Disable man-db (skip Manual Page Installs)
shell: bash
Expand All @@ -29,7 +34,7 @@ runs:
shell: bash
run: |
sudo apt update
sudo apt install -y cmake protobuf-compiler
sudo apt-get install -y --no-install-recommends cmake protobuf-compiler

- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
uses: carlosperate/arm-none-eabi-gcc-action@v1
Expand All @@ -41,9 +46,22 @@ runs:
with:
toolchain: stable
target: thumbv7em-none-eabihf
profile: minimal
override: true

- name: Install Cargo Dependencies
uses: actions-rs/cargo@v1
with:
command: install
args: --force cargo-make cargo-sort
- name: Install Cargo Binaries (idempotent)
shell: bash
run: |
set -euo pipefail
ensure_bin() {
local bin="$1"; shift
if ! command -v "$bin" >/dev/null 2>&1; then
echo "Installing $bin..."
cargo install "$@"
else
echo "$bin already installed; skipping"
fi
}
# Pin versions for reproducibility and better cache hits
ensure_bin cargo-make cargo-make@0.37.7
ensure_bin cargo-sort cargo-sort@1.0.9
23 changes: 15 additions & 8 deletions .github/workflows/argus-build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# SHOULD DO: dedupe these and clean them up
on:
push:
branches: [ main ]
branches: [main]
pull_request:
paths:
- '.github/workflows/argus/**'
- 'boards/argus/**'
- 'common/**' # because argus has some dependencies on common
- ".github/workflows/argus/**"
- "boards/argus/**"
- "common/**" # because argus has some dependencies on common
workflow_dispatch:
name: Build Verification

jobs:
formatting:
name: Check for Formatting Issues
lint:
name: Check for Formatting/Linting/Semantic Issues
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -24,13 +24,20 @@ jobs:
- name: Install Formatting Dependencies
run: |
cargo install cargo-sort
rustup component add rustfmt
rustup component add rustfmt clippy
working-directory: boards/argus

- name: Check Formatting
run: cargo fmt -- --check
working-directory: boards/argus

- name: Check Cargo.toml Sorting
run: cargo sort --check
working-directory: boards/argus

- name: Check for Clippy Warnings
run: cargo clippy -p argus --all-features --no-deps
working-directory: boards/argus

build_pressure:
name: Build with Pressure Feature
Expand Down Expand Up @@ -90,4 +97,4 @@ jobs:
name: "Run Host Tests"
with:
command: make
args: test-host
args: test-host
3 changes: 3 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ jobs:

- name: Build project with Pressure Feature
run: cargo build --release --features pressure
working-directory: boards/argus

- name: Build project with Temperature Feature
run: cargo build --release --features temperature
working-directory: boards/argus

- name: Build project with Strain Feature
run: cargo build --release --features strain
working-directory: boards/argus

- name: Run semantic-release
id: semantic-release
Expand Down
88 changes: 80 additions & 8 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@ version = "1.0.150"
default-features = false
features = ["derive"]

[workspace.dependencies.serde-csv-core]
version = "0.3.2"
features = ["defmt"]

[workspace.dependencies.smlang]
version = "0.8.0"
14 changes: 1 addition & 13 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ default_to_workspace = false
# -----------------------

[tasks.test-host]
dependencies = ["test-thermocouple-converter"]

dependencies = []
# -----------------------
# Embedded Testing
# -----------------------
Expand All @@ -33,14 +32,3 @@ args = ["test", "-p", "argus", "--features", "pressure", "${@}"]
[tasks.test-argus-strain]
command = "cargo"
args = ["test", "-p", "argus", "--features", "strain", "${@}"]

[tasks.test-thermocouple-converter]
command = "cargo"
args = [
"test",
"-p",
"thermocouple-converter",
"--target",
"${CARGO_MAKE_RUST_TARGET_TRIPLE}",
]
env = { RUST_MIN_STACK = "8388608" }
10 changes: 8 additions & 2 deletions boards/argus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ chrono = { workspace = true }
cortex-m = { workspace = true }
cortex-m-rt = { workspace = true }
critical-section = "1.1"
csv = { path = "../../common/csv" }
defmt = { workspace = true }
defmt-rtt = { workspace = true }
derive_more = { version = "2.0.1", default-features = false, features = [
"full",
] }
embassy-embedded-hal = { version = "0.3.0" }
embassy-executor = { version = "0.7.0", features = [
"nightly",
Expand Down Expand Up @@ -70,15 +74,17 @@ itoa = { version = "1.0.15", features = ["no-panic"] }
libm = { version = "0.2.15", default-features = false }
messages-prost = { workspace = true }
micromath = "2.0.0"
num-traits = { version = "0.2.19", default-features = false, features = [
"libm",
] }
panic-probe = { workspace = true }
pid = "4.0.0"
serde = { workspace = true, features = ["derive", "serde_derive"] }
serde-csv-core = { version = "0.3.2", features = ["defmt"] }
smlang = { workspace = true }
static_cell = "2"
stm32-fmc = "0.3.0"
straingauge-converter = { path = "../../common/straingauge-converter" }
thermocouple-converter = { path = "../../common/thermocouple-converter" }
strum = { version = "0.27.2", default-features = false, features = ["derive"] }

[[test]]
name = "sd"
Expand Down
2 changes: 0 additions & 2 deletions boards/argus/src/adc/config.rs

This file was deleted.

Loading
Loading