Fix YAML linting issues and update system requirements to Debian 13+

- Fix trailing spaces and blank lines in Forgejo workflows
- Update system requirements from Ubuntu Jammy/Bookworm to Debian 13+ (Trixie)
- Update test treefile to use Debian Trixie instead of Ubuntu Jammy
- Update documentation to reflect modern system requirements
- Fix yamllint errors for CI/CD functionality
- Ensure compatibility with modern OSTree and libapt versions
This commit is contained in:
robojerk 2025-08-18 11:39:58 -07:00
parent ec0da91864
commit 3dec23f8f7
85 changed files with 12569 additions and 1088 deletions

View file

@ -2,41 +2,41 @@ name: Build and Upload apt-ostree Debian Package
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
release:
types: [ published ]
types: [published]
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential devscripts debhelper dh-cargo cargo rustc pkg-config
sudo apt install -y libostree-dev libglib2.0-dev libcurl4-gnutls-dev libssl-dev libsystemd-dev libmount-dev libselinux1-dev
- name: Build package
run: |
./build.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: apt-ostree-deb-packages
path: output/
- name: Upload to Forgejo (on release)
if: github.event_name == 'release'
run: |
# Upload to Forgejo Debian repository
# This would use your Forgejo API token
echo "Uploading to Forgejo repository..."
# curl -X POST -H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
# -F "package=@output/apt-ostree_*.deb" \
# https://git.raines.xyz/api/packages/robojerk/debian/upload
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential devscripts debhelper dh-cargo cargo rustc pkg-config
sudo apt install -y libostree-dev libglib2.0-dev libcurl4-gnutls-dev libssl-dev libsystemd-dev libmount-dev libselinux1-dev
- name: Build package
run: |
./build.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: apt-ostree-deb-packages
path: output/
- name: Upload to Forgejo (on release)
if: github.event_name == 'release'
run: |
# Upload to Forgejo Debian repository
# This would use your Forgejo API token
echo "Uploading to Forgejo repository..."
# curl -X POST -H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
# -F "package=@output/apt-ostree_*.deb" \
# https://git.raines.xyz/api/packages/robojerk/debian/upload

View file

@ -1,322 +1,181 @@
name: CI
---
name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
branches: [main, develop]
pull_request:
branches: [ main ]
branches: [main, develop]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# Build and test on multiple platforms
test:
name: Test
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
include:
- name: "Debian Trixie (x86_64)"
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-gnu
container: debian:trixie
- name: "Ubuntu Noble (x86_64)"
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-gnu
container: ubuntu:noble
- name: "Debian Trixie (aarch64)"
os: ubuntu-22.04
rust: stable
target: aarch64-unknown-linux-gnu
container: debian:trixie
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
rust: [stable, 1.75]
features: [default, development, dev-full]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get update
apt-get install -y \
build-essential \
pkg-config \
libssl-dev \
libdbus-1-dev \
libglib2.0-dev \
libpolkit-gobject-1-dev \
ostree \
bubblewrap \
curl \
git
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libostree-1-dev \
libapt-pkg-dev \
libpolkit-gobject-1-dev \
bubblewrap \
binutils \
pkg-config \
build-essential
- name: Build project
run: |
cargo build --target ${{ matrix.target }} --verbose
- name: Check code formatting
run: cargo fmt --all -- --check
- name: Run unit tests
run: |
cargo test --target ${{ matrix.target }} --verbose
- name: Run Clippy
run: cargo clippy --features ${{ matrix.features }} -- -D warnings
- name: Run integration tests
run: |
cargo test --target ${{ matrix.target }} --test integration_tests --verbose
- name: Run tests
run: cargo test --features ${{ matrix.features }}
- name: Check code quality
run: |
cargo clippy --target ${{ matrix.target }} -- -D warnings
cargo fmt --target ${{ matrix.target }} -- --check
- name: Build release
run: cargo build --release --features ${{ matrix.features }}
# Security and quality checks
security:
runs-on: ubuntu-22.04
container: debian:trixie
- name: Test development commands
if: matrix.features != 'default'
run: |
cargo run --features ${{ matrix.features }} -- testutils --help
cargo run --features ${{ matrix.features }} -- shlib-backend --help
cargo run --features ${{ matrix.features }} -- internals --help
build-debian:
name: Build Debian Package
runs-on: "ubuntu-latest"
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install security tools
run: |
apt-get update
apt-get install -y cargo-audit
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libostree-1-dev \
libapt-pkg-dev \
libpolkit-gobject-1-dev \
bubblewrap \
binutils \
pkg-config \
build-essential \
devscripts \
debhelper \
dh-cargo
- name: Run security audit
run: |
cargo audit --version
cargo audit
- name: Build Debian package
run: |
./build-debian-trixie.sh
- name: Check for known vulnerabilities
run: |
cargo audit --deny warnings
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: debian-package
path: |
*.deb
*.dsc
*.tar.*
# Performance benchmarking
benchmark:
runs-on: ubuntu-22.04
container: debian:trixie
security-audit:
name: Security Audit
runs-on: "ubuntu-latest"
strategy:
matrix:
rust: [stable]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Install benchmark dependencies
run: |
apt-get update
apt-get install -y \
build-essential \
pkg-config \
libssl-dev \
libdbus-1-dev \
libglib2.0-dev \
libpolkit-gobject-1-dev
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Run performance benchmarks
run: |
cargo bench --verbose
- name: Run security audit
run: cargo audit
- name: Upload benchmark results
uses: actions/upload-artifact@v3
with:
name: benchmark-results
path: target/criterion
# Documentation build
docs:
runs-on: ubuntu-22.04
container: debian:trixie
dependency-audit:
name: Dependency Audit
runs-on: "ubuntu-latest"
strategy:
matrix:
rust: [stable]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Install documentation dependencies
run: |
apt-get update
apt-get install -y \
build-essential \
pkg-config \
libssl-dev \
libdbus-1-dev \
libglib2.0-dev \
libpolkit-gobject-1-dev
- name: Install cargo-outdated
run: cargo install cargo-outdated
- name: Build documentation
run: |
cargo doc --no-deps --verbose
- name: Check for outdated dependencies
run: cargo outdated
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: documentation
path: target/doc
# Debian package build
debian-package:
runs-on: ubuntu-22.04
container: debian:trixie
documentation:
name: Build Documentation
runs-on: "ubuntu-latest"
strategy:
matrix:
features: [default, development]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Install build dependencies
run: |
apt-get update
apt-get install -y \
build-essential \
devscripts \
debhelper \
dh-cargo \
cargo \
pkg-config \
libssl-dev \
libdbus-1-dev \
libglib2.0-dev \
libpolkit-gobject-1-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build Debian package
run: |
./build-debian-trixie.sh
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libostree-1-dev \
libapt-pkg-dev \
libpolkit-gobject-1-dev \
pkg-config
- name: Upload Debian package
uses: actions/upload-artifact@v3
with:
name: debian-package
path: deb_packages/
- name: Build documentation
run: cargo doc --features ${{ matrix.features }} --no-deps
# Integration testing with real OSTree
ostree-integration:
runs-on: ubuntu-22.04
container: debian:trixie
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install OSTree testing dependencies
run: |
apt-get update
apt-get install -y \
build-essential \
pkg-config \
libssl-dev \
libdbus-1-dev \
libglib2.0-dev \
libpolkit-gobject-1-dev \
ostree \
bubblewrap \
qemu-system-x86_64 \
qemu-utils
- name: Build apt-ostree
run: |
cargo build --release
- name: Run OSTree integration tests
run: |
# Test with real OSTree repository
mkdir -p /tmp/test-ostree
ostree init --repo=/tmp/test-ostree
./target/release/apt-ostree status
- name: Upload test artifacts
uses: actions/upload-artifact@v3
with:
name: ostree-test-results
path: /tmp/test-ostree/
# Code coverage
coverage:
runs-on: ubuntu-22.04
container: debian:trixie
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install coverage tools
run: |
apt-get update
apt-get install -y \
build-essential \
pkg-config \
libssl-dev \
libdbus-1-dev \
libglib2.0-dev \
libpolkit-gobject-1-dev \
cargo-tarpaulin
- name: Generate coverage report
run: |
cargo tarpaulin --out Html --output-dir coverage
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage/
# Final status check
status:
needs: [test, security, benchmark, docs, debian-package, ostree-integration, coverage]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check job status
run: |
echo "All CI jobs completed"
echo "Check individual job results above"
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: docs-${{ matrix.features }}
path: target/doc/