Skip to content
Open
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
30 changes: 15 additions & 15 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ name: check
jobs:
fmt:
runs-on: ubuntu-latest
name: stable / fmt
name: nightly / fmt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not going to merge things that depend on nightly

Copy link
Collaborator Author

@niclo niclo Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only pertains to the code formatting, nightly is not used for anything else. esp-hal has a similar rustfmt.toml which also depends on nightly.

All of the rustfmt options used are not yet stable (as of rustfmt v1.8.0):

steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # tag=v6.0.0
with:
submodules: true
- name: Install stable
- name: Install nightly
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # branch=master
with:
toolchain: stable
toolchain: nightly
components: rustfmt
- name: cargo fmt --check
run: cargo fmt --check
- name: cargo fmt --all --check
run: cargo fmt --all --check
clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
Expand All @@ -44,11 +44,10 @@ jobs:
target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,x86_64-unknown-linux-gnu
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: cargo clippy
uses: giraffate/clippy-action@13b9d32482f25d29ead141b79e7e04e7900281e0 # tag=v1.0.1
with:
reporter: 'github-pr-check'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: cargo clippy (esp-nvs)
run: cargo clippy --release --package esp-nvs --features=defmt -- --deny warnings
- name: cargo clippy (esp-nvs-partition-tool)
run: cargo clippy --release --package esp-nvs-partition-tool -- --deny warnings
check:
runs-on: ubuntu-latest
name: stable / check
Expand All @@ -60,9 +59,8 @@ jobs:
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # branch=master
with:
toolchain: stable
components: rustfmt
- name: cargo check
run: cargo check
run: cargo check --workspace --all-targets
doc:
# run docs generation on nightly rather than stable. This enables features like
# https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an
Expand All @@ -79,8 +77,10 @@ jobs:
toolchain: nightly
- name: Install cargo-docs-rs
uses: dtolnay/install@982daea0f5d846abc3c83e01a6a1d73c040047c1 # branch=cargo-docs-rs
- name: cargo docs-rs
run: cargo docs-rs
- name: cargo docs-rs (esp-nvs)
run: cargo docs-rs --package esp-nvs
- name: cargo docs-rs (esp-nvs-partition-tool)
run: cargo docs-rs --package esp-nvs-partition-tool
msrv:
runs-on: ubuntu-latest
# we use a matrix here just because env can't be used in job names
Expand All @@ -103,4 +103,4 @@ jobs:
path: ~/.cargo
key: ${{ runner.os }}-cargo
- name: cargo +${{ matrix.msrv }} check
run: cargo check
run: cargo check --workspace
8 changes: 4 additions & 4 deletions .github/workflows/nostd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: rustup target add riscv32imc-unknown-none-elf
run: rustup target add riscv32imc-unknown-none-elf
- name: cargo check
run: cargo check --target riscv32imc-unknown-none-elf --no-default-features
run: cargo check --package esp-nvs --target riscv32imc-unknown-none-elf --no-default-features
riscv32imac:
runs-on: ubuntu-latest
name: riscv32imac-unknown-none-elf
Expand All @@ -38,12 +38,12 @@ jobs:
- name: rustup target add riscv32imac-unknown-none-elf
run: rustup target add riscv32imac-unknown-none-elf
- name: cargo check
run: cargo check --target riscv32imac-unknown-none-elf --no-default-features
run: cargo check --package esp-nvs --target riscv32imac-unknown-none-elf --no-default-features
xtensa:
runs-on: ubuntu-latest
name: xtensa-esp32-none-elf
env:
GITHUB_TOKEN: ${{ secrets. GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # tag=v6.0.0
with:
Expand All @@ -55,4 +55,4 @@ jobs:
version: "latest"
buildtargets: "esp32"
- name: cargo check
run: cargo check --target xtensa-esp32-none-elf --no-default-features -Zbuild-std=core,alloc
run: cargo check --package esp-nvs --target xtensa-esp32-none-elf --no-default-features -Zbuild-std=core,alloc
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test --locked
run: cargo test --locked --all-targets
run: cargo test --locked --workspace --all-targets
# https://github.com/rust-lang/cargo/issues/6669
- name: cargo test --doc
run: cargo test --locked --doc
run: cargo test --locked --workspace --doc
os-check:
# run cargo test on mac and windows
runs-on: ${{ matrix.os }}
Expand All @@ -56,4 +56,4 @@ jobs:
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test
run: cargo test --locked --all-targets
run: cargo test --locked --workspace --all-targets
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/target
/Cargo.lock

.idea/
/esp-nvs/target/
Expand Down
40 changes: 0 additions & 40 deletions .nix/esp-idf-nvs-partition-gen.nix

This file was deleted.

35 changes: 35 additions & 0 deletions .nix/esp-nvs-partition-tool.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
lib,
rustPlatform,
pkg-config,
}:

rustPlatform.buildRustPackage {
pname = "esp-nvs-partition-tool";
version = "0.1.0";

src = ./..;

cargoLock = {
lockFile = ../Cargo.lock;
};

# Only build the esp-nvs-partition-tool binary
cargoBuildFlags = [
"--bin"
"esp-nvs-partition-tool"
];

nativeBuildInputs = [ pkg-config ];

meta = with lib; {
description = "ESP-IDF compatible NVS partition table parser and generator";
homepage = "https://github.com/lhemala/esp-nvs/";
license = with licenses; [
mit
asl20
];
maintainers = [ ];
mainProgram = "esp-nvs-partition-tool";
};
}
Loading