Skip to content

Commit

Permalink
ci: better test MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
phip1611 committed Dec 16, 2024
1 parent f903d98 commit 4594c21
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 49 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
interval: monthly
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
interval: monthly
open-pull-requests-limit: 10
27 changes: 24 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,34 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
build_library_msrv:
strategy:
matrix:
runs-on:
- ubuntu-latest
- macos-latest
- macos-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
- name: Install required Linux packages for "audio-visualizer"/cpal/minifb
run: sudo apt update && sudo apt -y install libasound2-dev libxkbcommon-dev

- 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
Expand All @@ -41,7 +61,8 @@ jobs:
strategy:
matrix:
rust:
- 1.63.0 # MSRV
- stable
- nightly
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
Expand Down
41 changes: 19 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
edition = "2021"
keywords = ["fft", "spectrum", "frequencies", "audio", "dsp"]
categories = ["multimedia", "no-std"]
categories = ["multimedia", "no-std", "no-std::no-alloc"]
rust-version = "1.63" # MSRV of base library, not examples and benchmarks
readme = "README.md"
license = "MIT"
homepage = "https://github.com/phip1611/spectrum-analyzer"
Expand All @@ -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
22 changes: 0 additions & 22 deletions check-build.sh

This file was deleted.

0 comments on commit 4594c21

Please sign in to comment.