Add GitHub Actions CI: cargo fmt/clippy/test, PAM build, deb build

This commit is contained in:
michael
2026-04-26 14:49:48 -07:00
parent 9e3090ca88
commit 98d2502244

48
.github/workflows/ci.yml vendored Normal file
View File

@@ -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