treeland/.github/workflows/waylib-debian-build.yml

87 lines
3.1 KiB
YAML

name: Build waylib on Debian experimental (independent)
on:
push:
paths:
- 'waylib/**'
- '.github/workflows/waylib-debian-build.yml'
branches:
- master
pull_request:
paths:
- 'waylib/**'
- '.github/workflows/waylib-debian-build.yml'
branches:
- master
jobs:
container:
runs-on: ubuntu-latest
container: debian:experimental
steps:
- uses: actions/checkout@v4
- name: Build qwlroots first
working-directory: qwlroots
run: |
# Configure apt sources for experimental
echo "deb http://deb.debian.org/debian experimental main" > /etc/apt/sources.list
echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list
apt-get update
apt-get install -y devscripts equivs
# Add deepin community repository to install wlr-protocols
echo "deb [trusted=yes] https://community-packages.deepin.com/beige/ crimson main commercial community" > /etc/apt/sources.list.d/deepin-community.list
# Update package lists (ignore signature errors for this temporary repo)
apt-get update --allow-unauthenticated
# Install wlr-protocols package directly
apt-get install -y --allow-unauthenticated wlr-protocols
# Remove deepin repository to avoid system pollution
rm -f /etc/apt/sources.list.d/deepin-community.list
apt-get update
# Install other build dependencies for qwlroots
mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
# Build qwlroots deb package
dpkg-buildpackage -uc -us -b
echo "✅ qwlroots deb package built successfully!"
ls -la ../*.deb
- name: Install qwlroots deb package
run: |
# Install the built qwlroots package
dpkg -i qwlroots*.deb || apt-get install -f -y
echo "✅ qwlroots package installed!"
- name: Build waylib deb package
working-directory: waylib
run: |
# Install remaining build dependencies for waylib
apt-get install -y devscripts equivs
# Install waylib build dependencies (qwlroots is now available from the installed deb)
mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
# Build waylib with submodule disabled (use system qwlroots)
# Modify debian/rules to disable submodule
sed -i 's/-DCMAKE_INSTALL_PREFIX=\/usr/-DCMAKE_INSTALL_PREFIX=\/usr -DWITH_SUBMODULE_QWLROOTS=OFF/' debian/rules
echo "Modified debian/rules to disable qwlroots submodule:"
cat debian/rules
dpkg-buildpackage -uc -us -b
echo "✅ waylib deb package built successfully!"
ls -la ../*.deb
- name: Upload waylib deb packages as artifacts
uses: actions/upload-artifact@v4
with:
name: waylib-deb-packages
path: "*.deb"
if-no-files-found: error
retention-days: 30