mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-02 06:46:29 -04:00
Improve version checking logic and documentation
Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
This commit is contained in:
parent
f2b3b1bd73
commit
304832e4da
2 changed files with 25 additions and 17 deletions
2
.github/workflows/README.md
vendored
2
.github/workflows/README.md
vendored
|
|
@ -30,7 +30,7 @@ This directory contains the GitHub Actions workflows for the MangoWC project.
|
||||||
**Install Strategy**:
|
**Install Strategy**:
|
||||||
- Prefers apt packages when available and version requirements are met
|
- Prefers apt packages when available and version requirements are met
|
||||||
- Falls back to building from source only when necessary
|
- 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)
|
- wlroots: requires >= 0.19.0 (checks apt version, builds from source if too old)
|
||||||
- scenefx: not in apt repositories (always builds from source)
|
- scenefx: not in apt repositories (always builds from source)
|
||||||
|
|
||||||
|
|
|
||||||
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
|
@ -65,7 +65,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# Try to install wayland from apt
|
# Try to install wayland from apt
|
||||||
if sudo apt-get install -y libwayland-dev 2>/dev/null; then
|
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")
|
# 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"
|
echo "Installed wayland version: $WAYLAND_VERSION"
|
||||||
|
|
||||||
# Check if version meets requirement (>= 1.23.1)
|
# Check if version meets requirement (>= 1.23.1)
|
||||||
|
|
@ -75,6 +76,9 @@ jobs:
|
||||||
else
|
else
|
||||||
echo "⚠️ wayland $WAYLAND_VERSION from apt is too old, building from source..."
|
echo "⚠️ wayland $WAYLAND_VERSION from apt is too old, building from source..."
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "⚠️ pkg-config cannot find wayland-server, building from source..."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "⚠️ wayland not available in apt, building from source..."
|
echo "⚠️ wayland not available in apt, building from source..."
|
||||||
fi
|
fi
|
||||||
|
|
@ -93,7 +97,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# Try to install wlroots from apt
|
# Try to install wlroots from apt
|
||||||
if sudo apt-get install -y libwlroots-dev 2>/dev/null; then
|
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")
|
# Check if pkg-config can find wlroots
|
||||||
|
if WLROOTS_VERSION=$(pkg-config --modversion wlroots 2>/dev/null); then
|
||||||
echo "Installed wlroots version: $WLROOTS_VERSION"
|
echo "Installed wlroots version: $WLROOTS_VERSION"
|
||||||
|
|
||||||
# Check if version meets requirement (>= 0.19.0)
|
# Check if version meets requirement (>= 0.19.0)
|
||||||
|
|
@ -103,6 +108,9 @@ jobs:
|
||||||
else
|
else
|
||||||
echo "⚠️ wlroots $WLROOTS_VERSION from apt is too old, building from source..."
|
echo "⚠️ wlroots $WLROOTS_VERSION from apt is too old, building from source..."
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "⚠️ pkg-config cannot find wlroots, building from source..."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "⚠️ wlroots not available in apt, building from source..."
|
echo "⚠️ wlroots not available in apt, building from source..."
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue