From 432fca3c162720bc50486be361d2e07d96c89fb8 Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Sun, 25 Feb 2024 19:51:07 -0500 Subject: [PATCH] Enable layout tests for generated bindings --- .github/workflows/ci.yml | 5 +++++ ctru-sys/build.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9c2388..2db5b64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,11 +43,16 @@ jobs: - name: Check formatting run: cargo fmt --all --verbose -- --check + # We always run the next two steps, so that even if formatting fails we + # still get compilation errors for the same run (mainly for matchers). + - name: Cargo check ctru-sys (without tests) run: cargo 3ds clippy --package ctru-sys --color=always --verbose + if: success() || failure() - name: Cargo check ctru-rs (including tests) run: cargo 3ds clippy --package ctru-rs --color=always --verbose --all-targets + if: success() || failure() test: strategy: diff --git a/ctru-sys/build.rs b/ctru-sys/build.rs index 5e71ae0..461149f 100644 --- a/ctru-sys/build.rs +++ b/ctru-sys/build.rs @@ -73,7 +73,7 @@ fn main() { .use_core() .trust_clang_mangling(false) .must_use_type("Result") - .layout_tests(false) + .layout_tests(true) .ctypes_prefix("::libc") .prepend_enum_name(false) .blocklist_type("u(8|16|32|64)")