From 98d25022441ec08c79107fa4347b2de3017f2727 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 26 Apr 2026 14:49:48 -0700 Subject: [PATCH] Add GitHub Actions CI: cargo fmt/clippy/test, PAM build, deb build --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f80a215 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI +on: + push: + branches: [main] + pull_request: + +jobs: + rust: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libpam0g-dev libgtk-4-dev libadwaita-1-dev libfido2-dev pkg-config + - run: cargo fmt --all -- --check + - run: cargo clippy --workspace --all-targets -- -D warnings + - run: cargo test --workspace + + pam: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - run: sudo apt-get update && sudo apt-get install -y libpam0g-dev + - run: make -C pam + + deb: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Install build dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + debhelper devscripts lintian \ + libpam0g-dev libgtk-4-dev libadwaita-1-dev libfido2-dev pkg-config \ + cargo rustc + - run: debuild -us -uc -b + - name: Run lintian (warnings allowed in Phase 0) + run: lintian --info --display-info ../ubuntu-fido*.changes || true + - uses: actions/upload-artifact@v4 + with: + name: deb-packages + path: ../ubuntu-fido*.deb