Skip to content

Commit cd025d5

Browse files
committed
Add Linux packaging validation workflow
1 parent 45fde55 commit cd025d5

1 file changed

Lines changed: 89 additions & 0 deletions

File tree

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: TurtleTerm Linux Packaging
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'assets/sourceos/**'
7+
- 'packaging/linux/**'
8+
- 'packaging/scripts/**'
9+
- '.github/workflows/turtle-term-linux-packaging.yml'
10+
push:
11+
branches:
12+
- main
13+
paths:
14+
- 'assets/sourceos/**'
15+
- 'packaging/linux/**'
16+
- 'packaging/scripts/**'
17+
- '.github/workflows/turtle-term-linux-packaging.yml'
18+
workflow_dispatch:
19+
20+
jobs:
21+
validate-linux-package-layout:
22+
name: Validate Linux package layout
23+
runs-on: ubuntu-24.04
24+
25+
steps:
26+
- name: Check out repository
27+
uses: actions/checkout@v4
28+
29+
- name: Install metadata validators
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y desktop-file-utils appstream
33+
34+
- name: Check native package metadata
35+
run: python3 assets/sourceos/tests/test_turtle_linux_native_packaging.py
36+
37+
- name: Validate staged package layout
38+
run: bash packaging/scripts/verify-linux-package-layout.sh
39+
40+
validate-debian-metadata:
41+
name: Validate Debian metadata
42+
runs-on: ubuntu-24.04
43+
44+
steps:
45+
- name: Check out repository
46+
uses: actions/checkout@v4
47+
48+
- name: Install Debian packaging tools
49+
run: |
50+
sudo apt-get update
51+
sudo apt-get install -y lintian
52+
53+
- name: Validate Debian control shape
54+
run: |
55+
test -f packaging/linux/deb/control
56+
grep -q '^Package: turtle-term$' packaging/linux/deb/control
57+
grep -q '^Architecture: amd64 arm64$' packaging/linux/deb/control
58+
grep -q '^Homepage: https://github.com/SourceOS-Linux/TurtleTerm$' packaging/linux/deb/control
59+
60+
validate-rpm-metadata:
61+
name: Validate RPM metadata
62+
runs-on: ubuntu-24.04
63+
64+
steps:
65+
- name: Check out repository
66+
uses: actions/checkout@v4
67+
68+
- name: Validate RPM spec shape
69+
run: |
70+
test -f packaging/linux/rpm/turtle-term.spec
71+
grep -q '^Name: turtle-term$' packaging/linux/rpm/turtle-term.spec
72+
grep -q '^ExclusiveArch: x86_64 aarch64$' packaging/linux/rpm/turtle-term.spec
73+
grep -q 'TURTLE_TERM_STAGE_PREFIX=%{buildroot}%{_prefix}' packaging/linux/rpm/turtle-term.spec
74+
grep -q 'ai.sourceos.TurtleTerm.desktop' packaging/linux/rpm/turtle-term.spec
75+
76+
validate-arch-metadata:
77+
name: Validate Arch metadata
78+
runs-on: ubuntu-24.04
79+
80+
steps:
81+
- name: Check out repository
82+
uses: actions/checkout@v4
83+
84+
- name: Validate PKGBUILD shape
85+
run: |
86+
test -f packaging/linux/arch/PKGBUILD
87+
grep -q '^pkgname=turtle-term$' packaging/linux/arch/PKGBUILD
88+
grep -q "arch=('x86_64' 'aarch64')" packaging/linux/arch/PKGBUILD
89+
grep -q 'TURTLE_TERM_STAGE_PREFIX' packaging/linux/arch/PKGBUILD

0 commit comments

Comments
 (0)