From 21c8b18dc462d061151f01fe7c72f57af0f53757 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Mon, 6 May 2024 21:46:15 +0100 Subject: [PATCH] chore: update ci and add binding script --- .github/workflows/ci.yml | 1 + misc/scripts/check-bindings.sh | 23 +++++++++++++++++++++++ misc/scripts/check-crates.sh | 1 - 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 misc/scripts/check-bindings.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a86da913..3801c3af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,6 +66,7 @@ jobs: -p cdk --no-default-features, -p cdk --no-default-features --features wallet, -p cdk --no-default-features --features all-nuts, + -p cdk-js ] steps: - name: Checkout diff --git a/misc/scripts/check-bindings.sh b/misc/scripts/check-bindings.sh new file mode 100755 index 00000000..0dd8a922 --- /dev/null +++ b/misc/scripts/check-bindings.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Check bindings +buildargs=( + "-p cdk-js --target wasm32-unknown-unknown" +) + +for arg in "${buildargs[@]}"; do + echo "Checking '$arg'" + + cargo build $arg + + if [[ $arg != *"--target wasm32-unknown-unknown"* ]]; + then + cargo test $arg + fi + + cargo clippy $arg -- -D warnings + + echo +done diff --git a/misc/scripts/check-crates.sh b/misc/scripts/check-crates.sh index e1e00b2f..998e4bf1 100755 --- a/misc/scripts/check-crates.sh +++ b/misc/scripts/check-crates.sh @@ -31,7 +31,6 @@ buildargs=( "-p cdk-redb" "-p cdk-redb --no-default-features --features wallet" "-p cdk-redb --no-default-features --features mint" - "-p cdk-js --no-default-features --features" ) for arg in "${buildargs[@]}"; do