Repository navigation
ci: add deepin & archlinux build CI #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # GitHub Copilot Repository Instructions for ddm | ||
|
|
||
| ## Big Picture | ||
| `ddm` is a Linux display manager that use Treeland as its greeter, originally forked from SDDM. Treeland is a Wayland compositor built on `wlroots` + Qt6/QtQuick | ||
|
|
||
| ## Where to Look | ||
| - `src/common` includes utilities and is exposed outside independently, like configuration definitions, socket messaging protocols and VT management functions. | ||
| - `src/daemon` includes source of the main app | ||
| - DaemonApp defines the application. It starts SeatManager, PowerManager, DisplayManager, SignalHandler and TreelandConnector. | ||
| - PowerManager provides functionality of poweroff, reboot, etc. | ||
| - DisplayManager provides org.freedesktop.DisplayManager D-Bus service. | ||
| - SignalHandler handle signals send to the DaemonApp. | ||
| - TreelandConnector is a wayland client that connects to Treeland. | ||
| - SeatManager manage seats & displays. It will create one Display for each seat. | ||
| - The Display starts up Treeland as greeter and use SocketServer to communicate with it. | ||
| - For each time user login / unlock, an Auth is created and managed by Display. | ||
| - When user login, Auth will startup UserSession, which will call PAM to open session, as well as starting up desktop environment. | ||
|
|
||
| ## Build & Test | ||
| ```bash | ||
| cmake -B build -G Ninja \ | ||
| -DCMAKE_INSTALL_PREFIX=/usr \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror" | ||
| cmake --build build | ||
| ``` | ||
|
|
||
| ## Project Rules (must-follow) | ||
| - Use C++20; Qt6 only (do not introduce Qt5 APIs/modules). | ||
| - Keep diffs minimal: touch only task-related files/symbols; avoid broad refactors/renames and avoid reformatting unrelated code. | ||
| - New files must include an SPDX line consistent with this repo (typically `SPDX-License-Identifier: GPL-2.0-or-later`). | ||
| - For English reviews, append a Chinese translation after the English content. | ||
| - Terminal commands in fenced `bash` blocks; paths/symbols in backticks. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| name: Build ddm on Arch Linux | ||
|
|
||
| # Dependencies are based on the official ArchLinux PKGBUILD | ||
| # treeland-protocols-git is installed from source | ||
|
|
||
| on: | ||
| push: | ||
|
|
||
| pull_request: | ||
|
|
||
| jobs: | ||
| container: | ||
| runs-on: ubuntu-latest | ||
| container: archlinux:latest | ||
| steps: | ||
| - name: Run in container | ||
| run: | | ||
| cat /etc/pacman.d/mirrorlist | ||
| pacman-key --init | ||
| pacman --noconfirm --noprogressbar -Syu | ||
|
|
||
| - name: Install base dependencies | ||
| run: | | ||
| pacman -S --noconfirm --noprogressbar base-devel bash gcc-libs glibc libxau pam qt6-base qt6-declarative systemd-libs ttf-font xorg-server xorg-xauth git extra-cmake-modules python-docutils qt6-tools treeland-protocols ninja | ||
|
|
||
| - name: Build and Install treeland-protocols | ||
| run: | | ||
| echo "Building treeland-protocols from source..." | ||
| git clone https://github.com/linuxdeepin/treeland-protocols.git --depth 1 | ||
| cd treeland-protocols | ||
| cmake -B build \ | ||
| -DCMAKE_INSTALL_LIBDIR=lib \ | ||
| -DCMAKE_INSTALL_LIBEXECDIR=lib \ | ||
| -DCMAKE_INSTALL_PREFIX=/usr \ | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| cmake --build build | ||
| cmake --install build | ||
| echo "✅ treeland-protocols built and installed from source" | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Configure and Build ddm with ci preset | ||
| run: | | ||
| echo "Working directory:" $PWD | ||
| echo "Configuring ddm..." | ||
| cmake -B build -G Ninja \ | ||
|
sourcery-ai[bot] marked this conversation as resolved.
|
||
| -DCMAKE_INSTALL_PREFIX=/usr \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror" | ||
| cmake --build build | ||
| echo "✅ ddm built successfully!" | ||
|
|
||
| - name: Install ddm to staging directory | ||
| run: | | ||
| echo "Installing ddm to staging directory..." | ||
| mkdir -p /tmp/ddm-install | ||
| DESTDIR=/tmp/ddm-install cmake --install build | ||
| echo "✅ ddm installed to staging directory" | ||
|
|
||
| echo "Installed files:" | ||
| find /tmp/ddm-install -type f | head -20 | ||
| echo "Total files installed: $(find /tmp/ddm-install -type f | wc -l)" | ||
|
|
||
| - name: Create ddm installation package | ||
| run: | | ||
| cd /tmp/ddm-install | ||
|
|
||
| # Install zip if not available | ||
| pacman -S --noconfirm zip | ||
|
|
||
| # Create package info | ||
| echo "Creating package info..." | ||
| cat > PACKAGE_INFO.txt << EOF | ||
| Package: ddm-archlinux-build | ||
| Version: $(date +%Y%m%d-%H%M%S) | ||
| Architecture: x86_64 | ||
| Built-on: Arch Linux | ||
| CMake-Config: -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib | ||
|
|
||
| Installation Instructions: | ||
| 1. Extract this package to / | ||
| 2. Run: sudo ldconfig (if libraries are included) | ||
| 3. Ensure dependencies are installed on target system | ||
|
|
||
| Files included in this package: | ||
| EOF | ||
| find . -type f | sort >> PACKAGE_INFO.txt | ||
|
|
||
| # Create the zip package | ||
| zip -r /tmp/ddm-archlinux-$(date +%Y%m%d-%H%M%S).zip . | ||
| echo "✅ ddm installation package created" | ||
|
|
||
| ls -la /tmp/ddm-archlinux-*.zip | ||
|
|
||
| - name: Upload ddm ArchLinux build artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ddm-archlinux-build | ||
| path: "/tmp/ddm-archlinux-*.zip" | ||
| if-no-files-found: error | ||
| retention-days: 30 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| name: Build ddm on Deepin crimson (independent) | ||
|
|
||
| on: | ||
| push: | ||
|
|
||
| pull_request: | ||
|
|
||
| jobs: | ||
| container: | ||
| runs-on: ubuntu-latest | ||
| container: linuxdeepin/deepin:crimson | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| echo "deb [trusted=yes] http://mirrors.kernel.org/deepin/beige/ crimson main commercial community" > /etc/apt/sources.list | ||
| echo "deb-src [trusted=yes] http://mirrors.kernel.org/deepin/beige/ crimson main commercial community" >> /etc/apt/sources.list | ||
| rm -rf /etc/apt/sources.list.d | ||
|
|
||
| apt-get update | ||
| apt-get install -y devscripts equivs git | ||
|
|
||
| # Save the ddm workspace directory | ||
| DDM_DIR="$PWD" | ||
| echo "ddm workspace directory: $DDM_DIR" | ||
|
|
||
| # Build and install treeland-protocols locally (required build dependency not from repo) | ||
| echo "Building treeland-protocols from source (master)" | ||
| cd /tmp | ||
| if [ ! -d treeland-protocols ]; then | ||
| git clone --depth=1 --branch master --single-branch https://github.com/linuxdeepin/treeland-protocols.git | ||
| fi | ||
| cd treeland-protocols | ||
| mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control | ||
| dpkg-buildpackage -uc -us -b | ||
|
calsys456 marked this conversation as resolved.
|
||
| apt-get install -y ../*.deb || dpkg -i ../*.deb || apt-get -f install -y | ||
| cd "$DDM_DIR" | ||
|
|
||
| # Install build-deps defined in ddm/debian/control | ||
| mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control | ||
|
|
||
| - name: Build ddm deb package | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| # Check build dependencies and diagnose missing packages | ||
| set +e | ||
| dpkg-checkbuilddeps 2> /tmp/ddm-builddeps.err | ||
| BUILDDEPS_RC=$? | ||
| set -e | ||
|
|
||
| if [ "$BUILDDEPS_RC" -ne 0 ]; then | ||
| echo "❌ Build dependencies check failed. Analyzing missing packages..." | ||
| cat /tmp/ddm-builddeps.err | ||
|
|
||
| # Extract and list each missing package with version requirements | ||
| echo "" | ||
| echo "Detailed missing packages analysis:" | ||
| grep -oP '(?<=Unmet build dependencies: ).*' /tmp/ddm-builddeps.err | tr ' ' '\n' | while read pkg; do | ||
| if [ -n "$pkg" ]; then | ||
|
calsys456 marked this conversation as resolved.
|
||
| # Check if package exists in repos | ||
| apt-cache policy "$pkg" 2>/dev/null | head -20 || echo "Package '$pkg' not found in any repository" | ||
| fi | ||
| done | ||
| fi | ||
|
|
||
| dpkg-buildpackage -uc -us -b | ||
| echo "ddm deb package built successfully!" | ||
| ls -la ../ | ||
|
|
||
| - name: Collect deb artifacts | ||
| run: | | ||
| set -euxo pipefail | ||
| mkdir -p dist | ||
| mv ../*.deb dist/ | ||
| ls -la dist | ||
|
|
||
| - name: Upload ddm deb packages as artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ddm-deepin-deb-packages | ||
| path: dist/*.deb | ||
| if-no-files-found: error | ||
| retention-days: 30 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.