From 9291e6e547eee97fda9b2bf57486b7b25eb03308 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:09:18 +0200 Subject: [PATCH] Check bindings are up to date on CI --- .github/workflows/ci.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9fb8b1cba..eccf049d8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -284,6 +284,39 @@ jobs: - name: Run tests run: cargo miri test --workspace --all-features miri + check-bindings: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install rustfmt + run: rustup component add rustfmt + + - name: Install dependencies + run: | + sudo apt update + sudo apt install libpam0g-dev + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: "msrv" + + - name: Install rust-bindgen + uses: taiki-e/install-action@v2 + with: + tool: bindgen-cli@0.70.1 + + - name: Install cargo-minify + run: cargo install --locked --git https://github.com/tweedegolf/cargo-minify cargo-minify + + - name: Regenerate bindings + run: make -B pam-sys + + - name: Check for differences + run: git diff --exit-code + format: runs-on: ubuntu-latest env: