From 42d1257e83be896322ee1edb6bd6161632fa86be Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 2 May 2024 14:39:30 +0200 Subject: [PATCH 1/2] prepare next release v0.2.0 --- .github/workflows/ci.yml | 64 ++++++++++++++++++++++++++++++++++++++++ automation/Jenkinsfile | 1 + satrs/CHANGELOG.md | 10 +++++++ satrs/Cargo.toml | 2 +- satrs/src/events.rs | 4 +-- 5 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e21a645 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,64 @@ +name: ci +on: [push, pull_request] + +jobs: + check: + name: Check build + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo check --release + + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Install nextest + uses: taiki-e/install-action@nextest + - run: cargo nextest run --all-features + - run: cargo test --doc + + cross-check: + name: Check Cross-Compilation + runs-on: ubuntu-latest + strategy: + matrix: + target: + - armv7-unknown-linux-gnueabihf + - thumbv7em-none-eabihf + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + targets: "armv7-unknown-linux-gnueabihf, thumbv7em-none-eabihf" + - run: cargo check -p satrs --release --target=${{matrix.target}} --no-default-features + + fmt: + name: Check formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo fmt --all -- --check + + docs: + name: Check Documentation Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - run: cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]' + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo clippy -- -D warnings diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile index 7aafe26..c3c8c7c 100644 --- a/automation/Jenkinsfile +++ b/automation/Jenkinsfile @@ -33,6 +33,7 @@ pipeline { stage('Test') { steps { sh 'cargo nextest r --all-features' + sh 'cargo test --doc' } } stage('Check with all features') { diff --git a/satrs/CHANGELOG.md b/satrs/CHANGELOG.md index 6124919..a9038c9 100644 --- a/satrs/CHANGELOG.md +++ b/satrs/CHANGELOG.md @@ -8,6 +8,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/). # [unreleased] +# [v0.2.0] 2024-05-02 + +## Changed + +- Various improvements for the PUS stack components. + +## Added + +- Added `HandlingStatus` enumeration. + # [v0.2.0-rc.5] 2024-04-24 ## Added diff --git a/satrs/Cargo.toml b/satrs/Cargo.toml index 92b753d..0338da2 100644 --- a/satrs/Cargo.toml +++ b/satrs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "satrs" -version = "0.2.0-rc.5" +version = "0.2.0" edition = "2021" rust-version = "1.71.1" authors = ["Robin Mueller "] diff --git a/satrs/src/events.rs b/satrs/src/events.rs index 5544eb2..352bf5e 100644 --- a/satrs/src/events.rs +++ b/satrs/src/events.rs @@ -21,11 +21,11 @@ //! use satrs::events::{EventU16, EventU32, EventU32TypedSev, Severity, SeverityHigh, SeverityInfo}; //! //! const MSG_RECVD: EventU32TypedSev = EventU32TypedSev::new(1, 0); -//! const MSG_FAILED: EventU32 = EventU32::new(Severity::LOW, 1, 1); +//! const MSG_FAILED: EventU32 = EventU32::new(Severity::Low, 1, 1); //! //! const TEMPERATURE_HIGH: EventU32TypedSev = EventU32TypedSev::new(2, 0); //! -//! let small_event = EventU16::new(Severity::INFO, 3, 0); +//! let small_event = EventU16::new(Severity::Info, 3, 0); //! ``` use core::fmt::Debug; use core::hash::Hash; -- 2.43.0 From 46dbb4309b2b4021030c93a0adfe7066a1a7cc8a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 2 May 2024 14:44:22 +0200 Subject: [PATCH 2/2] new clippy check --- satrs/src/request.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/satrs/src/request.rs b/satrs/src/request.rs index 3999278..f188798 100644 --- a/satrs/src/request.rs +++ b/satrs/src/request.rs @@ -10,7 +10,7 @@ pub use std_mod::*; use spacepackets::{ ecss::{tc::IsPusTelecommand, PusPacket}, - ByteConversionError, CcsdsPacket, + ByteConversionError, }; use crate::{queue::GenericTargetedMessagingError, ComponentId}; @@ -47,7 +47,7 @@ impl UniqueApidTargetId { /// This function attempts to build the ID from a PUS telecommand by extracting the APID /// and the first four bytes of the application data field as the target field. pub fn from_pus_tc( - tc: &(impl CcsdsPacket + PusPacket + IsPusTelecommand), + tc: &(impl PusPacket + IsPusTelecommand), ) -> Result { if tc.user_data().len() < 4 { return Err(ByteConversionError::FromSliceTooSmall { -- 2.43.0