Add GitHub Actions CI: cargo fmt/clippy/test, PAM build, deb build
This commit is contained in:
48
.github/workflows/ci.yml
vendored
Normal file
48
.github/workflows/ci.yml
vendored
Normal 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
|
||||||
Reference in New Issue
Block a user