From 632f64b2ce0abc66efb72a171dbf0d5ec9a57b1f Mon Sep 17 00:00:00 2001 From: Anand Krishnamoorthi Date: Tue, 16 Dec 2025 09:36:24 -0600 Subject: [PATCH 1/3] fix: remove non-existent feature use in git push hook Signed-off-by: Anand Krishnamoorthi --- scripts/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pre-push b/scripts/pre-push index 3521f73..f49e6fe 100755 --- a/scripts/pre-push +++ b/scripts/pre-push @@ -16,7 +16,7 @@ if [ -f Cargo.toml ]; then # Build for a target that has no std available. if command -v rustup > /dev/null; then rustup target add thumbv7m-none-eabi - (cd tests/ensure_no_std; cargo build -r --target thumbv7m-none-eabi --no-default-features --features opa-no-std) + (cd tests/ensure_no_std; cargo build -r --target thumbv7m-none-eabi) fi # Ensure that we can build with only std. From a8f5ac6117da44e1a51863d36980c008ae23ab67 Mon Sep 17 00:00:00 2001 From: Anand Krishnamoorthi Date: Tue, 16 Dec 2025 09:40:19 -0600 Subject: [PATCH 2/3] fix: Run pre-commit tests in debug mode Release mode uses LTO optimization for binaries. This can take up a lot of time especially for doc tests which create a separate binary for each test. Signed-off-by: Anand Krishnamoorthi --- scripts/pre-push | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/pre-push b/scripts/pre-push index f49e6fe..a95a46e 100755 --- a/scripts/pre-push +++ b/scripts/pre-push @@ -10,7 +10,7 @@ if [ -f Cargo.toml ]; then "$dir/pre-commit" # Ensure that the public API works. - cargo test -r --doc + cargo test --doc # Ensure that no_std build succeeds. # Build for a target that has no std available. @@ -20,21 +20,21 @@ if [ -f Cargo.toml ]; then fi # Ensure that we can build with only std. - cargo build -r --example regorus --no-default-features --features std + cargo build --example regorus --no-default-features --features std # Ensure that we can build with all features. - cargo build -r --all-features + cargo build --all-features # Ensure that all tests pass. - cargo test -r - cargo test -r --test aci - cargo test -r --test kata + cargo test + cargo test --test aci + cargo test --test kata # Ensure that all tests pass with extensions - cargo test -r --features rego-extensions - cargo test -r --test aci --features rego-extensions - cargo test -r --test kata --features rego-extensions + cargo test --features rego-extensions + cargo test --test aci --features rego-extensions + cargo test --test kata --features rego-extensions # Ensure that OPA conformance tests don't regress. - cargo test -r --features opa-testutil,serde_json/arbitrary_precision,rego-extensions --test opa -- $(tr '\n' ' ' < tests/opa.passing) + cargo test --features opa-testutil,serde_json/arbitrary_precision,rego-extensions --test opa -- $(tr '\n' ' ' < tests/opa.passing) fi From ce85e0102daffedd171c6e71f4aa6a871c1decd1 Mon Sep 17 00:00:00 2001 From: Anand Krishnamoorthi Date: Tue, 16 Dec 2025 09:54:40 -0600 Subject: [PATCH 3/3] fix: use debug build in pre-commit hook Signed-off-by: Anand Krishnamoorthi --- scripts/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pre-commit b/scripts/pre-commit index 1949ba9..f497463 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -6,7 +6,7 @@ set -eo pipefail if [ -f Cargo.toml ]; then # Ensure that all targets can be built. - cargo build -r --all-targets + cargo build --all-targets #Ensure that code is correctly formatted. cargo fmt --check || (echo "Run cargo fmt to fix formatting" && exit 1)