Add RPM package verifier #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TurtleTerm Linux Packaging | |
| on: | |
| pull_request: | |
| paths: | |
| - 'assets/sourceos/**' | |
| - 'packaging/linux/**' | |
| - 'packaging/scripts/**' | |
| - '.github/workflows/turtle-term-linux-packaging.yml' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'assets/sourceos/**' | |
| - 'packaging/linux/**' | |
| - 'packaging/scripts/**' | |
| - '.github/workflows/turtle-term-linux-packaging.yml' | |
| workflow_dispatch: | |
| jobs: | |
| validate-linux-package-layout: | |
| name: Validate Linux package layout | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install metadata validators | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y desktop-file-utils appstream | |
| - name: Check native package metadata | |
| run: python3 assets/sourceos/tests/test_turtle_linux_native_packaging.py | |
| - name: Validate staged package layout | |
| run: bash packaging/scripts/verify-linux-package-layout.sh | |
| validate-debian-package: | |
| name: Build and verify Debian package | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Debian packaging tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y dpkg-dev lintian | |
| - name: Validate Debian control shape | |
| run: | | |
| test -f packaging/linux/deb/control | |
| grep -q '^Package: turtle-term$' packaging/linux/deb/control | |
| grep -q '^Architecture: amd64 arm64$' packaging/linux/deb/control | |
| grep -q '^Homepage: https://github.com/SourceOS-Linux/TurtleTerm$' packaging/linux/deb/control | |
| - name: Build and verify Debian package with stub runtime | |
| run: bash packaging/scripts/verify-deb-package.sh | |
| validate-rpm-metadata: | |
| name: Validate RPM metadata | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Validate RPM spec shape | |
| run: | | |
| test -f packaging/linux/rpm/turtle-term.spec | |
| grep -q '^Name: turtle-term$' packaging/linux/rpm/turtle-term.spec | |
| grep -q '^ExclusiveArch: x86_64 aarch64$' packaging/linux/rpm/turtle-term.spec | |
| grep -q 'TURTLE_TERM_STAGE_PREFIX=%{buildroot}%{_prefix}' packaging/linux/rpm/turtle-term.spec | |
| grep -q 'ai.sourceos.TurtleTerm.desktop' packaging/linux/rpm/turtle-term.spec | |
| validate-arch-metadata: | |
| name: Validate Arch metadata | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Validate PKGBUILD shape | |
| run: | | |
| test -f packaging/linux/arch/PKGBUILD | |
| grep -q '^pkgname=turtle-term$' packaging/linux/arch/PKGBUILD | |
| grep -q "arch=('x86_64' 'aarch64')" packaging/linux/arch/PKGBUILD | |
| grep -q 'TURTLE_TERM_STAGE_PREFIX' packaging/linux/arch/PKGBUILD |