Browse Source

Enable layout tests for generated bindings

pull/168/head
Ian Chamberlain 10 months ago
parent
commit
432fca3c16
No known key found for this signature in database
GPG Key ID: AE5484D09405AA60
  1. 5
      .github/workflows/ci.yml
  2. 2
      ctru-sys/build.rs

5
.github/workflows/ci.yml

@ -43,11 +43,16 @@ jobs:
- name: Check formatting - name: Check formatting
run: cargo fmt --all --verbose -- --check 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) - name: Cargo check ctru-sys (without tests)
run: cargo 3ds clippy --package ctru-sys --color=always --verbose run: cargo 3ds clippy --package ctru-sys --color=always --verbose
if: success() || failure()
- name: Cargo check ctru-rs (including tests) - name: Cargo check ctru-rs (including tests)
run: cargo 3ds clippy --package ctru-rs --color=always --verbose --all-targets run: cargo 3ds clippy --package ctru-rs --color=always --verbose --all-targets
if: success() || failure()
test: test:
strategy: strategy:

2
ctru-sys/build.rs

@ -73,7 +73,7 @@ fn main() {
.use_core() .use_core()
.trust_clang_mangling(false) .trust_clang_mangling(false)
.must_use_type("Result") .must_use_type("Result")
.layout_tests(false) .layout_tests(true)
.ctypes_prefix("::libc") .ctypes_prefix("::libc")
.prepend_enum_name(false) .prepend_enum_name(false)
.blocklist_type("u(8|16|32|64)") .blocklist_type("u(8|16|32|64)")

Loading…
Cancel
Save