diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 37bac496..cd239af3 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -20,27 +20,26 @@ This directory contains the GitHub Actions workflows for the MangoWC project. **What it does**: 1. Installs system dependencies (libinput, libdrm, etc.) -2. Installs wayland (tries apt first, builds 1.23.1 from source if needed) -3. Installs wlroots (tries apt first, builds 0.19 from source if needed) -4. Builds scenefx 0.4.1 from source (not available in apt) -5. Configures the project with meson -6. Builds the project with ninja -7. Verifies the executables were created +2. Builds wayland 1.23.1 from source +3. Builds wlroots 0.19 from source +4. Builds scenefx 0.4.1 from source +5. Uses `meson subprojects download` to fetch any required subproject dependencies +6. Configures the project with meson +7. Builds the project with ninja +8. Verifies the executables were created -**Install Strategy**: -- Prefers apt packages when available and version requirements are met -- Falls back to building from source only when necessary -- wayland: requires >= 1.23.1 (typically builds from source on Ubuntu 22.04/24.04) -- wlroots: requires >= 0.19.0 (checks apt version, builds from source if too old) -- scenefx: not in apt repositories (always builds from source) +**Build Strategy**: +- All dependencies (wayland, wlroots, scenefx) are built from their source repositories +- Uses `meson subprojects download` before each meson setup to fetch required subprojects +- Allows meson wrap mode for automatic subproject handling (no --wrap-mode=nodownload) **Dependencies**: - Ubuntu latest runner - Meson build system - Ninja build tool -- Wayland >= 1.23.1 -- wlroots >= 0.19.0 -- scenefx 0.4.1 +- Wayland 1.23.1 (built from source) +- wlroots 0.19 (built from source) +- scenefx 0.4.1 (built from source) ### docs.yml **Purpose**: Validates markdown documentation for style and formatting consistency. @@ -55,10 +54,9 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - Workflow file itself: `.github/workflows/docs.yml` **What it does**: -- Lints markdown files in the repository using markdownlint-cli2 +- Lints all markdown files using markdownlint-cli2 - Checks for common markdown formatting issues - Ensures documentation follows consistent style guidelines -- Excludes dependency directories (wayland, wlroots, scenefx) to only lint repository files ### lock.yml **Purpose**: Automatically locks inactive issues and PRs to keep the repository clean. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0da79d44..584c43de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install system dependencies + - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y \ @@ -61,84 +61,48 @@ jobs: libxml2-dev \ pkg-config - - name: Install wayland (try apt first, build from source if needed) + - name: Build and install wayland 1.23.1 run: | - # Try to install wayland from apt - if sudo apt-get install -y libwayland-dev 2>/dev/null; then - # Check if pkg-config can find wayland-server - if WAYLAND_VERSION=$(pkg-config --modversion wayland-server 2>/dev/null); then - echo "Installed wayland version: $WAYLAND_VERSION" - - # Check if version meets requirement (>= 1.23.1) - if dpkg --compare-versions "$WAYLAND_VERSION" ge "1.23.1"; then - echo "✅ wayland $WAYLAND_VERSION from apt meets requirements" - exit 0 - else - echo "⚠️ wayland $WAYLAND_VERSION from apt is too old, building from source..." - fi - else - echo "⚠️ pkg-config cannot find wayland-server, building from source..." - fi - else - echo "⚠️ wayland not available in apt, building from source..." - fi - - # Build from source if apt package is unavailable or too old + # Build wayland 1.23.1 from source git clone https://gitlab.freedesktop.org/wayland/wayland.git cd wayland git checkout 1.23.1 + # Download meson subprojects if needed + meson subprojects download || true meson setup build/ --prefix=/usr -Ddocumentation=false sudo ninja -C build/ install sudo ldconfig cd .. - echo "✅ Built wayland 1.23.1 from source" - - name: Install wlroots (try apt first, build from source if needed) + - name: Install wlroots 0.19 run: | - # Try to install wlroots from apt - if sudo apt-get install -y libwlroots-dev 2>/dev/null; then - # Check if pkg-config can find wlroots - if WLROOTS_VERSION=$(pkg-config --modversion wlroots 2>/dev/null); then - echo "Installed wlroots version: $WLROOTS_VERSION" - - # Check if version meets requirement (>= 0.19.0) - if dpkg --compare-versions "$WLROOTS_VERSION" ge "0.19.0"; then - echo "✅ wlroots $WLROOTS_VERSION from apt meets requirements" - exit 0 - else - echo "⚠️ wlroots $WLROOTS_VERSION from apt is too old, building from source..." - fi - else - echo "⚠️ pkg-config cannot find wlroots, building from source..." - fi - else - echo "⚠️ wlroots not available in apt, building from source..." - fi - - # Build from source if apt package is unavailable or too old + # Install wlroots 0.19 from source git clone https://gitlab.freedesktop.org/wlroots/wlroots.git cd wlroots git checkout 0.19.0 + # Download meson subprojects if needed + meson subprojects download || true meson setup build/ --prefix=/usr sudo ninja -C build/ install sudo ldconfig cd .. - echo "✅ Built wlroots 0.19.0 from source" - - name: Install scenefx (build from source - not in apt) + - name: Install scenefx 0.4.1 run: | - # scenefx is not available in Ubuntu apt repositories - # Build from source + # Install scenefx from source git clone -b 0.4.1 https://github.com/wlrfx/scenefx.git cd scenefx + # Download meson subprojects if needed + meson subprojects download || true meson setup build/ --prefix=/usr sudo ninja -C build/ install sudo ldconfig cd .. - echo "✅ Built scenefx 0.4.1 from source" - name: Configure meson run: | + # Download meson subprojects if needed + meson subprojects download || true meson setup build/ --prefix=/usr - name: Build project