From d953e264aec25ce071010daedfeb50d26e462a4b Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Mon, 16 Dec 2024 08:22:05 +0100 Subject: [PATCH] cargo/ci: update deps, better CI MSRV test, prepare v1.5.1 --- .github/dependabot.yml | 4 ++-- .github/workflows/rust.yml | 24 ++++++++++++++++++++--- CHANGELOG.md | 8 ++++++-- Cargo.toml | 39 ++++++++++++++++++-------------------- README.md | 6 ++++++ check-build.sh | 22 --------------------- 6 files changed, 53 insertions(+), 50 deletions(-) delete mode 100755 check-build.sh diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d02eba7..9ab178d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,7 +3,7 @@ updates: - package-ecosystem: cargo directory: "/" schedule: - interval: daily + interval: monthly open-pull-requests-limit: 10 ignore: - dependency-name: "*" @@ -11,5 +11,5 @@ updates: - package-ecosystem: github-actions directory: "/" schedule: - interval: daily + interval: monthly open-pull-requests-limit: 10 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a44cb90..a5b0d5e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,14 +7,31 @@ env: CARGO_TERM_COLOR: always jobs: - build: + build_library_msrv: + strategy: + matrix: + runs-on: + - macos-latest + - ubuntu-latest + - windows-latest + runs-on: ${{ matrix.runs-on }} + steps: + - uses: actions/checkout@v4 + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.63.0 # MSRV + - run: cargo build + - run: rustup target add thumbv7em-none-eabihf + - run: cargo build --target thumbv7em-none-eabihf + + build_all_targets: runs-on: ubuntu-latest strategy: matrix: rust: - stable - nightly - - 1.63.0 # MSRV steps: - uses: actions/checkout@v4 - name: Setup Rust toolchain @@ -41,7 +58,8 @@ jobs: strategy: matrix: rust: - - 1.63.0 # MSRV + - stable + - nightly steps: - uses: actions/checkout@v4 - name: Setup Rust toolchain diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dee405..5c457f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,16 @@ # Changelog -# 1.5.0 (2023-09-21) +## 1.5.1 (2024-12-16) +- dependency updates +- MSRV bump but only for the tests and examples, not library users + +## 1.5.0 (2023-09-21) - fixed the build by updating the dependencies - apart from that, no changes happened - **BREAKING** MSRV is now `1.63.0` - internal code improvements -# 1.4.0 (2023-03-04) +## 1.4.0 (2023-03-04) - dropped all optional FFT features (`microfft-complex`, `microfft-real`, `rustfft-complex`) and made `microfft::real` the default FFT implementation. This is breaking but only for a small percentage of users. There was no diff --git a/Cargo.toml b/Cargo.toml index 1b366b4..f84a1b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,12 @@ description = """ An easy to use and fast `no_std` library (with `alloc`) to get the frequency spectrum of a digital signal (e.g. audio) using FFT. """ -version = "1.5.0" +version = "1.5.1" authors = ["Philipp Schuster "] edition = "2021" keywords = ["fft", "spectrum", "frequencies", "audio", "dsp"] categories = ["multimedia", "no-std"] +rust-version = "1.63" # MSRV of base library, not examples and benchmarks readme = "README.md" license = "MIT" homepage = "https://github.com/phip1611/spectrum-analyzer" @@ -25,29 +26,25 @@ name = "fft_spectrum_bench" harness = false [dependencies] -microfft = { version = "0.5.1", features = ["size-16384"] } -# approx. compare floats; not only in tests but also during runtime -float-cmp = "0.9.0" -# sin() cos() log10() etc for no_std-environments; these are not part of Core library -libm = "0.2.7" -paste = "1.0.14" +float-cmp = "~0.10.0" +libm = "~0.2.7" +microfft = { version = "~0.5.1", features = ["size-16384"] } +paste = "~1.0.14" [dev-dependencies] -# readmp3 files in tests and examples -minimp3 = "0.5.1" -# visualize spectrum in tests and examples -audio-visualizer = "0.4.0" -# get audio input in examples -cpal = "0.15.2" -# audio data buffering -ringbuffer = "0.15.0" -rand = "0.8.5" # for benchmark -# exit in examples -ctrlc = "~3.3.1" # locked because of repo MSRV -# for benchmark -criterion = "~0.4.0" # locked because of repo MSRV +audio-visualizer = "~0.4.0" +minimp3 = "~0.5.1" +# Additional dependencies for: examples +cpal = "~0.15.2" +ctrlc = "~3.4.0" +ringbuffer = "~0.15.0" -# otherwise FFT and other code is too slow +# Additional dependencies for: benchmarks +criterion = "~0.5.0" +rand = "0.8.5" + + +# Faster code in tests, otherwise FFT is too slow [profile.dev] opt-level = 1 diff --git a/README.md b/README.md index f946694..ff3a2d7 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ spectrum of a digital signal (e.g. audio) using FFT. The **MSRV** (minimum supported Rust version) is `1.63.0`. +## Supported Platforms + +The base library supports all standard and non-standard targets, such as +machines running Linux, Ubuntu, Windows, but also embedded systems running +custom software. + ## I want to understand how FFT can be used to get a spectrum Please see file [/EDUCATIONAL.md](/EDUCATIONAL.md). diff --git a/check-build.sh b/check-build.sh deleted file mode 100755 index 9435bbc..0000000 --- a/check-build.sh +++ /dev/null @@ -1,22 +0,0 @@ -set -e -set -x - -echo "checks that this builds on std+no_std + that all tests run + that all features compile" -cargo build --all-targets - -cargo test --all-targets - -cargo bench - -cargo fmt -- --check # (--check doesn't change the files) - -cargo doc --document-private-items - -cargo clippy --all-targets - -# test no_std -rustup target add thumbv7em-none-eabihf -cargo build --target thumbv7em-none-eabihf - -# run examples -cargo run --release --example mp3-samples