From 173a24d931b65c31a76459e81c635d765e8756bd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 09:57:44 +0000 Subject: [PATCH 01/29] Initial plan From 3f9c37967aadc6ee105ae3512073537a170b4261 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 09:59:43 +0000 Subject: [PATCH 02/29] Add build workflow for CI/CD Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/build.yml | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..ecaddf44 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,73 @@ +name: Build + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + meson \ + ninja-build \ + wayland-protocols \ + libwayland-dev \ + libinput-dev \ + libxkbcommon-dev \ + libpcre2-dev \ + libpixman-1-dev \ + libdrm-dev \ + libxcb1-dev \ + libxcb-icccm4-dev \ + xwayland \ + hwdata \ + libliftoff-dev \ + libdisplay-info-dev \ + libseat-dev \ + pkg-config + + - name: Install wlroots 0.19 + run: | + # Install wlroots 0.19 from source since it may not be in apt + git clone https://gitlab.freedesktop.org/wlroots/wlroots.git + cd wlroots + git checkout 0.19.0 + meson setup build/ --prefix=/usr + sudo ninja -C build/ install + sudo ldconfig + cd .. + + - name: Install scenefx 0.4 + run: | + # Install scenefx from source + git clone -b 0.4.1 https://github.com/wlrfx/scenefx.git + cd scenefx + meson setup build/ --prefix=/usr + sudo ninja -C build/ install + sudo ldconfig + cd .. + + - name: Configure meson + run: | + meson setup build/ --prefix=/usr + + - name: Build project + run: | + ninja -C build/ + + - name: Build summary + run: | + echo "✅ Build completed successfully!" + echo "Built executables:" + ls -lh build/mango build/mmsg From ca33f1d7eccff7981ee1c1c916d49441a84352c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:00:20 +0000 Subject: [PATCH 03/29] Add workflows documentation Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/README.md diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 00000000..cc1189f6 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,63 @@ +# GitHub Actions Workflows + +This directory contains the GitHub Actions workflows for the MangoWC project. + +## Workflows + +### build.yml +**Purpose**: Builds the project to ensure code changes compile successfully. + +**Triggers**: +- Push to `main` or `master` branch +- Pull requests to `main` or `master` branch +- Manual dispatch (workflow_dispatch) + +**What it does**: +1. Installs system dependencies (wayland, libinput, etc.) +2. Builds wlroots 0.19 from source +3. Builds scenefx 0.4 from source +4. Configures the project with meson +5. Builds the project with ninja +6. Verifies the executables were created + +**Dependencies**: +- Ubuntu latest runner +- Meson build system +- Ninja build tool +- Wayland ecosystem libraries +- wlroots 0.19 +- scenefx 0.4 + +### lock.yml +**Purpose**: Automatically locks inactive issues and PRs to keep the repository clean. + +**Triggers**: +- Scheduled daily at 12:30 UTC +- Manual dispatch + +**What it does**: +- Locks issues, PRs, and discussions that have been closed for 30 days +- Adds a comment explaining why the thread was locked + +### stale.yml +**Purpose**: Automatically closes issues that have been manually marked as stale. + +**Triggers**: +- Scheduled daily at 12:30 UTC + +**What it does**: +- Closes issues marked with the "stale" label after 7 days of inactivity +- Adds "automatic-closing" label when closing +- Does not automatically mark issues as stale (only processes manually marked ones) + +## Development Notes + +The build workflow ensures that: +- All dependencies are properly installed +- The project compiles without errors +- Both main executables (`mango` and `mmsg`) are built successfully + +If the build workflow fails, check: +1. Dependencies are up to date in the workflow file +2. wlroots and scenefx versions match requirements in meson.build +3. Build configuration in meson.build hasn't changed From 831dc99146b25c81dac4f98bfdd795baedbbcd0b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:00:50 +0000 Subject: [PATCH 04/29] Fix version consistency in workflow documentation Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index cc1189f6..cbc84b0d 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -26,7 +26,7 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - Ninja build tool - Wayland ecosystem libraries - wlroots 0.19 -- scenefx 0.4 +- scenefx 0.4.1 ### 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 ecaddf44..4d0cd5e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: sudo ldconfig cd .. - - name: Install scenefx 0.4 + - name: Install scenefx 0.4.1 run: | # Install scenefx from source git clone -b 0.4.1 https://github.com/wlrfx/scenefx.git From c13f7a6165d337c4af75c0ec4ca634a0d4523910 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:01:22 +0000 Subject: [PATCH 05/29] Add explicit permissions to build workflow for security Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d0cd5e0..e2600232 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout code From f1b97a5453647e037ec0f3c26f1a696e8d98ca02 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:08:44 +0000 Subject: [PATCH 06/29] Add path filters to workflows and create docs linting workflow Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 33 +++++++++++++++++++++++++++++++-- .github/workflows/build.yml | 20 ++++++++++++++++++++ .github/workflows/docs.yml | 31 +++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/README.md b/.github/workflows/README.md index cbc84b0d..9dac46c5 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -8,10 +8,16 @@ This directory contains the GitHub Actions workflows for the MangoWC project. **Purpose**: Builds the project to ensure code changes compile successfully. **Triggers**: -- Push to `main` or `master` branch -- Pull requests to `main` or `master` branch +- Push to `main` or `master` branch (only when code files change) +- Pull requests to `main` or `master` branch (only when code files change) - Manual dispatch (workflow_dispatch) +**Path filters** (only runs when these change): +- Source files: `**.c`, `**.h`, `**.cpp`, `**.scm` +- Build files: `meson.build`, `meson_options.txt`, `flake.nix` +- Protocol definitions: `protocols/**` +- Workflow file itself: `.github/workflows/build.yml` + **What it does**: 1. Installs system dependencies (wayland, libinput, etc.) 2. Builds wlroots 0.19 from source @@ -28,6 +34,23 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - wlroots 0.19 - scenefx 0.4.1 +### docs.yml +**Purpose**: Validates markdown documentation for style and formatting consistency. + +**Triggers**: +- Push to `main` or `master` branch (only when markdown files change) +- Pull requests to `main` or `master` branch (only when markdown files change) +- Manual dispatch (workflow_dispatch) + +**Path filters** (only runs when these change): +- Markdown files: `**.md` +- Workflow file itself: `.github/workflows/docs.yml` + +**What it does**: +- Lints all markdown files using markdownlint-cli2 +- Checks for common markdown formatting issues +- Ensures documentation follows consistent style guidelines + ### lock.yml **Purpose**: Automatically locks inactive issues and PRs to keep the repository clean. @@ -53,10 +76,16 @@ This directory contains the GitHub Actions workflows for the MangoWC project. ## Development Notes The build workflow ensures that: +- Only runs when actual code or build configuration changes - All dependencies are properly installed - The project compiles without errors - Both main executables (`mango` and `mmsg`) are built successfully +The docs workflow ensures that: +- Only runs when markdown documentation changes +- Documentation follows consistent formatting +- Markdown files are well-formed and free of common issues + If the build workflow fails, check: 1. Dependencies are up to date in the workflow file 2. wlroots and scenefx versions match requirements in meson.build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2600232..d8c420c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,8 +3,28 @@ name: Build on: push: branches: [main, master] + paths: + - '**.c' + - '**.h' + - '**.cpp' + - '**.scm' + - 'meson.build' + - 'meson_options.txt' + - 'flake.nix' + - 'protocols/**' + - '.github/workflows/build.yml' pull_request: branches: [main, master] + paths: + - '**.c' + - '**.h' + - '**.cpp' + - '**.scm' + - 'meson.build' + - 'meson_options.txt' + - 'flake.nix' + - 'protocols/**' + - '.github/workflows/build.yml' workflow_dispatch: jobs: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..fbd8c914 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,31 @@ +name: Documentation + +on: + push: + branches: [main, master] + paths: + - '**.md' + - '.github/workflows/docs.yml' + pull_request: + branches: [main, master] + paths: + - '**.md' + - '.github/workflows/docs.yml' + workflow_dispatch: + +jobs: + markdown-lint: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Lint markdown files + uses: DavidAnson/markdownlint-cli2-action@v18 + with: + globs: | + **/*.md + !**/node_modules/** From b67179d9c6e799f86e7252b148ed1d2ad4a7faef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:12:02 +0000 Subject: [PATCH 07/29] Fix build workflow by building wayland 1.23.1 from source Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 15 ++++++++------- .github/workflows/build.yml | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 9dac46c5..d5b857a8 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -19,18 +19,19 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - Workflow file itself: `.github/workflows/build.yml` **What it does**: -1. Installs system dependencies (wayland, libinput, etc.) -2. Builds wlroots 0.19 from source -3. Builds scenefx 0.4 from source -4. Configures the project with meson -5. Builds the project with ninja -6. Verifies the executables were created +1. Installs system dependencies (libinput, libdrm, etc.) +2. Builds wayland 1.23.1 from source (Ubuntu has older 1.22) +3. Builds wlroots 0.19 from source +4. Builds scenefx 0.4.1 from source +5. Configures the project with meson +6. Builds the project with ninja +7. Verifies the executables were created **Dependencies**: - Ubuntu latest runner - Meson build system - Ninja build tool -- Wayland ecosystem libraries +- Wayland 1.23.1 (built from source) - wlroots 0.19 - scenefx 0.4.1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8c420c6..8b3d5507 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,6 @@ jobs: meson \ ninja-build \ wayland-protocols \ - libwayland-dev \ libinput-dev \ libxkbcommon-dev \ libpcre2-dev \ @@ -57,8 +56,22 @@ jobs: libliftoff-dev \ libdisplay-info-dev \ libseat-dev \ + libffi-dev \ + libexpat1-dev \ + libxml2-dev \ pkg-config + - name: Build and install wayland 1.23 + run: | + # Build wayland 1.23 from source since Ubuntu has older version + git clone https://gitlab.freedesktop.org/wayland/wayland.git + cd wayland + git checkout 1.23.1 + meson setup build/ --prefix=/usr -Ddocumentation=false + sudo ninja -C build/ install + sudo ldconfig + cd .. + - name: Install wlroots 0.19 run: | # Install wlroots 0.19 from source since it may not be in apt From 739add6a63e648e2ec9da9ee0fb64c08b9d1c179 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:12:50 +0000 Subject: [PATCH 08/29] Fix version reference in workflow comment Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b3d5507..31d1dd5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,9 +61,9 @@ jobs: libxml2-dev \ pkg-config - - name: Build and install wayland 1.23 + - name: Build and install wayland 1.23.1 run: | - # Build wayland 1.23 from source since Ubuntu has older version + # Build wayland 1.23.1 from source since Ubuntu has older version git clone https://gitlab.freedesktop.org/wayland/wayland.git cd wayland git checkout 1.23.1 From f2b3b1bd731ff4c78b207a54febc27575d5a2f2c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:35:52 +0000 Subject: [PATCH 09/29] Prefer apt packages over building from source when available Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 17 +++++++++---- .github/workflows/build.yml | 50 +++++++++++++++++++++++++++++++------ 2 files changed, 55 insertions(+), 12 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index d5b857a8..e3a9e7ae 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -20,19 +20,26 @@ This directory contains the GitHub Actions workflows for the MangoWC project. **What it does**: 1. Installs system dependencies (libinput, libdrm, etc.) -2. Builds wayland 1.23.1 from source (Ubuntu has older 1.22) -3. Builds wlroots 0.19 from source -4. Builds scenefx 0.4.1 from source +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 +**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 (Ubuntu apt has 1.22, builds from source) +- wlroots: requires >= 0.19.0 (checks apt version, builds from source if too old) +- scenefx: not in apt repositories (always builds from source) + **Dependencies**: - Ubuntu latest runner - Meson build system - Ninja build tool -- Wayland 1.23.1 (built from source) -- wlroots 0.19 +- Wayland >= 1.23.1 +- wlroots >= 0.19.0 - scenefx 0.4.1 ### docs.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31d1dd5f..26ca7ad5 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 dependencies + - name: Install system dependencies run: | sudo apt-get update sudo apt-get install -y \ @@ -61,9 +61,25 @@ jobs: libxml2-dev \ pkg-config - - name: Build and install wayland 1.23.1 + - name: Install wayland (try apt first, build from source if needed) run: | - # Build wayland 1.23.1 from source since Ubuntu has older version + # Try to install wayland from apt + if sudo apt-get install -y libwayland-dev 2>/dev/null; then + WAYLAND_VERSION=$(pkg-config --modversion wayland-server 2>/dev/null || echo "0.0.0") + 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 "⚠️ wayland not available in apt, building from source..." + fi + + # Build from source if apt package is unavailable or too old git clone https://gitlab.freedesktop.org/wayland/wayland.git cd wayland git checkout 1.23.1 @@ -71,10 +87,27 @@ jobs: sudo ninja -C build/ install sudo ldconfig cd .. + echo "✅ Built wayland 1.23.1 from source" - - name: Install wlroots 0.19 + - name: Install wlroots (try apt first, build from source if needed) run: | - # Install wlroots 0.19 from source since it may not be in apt + # Try to install wlroots from apt + if sudo apt-get install -y libwlroots-dev 2>/dev/null; then + WLROOTS_VERSION=$(pkg-config --modversion wlroots 2>/dev/null || echo "0.0.0") + 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 "⚠️ wlroots not available in apt, building from source..." + fi + + # Build from source if apt package is unavailable or too old git clone https://gitlab.freedesktop.org/wlroots/wlroots.git cd wlroots git checkout 0.19.0 @@ -82,16 +115,19 @@ jobs: sudo ninja -C build/ install sudo ldconfig cd .. + echo "✅ Built wlroots 0.19.0 from source" - - name: Install scenefx 0.4.1 + - name: Install scenefx (build from source - not in apt) run: | - # Install scenefx from source + # scenefx is not available in Ubuntu apt repositories + # Build from source git clone -b 0.4.1 https://github.com/wlrfx/scenefx.git cd scenefx 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: | From 304832e4da73390c85ce0ec5d0f82bbf1b0a1ffd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:36:52 +0000 Subject: [PATCH 10/29] Improve version checking logic and documentation Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 2 +- .github/workflows/build.yml | 40 ++++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index e3a9e7ae..d171bd87 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -30,7 +30,7 @@ This directory contains the GitHub Actions workflows for the MangoWC project. **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 (Ubuntu apt has 1.22, builds from source) +- 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) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26ca7ad5..0da79d44 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,15 +65,19 @@ jobs: run: | # Try to install wayland from apt if sudo apt-get install -y libwayland-dev 2>/dev/null; then - WAYLAND_VERSION=$(pkg-config --modversion wayland-server 2>/dev/null || echo "0.0.0") - 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 + # 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 "⚠️ wayland $WAYLAND_VERSION from apt is too old, building from source..." + echo "⚠️ pkg-config cannot find wayland-server, building from source..." fi else echo "⚠️ wayland not available in apt, building from source..." @@ -93,15 +97,19 @@ jobs: run: | # Try to install wlroots from apt if sudo apt-get install -y libwlroots-dev 2>/dev/null; then - WLROOTS_VERSION=$(pkg-config --modversion wlroots 2>/dev/null || echo "0.0.0") - 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 + # 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 "⚠️ wlroots $WLROOTS_VERSION from apt is too old, building from source..." + echo "⚠️ pkg-config cannot find wlroots, building from source..." fi else echo "⚠️ wlroots not available in apt, building from source..." From fe85cbbaae3dda55816540bb3693bb1dbfe4262f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:43:31 +0000 Subject: [PATCH 11/29] Restrict markdown linter to repository files only Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 3 ++- .github/workflows/docs.yml | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index d171bd87..37bac496 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -55,9 +55,10 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - Workflow file itself: `.github/workflows/docs.yml` **What it does**: -- Lints all markdown files using markdownlint-cli2 +- Lints markdown files in the repository 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/docs.yml b/.github/workflows/docs.yml index fbd8c914..45743f5d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,5 +27,9 @@ jobs: uses: DavidAnson/markdownlint-cli2-action@v18 with: globs: | - **/*.md + *.md + .github/**/*.md !**/node_modules/** + !**/wayland/** + !**/wlroots/** + !**/scenefx/** From d2ae6c60aec7b35d3f7e3ce45a78e0f385f76437 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:47:52 +0000 Subject: [PATCH 12/29] Revert to building from source and use meson subprojects download Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 32 +++++++++--------- .github/workflows/build.yml | 66 +++++++++---------------------------- 2 files changed, 30 insertions(+), 68 deletions(-) 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 From c1a909b55bde173c54258d1163d06989033ecec1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:48:52 +0000 Subject: [PATCH 13/29] Fix version consistency in documentation Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 4 ++-- .github/workflows/build.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index cd239af3..3c25282a 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -21,7 +21,7 @@ This directory contains the GitHub Actions workflows for the MangoWC project. **What it does**: 1. Installs system dependencies (libinput, libdrm, etc.) 2. Builds wayland 1.23.1 from source -3. Builds wlroots 0.19 from source +3. Builds wlroots 0.19.0 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 @@ -38,7 +38,7 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - Meson build system - Ninja build tool - Wayland 1.23.1 (built from source) -- wlroots 0.19 (built from source) +- wlroots 0.19.0 (built from source) - scenefx 0.4.1 (built from source) ### docs.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 584c43de..ea5cbe80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,7 @@ jobs: sudo ldconfig cd .. - - name: Install wlroots 0.19 + - name: Install wlroots 0.19.0 run: | # Install wlroots 0.19 from source git clone https://gitlab.freedesktop.org/wlroots/wlroots.git From 831831841fc5584707bafca23e7571f9727cf52f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:57:28 +0000 Subject: [PATCH 14/29] Add OpenGL ES dependencies for scenefx build Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea5cbe80..61dadece 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,6 +59,8 @@ jobs: libffi-dev \ libexpat1-dev \ libxml2-dev \ + libgles2-mesa-dev \ + libegl1-mesa-dev \ pkg-config - name: Build and install wayland 1.23.1 From 76ca96ebe491b1a01924c42022b0b6e0b8f3d57e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 12:35:53 +0000 Subject: [PATCH 15/29] Fix workflows README to match actual docs.yml behavior Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 3c25282a..fc0b85c5 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -54,9 +54,10 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - Workflow file itself: `.github/workflows/docs.yml` **What it does**: -- Lints all markdown files using markdownlint-cli2 +- Lints markdown files in the repository 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. From ba9dffc39e22ee7129c2858d5926945ddef6c2bc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 12:37:50 +0000 Subject: [PATCH 16/29] Add libgbm-dev for wlroots EGL support Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61dadece..6054d646 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,7 @@ jobs: libxml2-dev \ libgles2-mesa-dev \ libegl1-mesa-dev \ + libgbm-dev \ pkg-config - name: Build and install wayland 1.23.1 From b2652b20a6ff8ca0fbb61f0e3da32a1fb7010616 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 12:40:30 +0000 Subject: [PATCH 17/29] Fix markdown linting errors in workflows README Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/workflows/README.md | 19 +++++++++++++++++++ .markdownlintrc | 10 ++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .markdownlintrc diff --git a/.github/workflows/README.md b/.github/workflows/README.md index fc0b85c5..4fe0bfe0 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -5,20 +5,24 @@ This directory contains the GitHub Actions workflows for the MangoWC project. ## Workflows ### build.yml + **Purpose**: Builds the project to ensure code changes compile successfully. **Triggers**: + - Push to `main` or `master` branch (only when code files change) - Pull requests to `main` or `master` branch (only when code files change) - Manual dispatch (workflow_dispatch) **Path filters** (only runs when these change): + - Source files: `**.c`, `**.h`, `**.cpp`, `**.scm` - Build files: `meson.build`, `meson_options.txt`, `flake.nix` - Protocol definitions: `protocols/**` - Workflow file itself: `.github/workflows/build.yml` **What it does**: + 1. Installs system dependencies (libinput, libdrm, etc.) 2. Builds wayland 1.23.1 from source 3. Builds wlroots 0.19.0 from source @@ -29,11 +33,13 @@ This directory contains the GitHub Actions workflows for the MangoWC project. 8. Verifies the executables were created **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 @@ -42,41 +48,51 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - scenefx 0.4.1 (built from source) ### docs.yml + **Purpose**: Validates markdown documentation for style and formatting consistency. **Triggers**: + - Push to `main` or `master` branch (only when markdown files change) - Pull requests to `main` or `master` branch (only when markdown files change) - Manual dispatch (workflow_dispatch) **Path filters** (only runs when these change): + - Markdown files: `**.md` - Workflow file itself: `.github/workflows/docs.yml` **What it does**: + - Lints markdown files in the repository 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. **Triggers**: + - Scheduled daily at 12:30 UTC - Manual dispatch **What it does**: + - Locks issues, PRs, and discussions that have been closed for 30 days - Adds a comment explaining why the thread was locked ### stale.yml + **Purpose**: Automatically closes issues that have been manually marked as stale. **Triggers**: + - Scheduled daily at 12:30 UTC **What it does**: + - Closes issues marked with the "stale" label after 7 days of inactivity - Adds "automatic-closing" label when closing - Does not automatically mark issues as stale (only processes manually marked ones) @@ -84,17 +100,20 @@ This directory contains the GitHub Actions workflows for the MangoWC project. ## Development Notes The build workflow ensures that: + - Only runs when actual code or build configuration changes - All dependencies are properly installed - The project compiles without errors - Both main executables (`mango` and `mmsg`) are built successfully The docs workflow ensures that: + - Only runs when markdown documentation changes - Documentation follows consistent formatting - Markdown files are well-formed and free of common issues If the build workflow fails, check: + 1. Dependencies are up to date in the workflow file 2. wlroots and scenefx versions match requirements in meson.build 3. Build configuration in meson.build hasn't changed diff --git a/.markdownlintrc b/.markdownlintrc new file mode 100644 index 00000000..a3b5de96 --- /dev/null +++ b/.markdownlintrc @@ -0,0 +1,10 @@ +{ + "MD013": { + "line_length": 150, + "code_blocks": false, + "tables": false + }, + "MD033": { + "allowed_elements": ["div", "img"] + } +} From d80f0804b2d7666388bb32c22d396f6dfb639cda Mon Sep 17 00:00:00 2001 From: Ricardo Squassina Lee <8495707+squassina@users.noreply.github.com> Date: Wed, 18 Feb 2026 09:45:16 -0300 Subject: [PATCH 18/29] Improve formatting in README.md for workflows Format markdown for better readability. --- .github/workflows/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 4fe0bfe0..d92b802c 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -67,11 +67,13 @@ This directory contains the GitHub Actions workflows for the MangoWC project. - Lints markdown files in the repository 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 +- 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. +**Purpose**: Automatically locks inactive issues and PRs to keep the repository + clean. **Triggers**: From ea18f96807274e986fe617d3c2c40f313eaa61e1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 12:53:56 +0000 Subject: [PATCH 19/29] Fix README.md to comply with 80-column rule and remove inline HTML Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .markdownlintrc | 11 ----------- README.md | 40 ++++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 31 deletions(-) delete mode 100644 .markdownlintrc diff --git a/.markdownlintrc b/.markdownlintrc deleted file mode 100644 index a487a13d..00000000 --- a/.markdownlintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "default": true, - "MD013": { - "line_length": 150, - "code_blocks": false, - "tables": false - }, - "MD033": { - "allowed_elements": ["div", "img"] - } -} diff --git a/README.md b/README.md index eadd0a05..1577a552 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Mango Wayland Compositor -
-