feat: add Arch Linux to CI test matrix
Add comprehensive Arch Linux testing to installer-test job. Changes to .github/workflows/test.yml: - Add archlinux:latest to test matrix (5 OS versions tested now) - Set continue-on-error for Arch (rolling release can expose bleeding-edge issues) - Arch tests run in parallel with Debian/Ubuntu tests Changes to tests/test_installer.sh: - Refactored to be OS-agnostic (supports Debian/Ubuntu AND Arch Linux) - Added OS type detection (apt-get vs pacman) - Added check_package() helper function (uses dpkg or pacman based on OS) - Conditional Debian environment setup (DEBIAN_FRONTEND only for Debian/Ubuntu) - OS-specific package name verification: - Debian/Ubuntu: python3-gi, python3-dbus, python3-cairo, bluez - Arch Linux: python-gobject, python-dbus, python-cairo, bluez, bluez-utils - OS-specific build tool checks (dpkg -l vs pacman -Q) - Updated summary output to show correct packages per OS install.sh changes: - NONE - Arch Linux support already complete and correct! CI Matrix now tests: - Debian 12 (Bookworm - current stable) - Debian Trixie (testing - next release) [non-blocking] - Ubuntu 22.04 LTS (Jammy) - Ubuntu 24.04 LTS (Noble) - Arch Linux (rolling release) [non-blocking] [NEW] Benefits: - Validates install.sh Arch support works in practice - Tests with newer BlueZ/Python versions (rolling release) - Forward compatibility testing - Broader Linux distribution coverage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b9bb393fdc
commit
d08a613ac8
2 changed files with 80 additions and 29 deletions
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
|
|
@ -130,9 +130,10 @@ jobs:
|
|||
- "debian:trixie" # Debian Trixie (testing - next release)
|
||||
- "ubuntu:22.04" # Ubuntu Jammy LTS
|
||||
- "ubuntu:24.04" # Ubuntu Noble (latest LTS)
|
||||
- "archlinux:latest" # Arch Linux (rolling release)
|
||||
|
||||
# Allow Trixie to fail without blocking CI (testing can be unstable)
|
||||
continue-on-error: ${{ matrix.os-image == 'debian:trixie' }}
|
||||
# Allow Trixie and Arch to fail without blocking CI (testing/rolling can be unstable)
|
||||
continue-on-error: ${{ matrix.os-image == 'debian:trixie' || matrix.os-image == 'archlinux:latest' }}
|
||||
|
||||
container:
|
||||
image: ${{ matrix.os-image }}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,48 @@
|
|||
#!/bin/bash
|
||||
# Integration test for install.sh on fresh Debian/Ubuntu systems
|
||||
# Integration test for install.sh on fresh Linux systems
|
||||
# This script tests that install.sh works correctly on a completely fresh system
|
||||
# with no prerequisites installed
|
||||
# Supports: Debian, Ubuntu, Arch Linux
|
||||
|
||||
set -e
|
||||
|
||||
# Configure non-interactive mode for CI/container environments
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
export TZ=UTC
|
||||
# Detect OS type
|
||||
if command -v apt-get &> /dev/null; then
|
||||
OS_TYPE="debian"
|
||||
elif command -v pacman &> /dev/null; then
|
||||
OS_TYPE="arch"
|
||||
else
|
||||
echo "ERROR: Unsupported OS (no apt-get or pacman found)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Pre-configure timezone to prevent interactive prompts
|
||||
ln -fs /usr/share/zoneinfo/UTC /etc/localtime
|
||||
# Configure non-interactive mode for CI/container environments
|
||||
if [ "$OS_TYPE" = "debian" ]; then
|
||||
# Debian/Ubuntu-specific environment setup
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
export TZ=UTC
|
||||
# Pre-configure timezone to prevent interactive prompts
|
||||
ln -fs /usr/share/zoneinfo/UTC /etc/localtime
|
||||
fi
|
||||
|
||||
echo "=== Testing install.sh on fresh system ==="
|
||||
echo "OS: $(cat /etc/os-release | grep PRETTY_NAME | cut -d= -f2 | tr -d '"')"
|
||||
echo "OS Type: $OS_TYPE"
|
||||
echo ""
|
||||
echo "NOTE: install.sh will handle all prerequisites (Python, pip, Reticulum, etc.)"
|
||||
echo ""
|
||||
|
||||
# Helper function: Check if a package is installed (OS-agnostic)
|
||||
check_package() {
|
||||
local pkg="$1"
|
||||
if [ "$OS_TYPE" = "debian" ]; then
|
||||
dpkg -l | grep -q "^ii $pkg " || { echo "FAIL: $pkg not installed"; exit 1; }
|
||||
elif [ "$OS_TYPE" = "arch" ]; then
|
||||
pacman -Q "$pkg" &> /dev/null || { echo "FAIL: $pkg not installed"; exit 1; }
|
||||
fi
|
||||
}
|
||||
|
||||
# Run installer - it now handles everything from basic packages to Reticulum
|
||||
echo "Running install.sh (self-contained installer)..."
|
||||
# Navigate to repository root (script is in tests/ directory)
|
||||
|
|
@ -39,17 +63,27 @@ echo ""
|
|||
|
||||
# Check system packages
|
||||
echo "Checking system packages..."
|
||||
dpkg -l | grep -q python3-gi || { echo "FAIL: python3-gi not installed"; exit 1; }
|
||||
echo " ✓ python3-gi installed"
|
||||
|
||||
dpkg -l | grep -q python3-dbus || { echo "FAIL: python3-dbus not installed"; exit 1; }
|
||||
echo " ✓ python3-dbus installed"
|
||||
|
||||
dpkg -l | grep -q python3-cairo || { echo "FAIL: python3-cairo not installed"; exit 1; }
|
||||
echo " ✓ python3-cairo installed"
|
||||
|
||||
dpkg -l | grep -q bluez || { echo "FAIL: bluez not installed"; exit 1; }
|
||||
echo " ✓ bluez installed"
|
||||
if [ "$OS_TYPE" = "debian" ]; then
|
||||
check_package python3-gi
|
||||
echo " ✓ python3-gi installed"
|
||||
check_package python3-dbus
|
||||
echo " ✓ python3-dbus installed"
|
||||
check_package python3-cairo
|
||||
echo " ✓ python3-cairo installed"
|
||||
check_package bluez
|
||||
echo " ✓ bluez installed"
|
||||
elif [ "$OS_TYPE" = "arch" ]; then
|
||||
check_package python-gobject
|
||||
echo " ✓ python-gobject installed"
|
||||
check_package python-dbus
|
||||
echo " ✓ python-dbus installed"
|
||||
check_package python-cairo
|
||||
echo " ✓ python-cairo installed"
|
||||
check_package bluez
|
||||
echo " ✓ bluez installed"
|
||||
check_package bluez-utils
|
||||
echo " ✓ bluez-utils installed"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
|
|
@ -78,14 +112,26 @@ echo ""
|
|||
|
||||
# Check that no build tools were required (verify we didn't compile anything)
|
||||
echo "Verifying no build dependencies were required..."
|
||||
if dpkg -l | grep -q meson; then
|
||||
echo " ⚠ WARNING: meson was installed (should not be needed)"
|
||||
fi
|
||||
if dpkg -l | grep -q cmake; then
|
||||
echo " ⚠ WARNING: cmake was installed (should not be needed)"
|
||||
fi
|
||||
if dpkg -l | grep -q libglib2.0-dev; then
|
||||
echo " ⚠ WARNING: libglib2.0-dev was installed (should not be needed)"
|
||||
if [ "$OS_TYPE" = "debian" ]; then
|
||||
if dpkg -l | grep -q meson; then
|
||||
echo " ⚠ WARNING: meson was installed (should not be needed)"
|
||||
fi
|
||||
if dpkg -l | grep -q cmake; then
|
||||
echo " ⚠ WARNING: cmake was installed (should not be needed)"
|
||||
fi
|
||||
if dpkg -l | grep -q libglib2.0-dev; then
|
||||
echo " ⚠ WARNING: libglib2.0-dev was installed (should not be needed)"
|
||||
fi
|
||||
elif [ "$OS_TYPE" = "arch" ]; then
|
||||
if pacman -Q meson &> /dev/null; then
|
||||
echo " ⚠ WARNING: meson was installed (should not be needed)"
|
||||
fi
|
||||
if pacman -Q cmake &> /dev/null; then
|
||||
echo " ⚠ WARNING: cmake was installed (should not be needed)"
|
||||
fi
|
||||
if pacman -Q glib2 &> /dev/null; then
|
||||
echo " ⚠ WARNING: glib2 dev headers were installed (should not be needed)"
|
||||
fi
|
||||
fi
|
||||
echo " ✓ No build tools required"
|
||||
|
||||
|
|
@ -118,7 +164,11 @@ echo ""
|
|||
echo "Installation summary:"
|
||||
echo " • install.sh is fully self-contained (handles all prerequisites)"
|
||||
echo " • Reticulum Network Stack: installed via pip"
|
||||
echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez"
|
||||
if [ "$OS_TYPE" = "debian" ]; then
|
||||
echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez"
|
||||
elif [ "$OS_TYPE" = "arch" ]; then
|
||||
echo " • System packages: python, python-pip, git, python-gobject, python-dbus, python-cairo, bluez, bluez-utils"
|
||||
fi
|
||||
echo " • Pip packages: rns, bleak, bluezero"
|
||||
echo " • Install method: System packages for compiled deps (no build tools needed)"
|
||||
echo " • Installation time: Fast (< 2 minutes)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue