From 1f56cb67a43044d7310d9cbe3a24fff8939ca2fb Mon Sep 17 00:00:00 2001 From: pinkforest <36498018+pinkforest@users.noreply.github.com> Date: Sun, 12 Mar 2023 11:58:20 +1100 Subject: [PATCH 1/6] Add no_std to CI --- .github/workflows/rust.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 502b290..502d214 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -70,6 +70,18 @@ jobs: - uses: dtolnay/rust-toolchain@1.60.0 - run: cargo build + build-nostd: + name: Build on no_std target (thumbv7em-none-eabi) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + targets: thumbv7em-none-eabi + - run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc + - run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features "alloc digest rand_core batch zeroize pkcs8" + bench: name: Check that benchmarks compile runs-on: ubuntu-latest From efc871e53398a5859bc32195d8a982c3a1ec5ac3 Mon Sep 17 00:00:00 2001 From: pinkforest <36498018+pinkforest@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:04:36 +1100 Subject: [PATCH 2/6] Add serde to no_std feature test --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 502d214..7997700 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -80,7 +80,7 @@ jobs: toolchain: stable targets: thumbv7em-none-eabi - run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc - - run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features "alloc digest rand_core batch zeroize pkcs8" + - run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features "alloc digest rand_core batch zeroize pkcs8 serde" bench: name: Check that benchmarks compile From e24608e26258d5373f1b0900d1251de2396dd52b Mon Sep 17 00:00:00 2001 From: pinkforest <36498018+pinkforest@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:20:43 +1100 Subject: [PATCH 3/6] Try out cargo hack --- .github/workflows/rust.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7997700..2f37756 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -79,8 +79,9 @@ jobs: with: toolchain: stable targets: thumbv7em-none-eabi - - run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc - - run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features "alloc digest rand_core batch zeroize pkcs8 serde" + - uses: taiki-e/install-action@cargo-hack + # This tests both alloc and no-alloc without std + - run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features std bench: name: Check that benchmarks compile From 60eafa0d51d01d1a868861ce8d2121315561ea2f Mon Sep 17 00:00:00 2001 From: pinkforest <36498018+pinkforest@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:27:04 +1100 Subject: [PATCH 4/6] No serde - expect success --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2f37756..3c6323a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -81,7 +81,8 @@ jobs: targets: thumbv7em-none-eabi - uses: taiki-e/install-action@cargo-hack # This tests both alloc and no-alloc without std - - run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features std + # TODO: serde pending PR#288 + - run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features std,serde bench: name: Check that benchmarks compile From 1a1145f91194533e8d27efb2ebb931057c6a6bd0 Mon Sep 17 00:00:00 2001 From: pinkforest <36498018+pinkforest@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:28:41 +1100 Subject: [PATCH 5/6] Add build for no-default-features --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3c6323a..2bf54a2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -80,7 +80,8 @@ jobs: toolchain: stable targets: thumbv7em-none-eabi - uses: taiki-e/install-action@cargo-hack - # This tests both alloc and no-alloc without std + # No default features build + - run: cargo build --target thumbv7em-none-eabi --release --no-default-features # TODO: serde pending PR#288 - run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features std,serde From edb59d472872c431fe24a38fa1c0c57763908499 Mon Sep 17 00:00:00 2001 From: pinkforest <36498018+pinkforest@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:31:19 +1100 Subject: [PATCH 6/6] Exclude default --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2bf54a2..543f0ec 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -83,7 +83,7 @@ jobs: # No default features build - run: cargo build --target thumbv7em-none-eabi --release --no-default-features # TODO: serde pending PR#288 - - run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features std,serde + - run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features default,std,serde bench: name: Check that benchmarks compile