Skip to content

Commit

Permalink
Merge pull request #56 from phip1611/dev
Browse files Browse the repository at this point in the history
modernize CI
  • Loading branch information
phip1611 authored Sep 21, 2023
2 parents 3c079ec + 81ce2f8 commit e8c2f03
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 30 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
28 changes: 12 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build

# Triggers the workflow on push or pull request events (for any branch in a repository)
on: [ push, pull_request ]
on: [ push, pull_request, merge_group ]

env:
CARGO_TERM_COLOR: always
Expand All @@ -14,16 +14,14 @@ jobs:
rust:
- stable
- nightly
- 1.61.0 # MSRV
- 1.63.0 # MSRV
steps:
- uses: actions/checkout@v2
# Important preparation step: override the latest default Rust version in GitHub CI
# with the current value of the iteration in the "strategy.matrix.rust"-array.
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
profile: default
toolchain: ${{ matrix.rust }}
override: true
components: clippy, rustfmt
- name: Install required Linux packages for "audio-visualizer"/cpal/minifb
run: sudo apt update && sudo apt -y install libasound2-dev libxkbcommon-dev

Expand All @@ -43,21 +41,19 @@ jobs:
strategy:
matrix:
rust:
- 1.61.0 # MSRV
- 1.63.0 # MSRV
steps:
- uses: actions/checkout@v2
# Important preparation step: override the latest default Rust version in GitHub CI
# with the current value of the iteration in the "strategy.matrix.rust"-array.
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
profile: default
toolchain: ${{ matrix.rust }}
override: true
components: clippy, rustfmt
- name: Install required Linux packages for "audio-visualizer"/cpal/minifb
run: sudo apt update && sudo apt -y install libasound2-dev libxkbcommon-dev
- name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets
- name: Rustdoc
run: cargo doc --document-private-items
run: cargo doc --document-private-items --no-deps
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

# Unreleased
# 1.5.0 (2023-09-21)
- **BREAKING** MSRV is now `1.63.0`
- updated all dependencies
- internal code improvements

# 1.4.0 (2023-03-04)
Expand All @@ -12,7 +14,7 @@
- dependency updates

## 1.3.0 (2023-03-04)
- MSRV is now `1.61.0`
- MSRV is now `1.63.0`
- `FrequencySpectrum::apply_scaling_fn` now requires a reference to `&mut self`:
This is breaking but only for a small percentage of users. Performance is
slightly improved as less heap allocations are required.
Expand Down
22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@ name = "fft_spectrum_bench"
harness = false

[dependencies]
microfft = { version = "0.5", features = ["size-16384"] }
microfft = { version = "0.5.1", features = ["size-16384"] }
# approx. compare floats; not only in tests but also during runtime
float-cmp = "0.9"
float-cmp = "0.9.0"
# sin() cos() log10() etc for no_std-environments; these are not part of Core library
libm = "0.2"
paste = "1.0"
libm = "0.2.7"
paste = "1.0.14"

[dev-dependencies]
# readmp3 files in tests and examples
minimp3 = "0.5"
minimp3 = "0.5.1"
# visualize spectrum in tests and examples
audio-visualizer = "0.3"
audio-visualizer = "0.4.0"
# get audio input in examples
cpal = "0.15.0"
cpal = "0.15.2"
# audio data buffering
ringbuffer = "0.12.0"
rand = "0.8" # for benchmark
ringbuffer = "0.15.0"
rand = "0.8.5" # for benchmark
# exit in examples
ctrlc = "3.2"
ctrlc = "~3.3.1" # locked because of repo MSRV
# for benchmark
criterion = "0.4"
criterion = "~0.4.0" # locked because of repo MSRV


# otherwise FFT and other code is too slow
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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.

The **MSRV** (minimum supported Rust version) is `1.61.0`.
The **MSRV** (minimum supported Rust version) is `1.63.0`.

## I want to understand how FFT can be used to get a spectrum
Please see file [/EDUCATIONAL.md](/EDUCATIONAL.md).
Expand Down

0 comments on commit e8c2f03

Please sign in to comment.