From bf8b4732899cba38c5cbd77d426c86ea28188992 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 23:58:37 +0000 Subject: [PATCH 1/5] Add arm64 builds to all Linux release packages and PPA - Fix CMakeLists.txt to detect arm64 Linux and name embeddable archive ubuntu-arm64 - Fix CPackRPM.cmake to auto-detect aarch64 architecture for RPM packaging - Add build-lemonade-debian13-arm64 + smoke test job (Debian 13 .deb on ARM64) - Add build-lemonade-rpm-arm64 + test job (Fedora 43/44 .rpm on aarch64) - Add build-lemonade-embeddable-linux-arm64 job (portable archive for Linux ARM64) - Include all arm64 packages in the GitHub release job - Add ubuntu-arm64 entry to test-embeddable-posix matrix - Add package-arm64 job to launchpad-ppa.yml for PR binary verification on ARM64 - Update build-container.yml to build multi-arch (amd64+arm64) Docker images Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01EQ7ke6n2tMDgNfxg125ieZ --- .github/workflows/build-container.yml | 4 + .../cpp_server_build_test_release.yml | 331 +++++++++++++++++- .github/workflows/launchpad-ppa.yml | 50 +++ CMakeLists.txt | 6 +- src/cpp/CPackRPM.cmake | 6 +- 5 files changed, 392 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 5e04bef14..8aee9e6e6 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -26,6 +26,9 @@ jobs: - name: Checkout code uses: actions/checkout@v5 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -54,6 +57,7 @@ jobs: build-args: | BASE_IMAGE=ubuntu:${{ matrix.ubuntu_version }} UBUNTU_PPA=${{ matrix.ubuntu_ppa }} + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/cpp_server_build_test_release.yml b/.github/workflows/cpp_server_build_test_release.yml index 807461125..9e480d3fa 100644 --- a/.github/workflows/cpp_server_build_test_release.yml +++ b/.github/workflows/cpp_server_build_test_release.yml @@ -414,6 +414,134 @@ jobs: done kill $SERVER_PID 2>/dev/null || true + build-lemonade-debian13-arm64: + name: Build Lemonade .deb Package (Debian 13, ARM64) + runs-on: ubuntu-24.04-arm + outputs: + version: ${{ steps.get_version.outputs.version }} + container: + image: debian:trixie + steps: + - name: Enable Trixie backports + run: | + echo "deb http://deb.debian.org/debian trixie-backports main" > /etc/apt/sources.list.d/trixie-backports.list + - name: Install git + run: | + set -e + apt-get update + apt-get install -y git + - name: Install from backports + run: | + set -e + apt-get install -y -t trixie-backports libcpp-httplib-dev node-markdown-it-texmath + + - uses: actions/checkout@v5 + with: + clean: true + fetch-depth: 0 + + - name: Configure git safe directory + run: git config --global --add safe.directory $(pwd) + + - name: Prepare Debian build + id: get_version + uses: ./.github/actions/prepare-debian-build + with: + release: '13' + codename: 'trixie' + + - name: Build Debian package + id: build_deb + uses: ./.github/actions/build-debian-package + with: + package-type: binary + deb-version: ${{ steps.get_version.outputs.version }} + + - name: Rename server .deb for release + id: rename + shell: bash + run: | + set -e + VERSION="${{ steps.get_version.outputs.version }}" + OUTPUT_DIR="${{ steps.build_deb.outputs.output-dir }}" + SRC=$(ls "$OUTPUT_DIR"/lemonade-server_*_arm64.deb | head -n1) + if [ -z "$SRC" ]; then + echo "ERROR: server .deb not found in $OUTPUT_DIR" + ls -la "$OUTPUT_DIR" + exit 1 + fi + DEST="$OUTPUT_DIR/lemonade-server_${VERSION}-debian13_arm64.deb" + mv "$SRC" "$DEST" + echo "Renamed $SRC -> $DEST" + echo "deb-path=$DEST" >> $GITHUB_OUTPUT + + - name: Upload .deb package + uses: actions/upload-artifact@v7 + with: + name: lemonade-debian13-arm64 + path: ${{ steps.rename.outputs.deb-path }} + retention-days: 7 + + test-lemonade-debian13-arm64-smoke: + name: Smoke test .deb (Debian 13, ARM64) + runs-on: ubuntu-24.04-arm + needs: build-lemonade-debian13-arm64 + container: + image: debian:trixie + env: + LEMONADE_VERSION: ${{ needs.build-lemonade-debian13-arm64.outputs.version }} + steps: + - name: Download Lemonade .deb Package + uses: actions/download-artifact@v7 + with: + name: lemonade-debian13-arm64 + path: . + + - name: Install and smoke test + shell: bash + run: | + set -e + DEB_FILE=$(ls lemonade-server_*-debian13_arm64.deb 2>/dev/null | head -n1) + if [ -z "$DEB_FILE" ]; then + echo "ERROR: .deb file not found" + ls -la *.deb 2>/dev/null || echo "No .deb files found in current directory" + exit 1 + fi + echo "Debian 13 ARM64 version: $(cat /etc/os-release | grep PRETTY_NAME)" + echo "Testing artifact: $DEB_FILE" + + echo "deb http://deb.debian.org/debian trixie-backports main" > /etc/apt/sources.list.d/trixie-backports.list + apt-get update + apt-get install -y curl + apt-get install -y -t trixie-backports ./"$DEB_FILE" + + /usr/bin/lemond --version + /usr/bin/lemonade --version + echo "Package installed successfully" + + mkdir -p "$RUNNER_TEMP/xdg-runtime" + chmod 700 "$RUNNER_TEMP/xdg-runtime" + export XDG_RUNTIME_DIR="$RUNNER_TEMP/xdg-runtime" + /usr/bin/lemond "$(pwd)" > "$RUNNER_TEMP/lemonade-server.log" 2>&1 & + SERVER_PID=$! + echo "Server started (PID $SERVER_PID)" + + for i in $(seq 1 30); do + if curl -sf http://127.0.0.1:13305/live > /dev/null 2>&1; then + echo "Server is running and healthy on port 13305" + break + fi + if ! kill -0 $SERVER_PID 2>/dev/null; then + echo "ERROR: Server process exited prematurely" + echo "=== Server log ===" + cat "$RUNNER_TEMP/lemonade-server.log" 2>/dev/null || echo "(no log)" + exit 1 + fi + echo "Waiting for server... ($i/30)" + sleep 2 + done + kill $SERVER_PID 2>/dev/null || true + build-lemonade-rpm: name: Build Lemonade .rpm - Fedora ${{ matrix.fedora-version }} runs-on: ubuntu-latest @@ -481,6 +609,73 @@ jobs: path: build/lemonade-server-${{ env.LEMONADE_VERSION }}-fc${{ matrix.fedora-version }}.x86_64.rpm retention-days: 7 + build-lemonade-rpm-arm64: + name: Build Lemonade .rpm - Fedora ${{ matrix.fedora-version }} (ARM64) + runs-on: ubuntu-24.04-arm + container: + image: fedora:${{ matrix.fedora-version }} + + strategy: + fail-fast: false + matrix: + fedora-version: ["43", "44"] + + outputs: + version: ${{ steps.get_version.outputs.version }} + steps: + - uses: actions/checkout@v5 + with: + clean: true + fetch-depth: 0 + + - name: Install RPM packaging tools + shell: bash + run: | + set -e + dnf install -y rpm-build + + - name: Get version from CMakeLists.txt + id: get_version + uses: ./.github/actions/get-version + + - name: Build Linux .rpm package + shell: bash + run: | + set -e + + echo "Running setup.sh to configure build environment..." + bash setup.sh + + echo "Building lemond and lemonade for Fedora ${{ matrix.fedora-version }} ARM64..." + cmake --build --preset default + + cd build + + echo "Creating .rpm package with CPack..." + cpack -G RPM -V + + CPACK_RPM="lemonade-server-${LEMONADE_VERSION}.aarch64.rpm" + RPM_FILE="lemonade-server-${LEMONADE_VERSION}-fc${{ matrix.fedora-version }}.aarch64.rpm" + + if [ ! -f "$CPACK_RPM" ]; then + echo "ERROR: .rpm package not created!" + echo "Contents of build directory:" + ls -lR . + exit 1 + fi + + mv "$CPACK_RPM" "$RPM_FILE" + + echo "Package information:" + rpm -qip "$RPM_FILE" + + - name: Upload .rpm package + uses: actions/upload-artifact@v7 + with: + name: lemonade-rpm-arm64-fedora-${{ matrix.fedora-version }} + path: build/lemonade-server-${{ env.LEMONADE_VERSION }}-fc${{ matrix.fedora-version }}.aarch64.rpm + retention-days: 7 + build-lemonade-macos-dmg: name: Build Lemonade macOS .dmg (with Tauri App) runs-on: macos-latest @@ -856,6 +1051,48 @@ jobs: path: build/lemonade-embeddable-${{ env.LEMONADE_VERSION }}-ubuntu-x64.tar.gz retention-days: 7 + build-lemonade-embeddable-linux-arm64: + name: Build Embeddable Lemonade (Linux ARM64) + runs-on: ubuntu-24.04-arm + outputs: + version: ${{ steps.get_version.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + clean: true + fetch-depth: 0 + + - name: Get version from CMakeLists.txt + id: get_version + uses: ./.github/actions/get-version + + - name: Install minimal build dependencies + run: | + set -e + sudo apt-get update + sudo apt-get install -y cmake ninja-build g++ pkg-config libssl-dev libdrm-dev + + - name: Build embeddable archive + shell: bash + run: | + set -e + + cmake --preset default -DBUILD_WEB_APP=OFF + cmake --build --preset default --target embeddable + + ARCHIVE="build/lemonade-embeddable-${LEMONADE_VERSION}-ubuntu-arm64.tar.gz" + test -f "$ARCHIVE" + echo "Archive contents:" + tar tzf "$ARCHIVE" + ls -lh "$ARCHIVE" + + - name: Upload embeddable archive + uses: actions/upload-artifact@v4 + with: + name: lemonade-embeddable-linux-arm64 + path: build/lemonade-embeddable-${{ env.LEMONADE_VERSION }}-ubuntu-arm64.tar.gz + retention-days: 7 + build-lemonade-linux-arm64: name: Build Lemonade (Linux ARM64) runs-on: ubuntu-24.04-arm @@ -1519,11 +1756,65 @@ jobs: | grep -E '^/usr/lib/systemd/user/lemond\.service ' \ | grep -F "/opt/lib/systemd/user/lemond.service" + test-rpm-arm64-package: + name: Test .rpm (ARM64) - Fedora ${{ matrix.fedora-version }} + runs-on: ubuntu-24.04-arm + needs: build-lemonade-rpm-arm64 + container: + image: fedora:${{ matrix.fedora-version }} + + strategy: + fail-fast: false + matrix: + fedora-version: ["43", "44"] + + env: + LEMONADE_VERSION: ${{ needs.build-lemonade-rpm-arm64.outputs.version }} + steps: + - name: Download Lemonade .rpm Package + uses: actions/download-artifact@v7 + with: + name: lemonade-rpm-arm64-fedora-${{ matrix.fedora-version }} + path: . + + - name: Install and verify Lemonade (.rpm) + shell: bash + run: | + set -e + + RPM_FILE="lemonade-server-${LEMONADE_VERSION}-fc${{ matrix.fedora-version }}.aarch64.rpm" + + if [ ! -f "$RPM_FILE" ]; then + echo "ERROR: .rpm file not found: $RPM_FILE" + ls -la *.rpm 2>/dev/null || echo "No .rpm files found in current directory" + exit 1 + fi + + dnf install -y shadow-utils "$RPM_FILE" + + echo "Installed package information:" + rpm -qi lemonade-server + + echo "Installed file list:" + rpm -ql lemonade-server | sort + + test -f /opt/bin/lemonade + test -f /opt/bin/lemond + + /opt/bin/lemonade --version + /opt/bin/lemond --version + + rpm -qpl "$RPM_FILE" | grep -Fx "/usr/lib/systemd/user/lemond.service" + rpm -qpl --dump "$RPM_FILE" \ + | grep -E '^/usr/lib/systemd/user/lemond\.service ' \ + | grep -F "/opt/lib/systemd/user/lemond.service" + test-embeddable-posix: name: Test Embeddable (${{ matrix.label }}) runs-on: ${{ matrix.os }} needs: - build-lemonade-embeddable-linux + - build-lemonade-embeddable-linux-arm64 - build-lemonade-embeddable-macos strategy: fail-fast: false @@ -1533,6 +1824,10 @@ jobs: os: ubuntu-latest platform: ubuntu-x64 artifact: lemonade-embeddable-linux + - label: Linux ARM64 + os: ubuntu-24.04-arm + platform: ubuntu-arm64 + artifact: lemonade-embeddable-linux-arm64 - label: macOS os: macos-latest platform: macos-arm64 @@ -2470,14 +2765,19 @@ jobs: needs: - sign-msi-installers - build-lemonade-rpm + - build-lemonade-rpm-arm64 - build-lemonade-debian13 - test-lemonade-debian13-smoke + - build-lemonade-debian13-arm64 + - test-lemonade-debian13-arm64-smoke - build-lemonade-macos-dmg - build-lemonade-embeddable-linux + - build-lemonade-embeddable-linux-arm64 - build-lemonade-embeddable-windows - build-lemonade-embeddable-macos - test-cli-endpoints - test-rpm-package + - test-rpm-arm64-package - test-embeddable-posix - test-embeddable-windows if: startsWith(github.ref, 'refs/tags/v') @@ -2495,31 +2795,50 @@ jobs: name: Lemonade_Server_MSI_Signed path: . - - name: Download Lemonade .rpm Packages + - name: Download Lemonade .rpm Packages (x86_64) uses: actions/download-artifact@v7 with: pattern: lemonade-rpm-fedora-* path: . merge-multiple: true - - name: Download Lemonade .deb (Debian 13) + - name: Download Lemonade .rpm Packages (ARM64) + uses: actions/download-artifact@v7 + with: + pattern: lemonade-rpm-arm64-fedora-* + path: . + merge-multiple: true + + - name: Download Lemonade .deb (Debian 13, amd64) uses: actions/download-artifact@v7 with: name: lemonade-debian13 path: . + - name: Download Lemonade .deb (Debian 13, ARM64) + uses: actions/download-artifact@v7 + with: + name: lemonade-debian13-arm64 + path: . + - name: Download Lemonade macOS .pkg Package uses: actions/download-artifact@v7 with: name: lemonade-macos-pkg path: . - - name: Download Lemonade Embeddable (Linux) + - name: Download Lemonade Embeddable (Linux, x86_64) uses: actions/download-artifact@v4 with: name: lemonade-embeddable-linux path: . + - name: Download Lemonade Embeddable (Linux, ARM64) + uses: actions/download-artifact@v4 + with: + name: lemonade-embeddable-linux-arm64 + path: . + - name: Download Lemonade Embeddable (Windows) uses: actions/download-artifact@v4 with: @@ -2538,9 +2857,12 @@ jobs: ls -lh lemonade-server-minimal.msi ls -lh lemonade.msi ls -lh lemonade-server-*.x86_64.rpm + ls -lh lemonade-server-*.aarch64.rpm ls -lh lemonade-server_${LEMONADE_VERSION}-debian13_amd64.deb + ls -lh lemonade-server_${LEMONADE_VERSION}-debian13_arm64.deb ls -lh *.pkg ls -lh lemonade-embeddable-${LEMONADE_VERSION}-ubuntu-x64.tar.gz + ls -lh lemonade-embeddable-${LEMONADE_VERSION}-ubuntu-arm64.tar.gz ls -lh lemonade-embeddable-${LEMONADE_VERSION}-windows-x64.zip ls -lh lemonade-embeddable-${LEMONADE_VERSION}-macos-arm64.tar.gz @@ -2561,9 +2883,12 @@ jobs: lemonade-server-minimal.msi lemonade.msi lemonade-server-*.x86_64.rpm + lemonade-server-*.aarch64.rpm lemonade-server_${{ env.LEMONADE_VERSION }}-debian13_amd64.deb + lemonade-server_${{ env.LEMONADE_VERSION }}-debian13_arm64.deb *.pkg lemonade-embeddable-${{ env.LEMONADE_VERSION }}-ubuntu-x64.tar.gz + lemonade-embeddable-${{ env.LEMONADE_VERSION }}-ubuntu-arm64.tar.gz lemonade-embeddable-${{ env.LEMONADE_VERSION }}-windows-x64.zip lemonade-embeddable-${{ env.LEMONADE_VERSION }}-macos-arm64.tar.gz fail_on_unmatched_files: true diff --git a/.github/workflows/launchpad-ppa.yml b/.github/workflows/launchpad-ppa.yml index 762b0e899..49cd84114 100644 --- a/.github/workflows/launchpad-ppa.yml +++ b/.github/workflows/launchpad-ppa.yml @@ -121,6 +121,56 @@ jobs: path: ${{ steps.build_source.outputs.output-dir }}/* retention-days: 30 + package-arm64: + name: Build (ARM64) + needs: prepare-matrix + runs-on: ubuntu-24.04-arm + permissions: + contents: read + if: github.event_name == 'pull_request' + strategy: + matrix: ${{ fromJSON(needs.prepare-matrix.outputs.package_matrix) }} + container: + image: ghcr.io/lemonade-sdk/lemonade/build-environment:${{ matrix.distro }}${{ matrix.release }} + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + submodules: recursive + fetch-depth: 0 + fetch-tags: true + + - name: Configure git safe directory + run: git config --global --add safe.directory $(pwd) + + - name: Prepare Debian build + id: get_version + uses: ./.github/actions/prepare-debian-build + with: + release: ${{ matrix.release }} + codename: ${{ matrix.codename }} + + - name: Catch missing build-deps + run: | + apt-get update && apt-get build-dep . -y + + - name: Build binary package + id: build_binary + uses: ./.github/actions/build-debian-package + with: + package-type: binary + deb-version: ${{ steps.get_version.outputs.version }} + + - name: Upload Debian package + uses: actions/upload-artifact@v7 + with: + name: lemonade-${{ matrix.codename }}-arm64-deb + path: ${{ steps.build_binary.outputs.output-dir }}/*.deb + retention-days: 30 + upload-stable: name: Upload (Stable) strategy: diff --git a/CMakeLists.txt b/CMakeLists.txt index 70c3bf352..af10a8726 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1644,7 +1644,11 @@ elseif(APPLE) set(EMBEDDABLE_PLATFORM "macos-x64") endif() else() - set(EMBEDDABLE_PLATFORM "ubuntu-x64") + if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$") + set(EMBEDDABLE_PLATFORM "ubuntu-arm64") + else() + set(EMBEDDABLE_PLATFORM "ubuntu-x64") + endif() endif() set(EMBEDDABLE_DIR_NAME "lemonade-embeddable-${PROJECT_VERSION}-${EMBEDDABLE_PLATFORM}") diff --git a/src/cpp/CPackRPM.cmake b/src/cpp/CPackRPM.cmake index e76846623..00aa96bf4 100644 --- a/src/cpp/CPackRPM.cmake +++ b/src/cpp/CPackRPM.cmake @@ -12,7 +12,11 @@ set(CPACK_RPM_PACKAGE_URL "https://github.com/lemonade-sdk/lemonade") set(CPACK_RPM_PACKAGE_REQUIRES "libcurl, openssl, zlib") # Architecture and file name -set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$") + set(CPACK_RPM_PACKAGE_ARCHITECTURE "aarch64") +else() + set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") +endif() set(CPACK_PACKAGE_FILE_NAME "lemonade-server-${CPACK_PACKAGE_VERSION}.${CPACK_RPM_PACKAGE_ARCHITECTURE}") set(CPACK_PACKAGE_RELOCATABLE OFF) set(CPACK_RPM_PACKAGE_RELOCATABLE OFF) From 559b7b21ad96ec173eda8dc4858bcf533542bd2b Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 26 Jun 2026 00:11:13 +0000 Subject: [PATCH 2/5] Add (X86_64) suffix to existing Linux build job names for consistency Matches the (ARM64) suffix added to new arm64 build jobs. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01EQ7ke6n2tMDgNfxg125ieZ --- .../workflows/cpp_server_build_test_release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cpp_server_build_test_release.yml b/.github/workflows/cpp_server_build_test_release.yml index 9e480d3fa..87b1b5aeb 100644 --- a/.github/workflows/cpp_server_build_test_release.yml +++ b/.github/workflows/cpp_server_build_test_release.yml @@ -238,7 +238,7 @@ jobs: retention-days: 7 build-lemonade-deb: - name: Build Lemonade .deb Package + name: Build Lemonade .deb Package (X86_64) runs-on: ubuntu-latest outputs: version: ${{ steps.get_version.outputs.version }} @@ -287,7 +287,7 @@ jobs: retention-days: 7 build-lemonade-debian13: - name: Build Lemonade .deb Package (Debian 13) + name: Build Lemonade .deb Package (Debian 13, X86_64) runs-on: ubuntu-latest outputs: version: ${{ steps.get_version.outputs.version }} @@ -355,7 +355,7 @@ jobs: retention-days: 7 test-lemonade-debian13-smoke: - name: Smoke test .deb (Debian 13) + name: Smoke test .deb (Debian 13, X86_64) runs-on: ubuntu-latest needs: build-lemonade-debian13 container: @@ -543,7 +543,7 @@ jobs: kill $SERVER_PID 2>/dev/null || true build-lemonade-rpm: - name: Build Lemonade .rpm - Fedora ${{ matrix.fedora-version }} + name: Build Lemonade .rpm - Fedora ${{ matrix.fedora-version }} (X86_64) runs-on: ubuntu-latest container: image: fedora:${{ matrix.fedora-version }} @@ -1007,7 +1007,7 @@ jobs: fi build-lemonade-embeddable-linux: - name: Build Embeddable Lemonade (Linux) + name: Build Embeddable Lemonade (Linux X86_64) runs-on: ubuntu-latest outputs: version: ${{ steps.get_version.outputs.version }} @@ -1704,7 +1704,7 @@ jobs: uses: ./.github/actions/cleanup-processes-linux test-rpm-package: - name: Test .rpm - Fedora ${{ matrix.fedora-version }} + name: Test .rpm - Fedora ${{ matrix.fedora-version }} (X86_64) runs-on: ubuntu-latest needs: build-lemonade-rpm container: @@ -1757,7 +1757,7 @@ jobs: | grep -F "/opt/lib/systemd/user/lemond.service" test-rpm-arm64-package: - name: Test .rpm (ARM64) - Fedora ${{ matrix.fedora-version }} + name: Test .rpm - Fedora ${{ matrix.fedora-version }} (ARM64) runs-on: ubuntu-24.04-arm needs: build-lemonade-rpm-arm64 container: From a19c52e171f4eba86d96930e8f0dc5be2f1bec1e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 26 Jun 2026 01:53:03 +0000 Subject: [PATCH 3/5] Normalize Linux artifact names to consistent arch suffix pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All paired Linux artifacts now use -x86_64 / -arm64 suffixes: - lemonade-debian13 → lemonade-debian13-x86_64 - lemonade-rpm-fedora-$N → lemonade-rpm-fedora-$N-x86_64 - lemonade-rpm-arm64-fedora-$N → lemonade-rpm-fedora-$N-arm64 - lemonade-embeddable-linux → lemonade-embeddable-linux-x86_64 Download patterns in the release job updated accordingly. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01EQ7ke6n2tMDgNfxg125ieZ --- .../cpp_server_build_test_release.yml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cpp_server_build_test_release.yml b/.github/workflows/cpp_server_build_test_release.yml index 87b1b5aeb..5a4f83ac5 100644 --- a/.github/workflows/cpp_server_build_test_release.yml +++ b/.github/workflows/cpp_server_build_test_release.yml @@ -350,7 +350,7 @@ jobs: - name: Upload .deb package uses: actions/upload-artifact@v7 with: - name: lemonade-debian13 + name: lemonade-debian13-x86_64 path: ${{ steps.rename.outputs.deb-path }} retention-days: 7 @@ -366,7 +366,7 @@ jobs: - name: Download Lemonade .deb Package uses: actions/download-artifact@v7 with: - name: lemonade-debian13 + name: lemonade-debian13-x86_64 path: . - name: Install and smoke test @@ -605,7 +605,7 @@ jobs: - name: Upload .rpm package uses: actions/upload-artifact@v7 with: - name: lemonade-rpm-fedora-${{ matrix.fedora-version }} + name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-x86_64 path: build/lemonade-server-${{ env.LEMONADE_VERSION }}-fc${{ matrix.fedora-version }}.x86_64.rpm retention-days: 7 @@ -672,7 +672,7 @@ jobs: - name: Upload .rpm package uses: actions/upload-artifact@v7 with: - name: lemonade-rpm-arm64-fedora-${{ matrix.fedora-version }} + name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-arm64 path: build/lemonade-server-${{ env.LEMONADE_VERSION }}-fc${{ matrix.fedora-version }}.aarch64.rpm retention-days: 7 @@ -1047,7 +1047,7 @@ jobs: - name: Upload embeddable archive uses: actions/upload-artifact@v4 with: - name: lemonade-embeddable-linux + name: lemonade-embeddable-linux-x86_64 path: build/lemonade-embeddable-${{ env.LEMONADE_VERSION }}-ubuntu-x64.tar.gz retention-days: 7 @@ -1721,7 +1721,7 @@ jobs: - name: Download Lemonade .rpm Package uses: actions/download-artifact@v7 with: - name: lemonade-rpm-fedora-${{ matrix.fedora-version }} + name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-x86_64 path: . - name: Install and verify Lemonade (.rpm) @@ -1774,7 +1774,7 @@ jobs: - name: Download Lemonade .rpm Package uses: actions/download-artifact@v7 with: - name: lemonade-rpm-arm64-fedora-${{ matrix.fedora-version }} + name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-arm64 path: . - name: Install and verify Lemonade (.rpm) @@ -1823,7 +1823,7 @@ jobs: - label: Linux os: ubuntu-latest platform: ubuntu-x64 - artifact: lemonade-embeddable-linux + artifact: lemonade-embeddable-linux-x86_64 - label: Linux ARM64 os: ubuntu-24.04-arm platform: ubuntu-arm64 @@ -2798,21 +2798,21 @@ jobs: - name: Download Lemonade .rpm Packages (x86_64) uses: actions/download-artifact@v7 with: - pattern: lemonade-rpm-fedora-* + pattern: lemonade-rpm-fedora-*-x86_64 path: . merge-multiple: true - name: Download Lemonade .rpm Packages (ARM64) uses: actions/download-artifact@v7 with: - pattern: lemonade-rpm-arm64-fedora-* + pattern: lemonade-rpm-fedora-*-arm64 path: . merge-multiple: true - - name: Download Lemonade .deb (Debian 13, amd64) + - name: Download Lemonade .deb (Debian 13, X86_64) uses: actions/download-artifact@v7 with: - name: lemonade-debian13 + name: lemonade-debian13-x86_64 path: . - name: Download Lemonade .deb (Debian 13, ARM64) @@ -2827,10 +2827,10 @@ jobs: name: lemonade-macos-pkg path: . - - name: Download Lemonade Embeddable (Linux, x86_64) + - name: Download Lemonade Embeddable (Linux, X86_64) uses: actions/download-artifact@v4 with: - name: lemonade-embeddable-linux + name: lemonade-embeddable-linux-x86_64 path: . - name: Download Lemonade Embeddable (Linux, ARM64) From 8960f51a593655d844ea9fac025a977a2c453848 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Fri, 26 Jun 2026 11:43:50 -0400 Subject: [PATCH 4/5] Fix package-arm64: use official ubuntu images, add inline dep install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The custom build-environment images don't yet have linux/arm64 manifests. build-container.yml was updated in this PR to build multi-arch images, but it only runs on schedule/dispatch, so GHCR images still lack ARM64 support — causing container initialization to fail. Fix by switching to the official ubuntu:${{ matrix.release }} images from Docker Hub, which are natively multi-arch (arm64 supported for 24.04, 25.10, and 26.04). Add an inline dep-install step since the stock Ubuntu images lack the pre-installed build tools that the custom build-environment provides. The full matrix (noble, questing, resolute) is preserved. Once build-container.yml runs post-merge to publish multi-arch images, the container reference can be reverted to the custom build-environment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/launchpad-ppa.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/launchpad-ppa.yml b/.github/workflows/launchpad-ppa.yml index 49cd84114..b6697d169 100644 --- a/.github/workflows/launchpad-ppa.yml +++ b/.github/workflows/launchpad-ppa.yml @@ -123,6 +123,10 @@ jobs: package-arm64: name: Build (ARM64) + # Uses official ubuntu:${{ matrix.release }} images from Docker Hub instead of + # the custom build-environment images, because the latter do not yet carry + # linux/arm64 manifests (they gain multi-arch support once build-container.yml + # runs after this PR merges). Official Ubuntu images are natively multi-arch. needs: prepare-matrix runs-on: ubuntu-24.04-arm permissions: @@ -131,10 +135,7 @@ jobs: strategy: matrix: ${{ fromJSON(needs.prepare-matrix.outputs.package_matrix) }} container: - image: ghcr.io/lemonade-sdk/lemonade/build-environment:${{ matrix.distro }}${{ matrix.release }} - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + image: ubuntu:${{ matrix.release }} steps: - name: Checkout code uses: actions/checkout@v5 @@ -146,6 +147,21 @@ jobs: - name: Configure git safe directory run: git config --global --add safe.directory $(pwd) + - name: Install build dependencies + run: | + apt-get update + apt-get install -y \ + build-essential \ + curl \ + debhelper \ + devscripts \ + dpkg-dev \ + git \ + python3-pip \ + python3-venv \ + unzip + apt-get build-dep . -y + - name: Prepare Debian build id: get_version uses: ./.github/actions/prepare-debian-build @@ -153,10 +169,6 @@ jobs: release: ${{ matrix.release }} codename: ${{ matrix.codename }} - - name: Catch missing build-deps - run: | - apt-get update && apt-get build-dep . -y - - name: Build binary package id: build_binary uses: ./.github/actions/build-debian-package From 269a27b96e6594d0e804572370e0105b856cdefd Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Sat, 27 Jun 2026 15:09:12 -0400 Subject: [PATCH 5/5] ci: consolidate duplicated x86_64/arm64 jobs into arch matrix builds Replace 5 pairs of duplicated jobs that were identical except for `runs-on` with single jobs using a matrix strategy: - build-lemonade-debian13 (x86_64 + ARM64) - test-lemonade-debian13-smoke (x86_64 + ARM64) - build-lemonade-rpm (x86_64 + ARM64, cross-product with fedora-version) - test-rpm-package (x86_64 + ARM64, cross-product with fedora-version) - build-lemonade-embeddable-linux (x86_64 + ARM64) Also revert package-arm64 in launchpad-ppa.yml to use the custom build-environment container now that multi-arch images are available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../cpp_server_build_test_release.yml | 404 ++++-------------- .github/workflows/launchpad-ppa.yml | 24 +- 2 files changed, 88 insertions(+), 340 deletions(-) diff --git a/.github/workflows/cpp_server_build_test_release.yml b/.github/workflows/cpp_server_build_test_release.yml index 641c05e5f..fe0afc6bd 100644 --- a/.github/workflows/cpp_server_build_test_release.yml +++ b/.github/workflows/cpp_server_build_test_release.yml @@ -288,12 +288,24 @@ jobs: retention-days: 7 build-lemonade-debian13: - name: Build Lemonade .deb Package (Debian 13, X86_64) - runs-on: ubuntu-latest + name: Build Lemonade .deb Package (Debian 13, ${{ matrix.arch-name }}) + runs-on: ${{ matrix.runs-on }} outputs: version: ${{ steps.get_version.outputs.version }} container: image: debian:trixie + strategy: + fail-fast: false + matrix: + include: + - arch-name: X86_64 + runs-on: ubuntu-latest + deb-arch: amd64 + artifact-suffix: x86_64 + - arch-name: ARM64 + runs-on: ubuntu-24.04-arm + deb-arch: arm64 + artifact-suffix: arm64 steps: - name: Enable Trixie backports run: | @@ -337,13 +349,13 @@ jobs: set -e VERSION="${{ steps.get_version.outputs.version }}" OUTPUT_DIR="${{ steps.build_deb.outputs.output-dir }}" - SRC=$(ls "$OUTPUT_DIR"/lemonade-server_*_amd64.deb | head -n1) + SRC=$(ls "$OUTPUT_DIR"/lemonade-server_*_${{ matrix.deb-arch }}.deb | head -n1) if [ -z "$SRC" ]; then echo "ERROR: server .deb not found in $OUTPUT_DIR" ls -la "$OUTPUT_DIR" exit 1 fi - DEST="$OUTPUT_DIR/lemonade-server_${VERSION}-debian13_amd64.deb" + DEST="$OUTPUT_DIR/lemonade-server_${VERSION}-debian13_${{ matrix.deb-arch }}.deb" mv "$SRC" "$DEST" echo "Renamed $SRC -> $DEST" echo "deb-path=$DEST" >> $GITHUB_OUTPUT @@ -351,164 +363,48 @@ jobs: - name: Upload .deb package uses: actions/upload-artifact@v7 with: - name: lemonade-debian13-x86_64 + name: lemonade-debian13-${{ matrix.artifact-suffix }} path: ${{ steps.rename.outputs.deb-path }} retention-days: 7 test-lemonade-debian13-smoke: - name: Smoke test .deb (Debian 13, X86_64) - runs-on: ubuntu-latest + name: Smoke test .deb (Debian 13, ${{ matrix.arch-name }}) + runs-on: ${{ matrix.runs-on }} needs: build-lemonade-debian13 container: image: debian:trixie + strategy: + fail-fast: false + matrix: + include: + - arch-name: X86_64 + runs-on: ubuntu-latest + deb-arch: amd64 + artifact-suffix: x86_64 + - arch-name: ARM64 + runs-on: ubuntu-24.04-arm + deb-arch: arm64 + artifact-suffix: arm64 env: LEMONADE_VERSION: ${{ needs.build-lemonade-debian13.outputs.version }} steps: - name: Download Lemonade .deb Package uses: actions/download-artifact@v7 with: - name: lemonade-debian13-x86_64 - path: . - - - name: Install and smoke test - shell: bash - run: | - set -e - DEB_FILE=$(ls lemonade-server_*-debian13_amd64.deb 2>/dev/null | head -n1) - if [ -z "$DEB_FILE" ]; then - echo "ERROR: .deb file not found" - ls -la *.deb 2>/dev/null || echo "No .deb files found in current directory" - exit 1 - fi - echo "Debian 13 version: $(cat /etc/os-release | grep PRETTY_NAME)" - echo "Testing artifact: $DEB_FILE" - - echo "deb http://deb.debian.org/debian trixie-backports main" > /etc/apt/sources.list.d/trixie-backports.list - apt-get update - apt-get install -y curl - apt-get install -y -t trixie-backports ./"$DEB_FILE" - - /usr/bin/lemond --version - /usr/bin/lemonade --version - echo "Package installed successfully" - - mkdir -p "$RUNNER_TEMP/xdg-runtime" - chmod 700 "$RUNNER_TEMP/xdg-runtime" - export XDG_RUNTIME_DIR="$RUNNER_TEMP/xdg-runtime" - /usr/bin/lemond "$(pwd)" > "$RUNNER_TEMP/lemonade-server.log" 2>&1 & - SERVER_PID=$! - echo "Server started (PID $SERVER_PID)" - - for i in $(seq 1 30); do - if curl -sf http://127.0.0.1:13305/live > /dev/null 2>&1; then - echo "Server is running and healthy on port 13305" - break - fi - if ! kill -0 $SERVER_PID 2>/dev/null; then - echo "ERROR: Server process exited prematurely" - echo "=== Server log ===" - cat "$RUNNER_TEMP/lemonade-server.log" 2>/dev/null || echo "(no log)" - exit 1 - fi - echo "Waiting for server... ($i/30)" - sleep 2 - done - kill $SERVER_PID 2>/dev/null || true - - build-lemonade-debian13-arm64: - name: Build Lemonade .deb Package (Debian 13, ARM64) - runs-on: ubuntu-24.04-arm - outputs: - version: ${{ steps.get_version.outputs.version }} - container: - image: debian:trixie - steps: - - name: Enable Trixie backports - run: | - echo "deb http://deb.debian.org/debian trixie-backports main" > /etc/apt/sources.list.d/trixie-backports.list - - name: Install git - run: | - set -e - apt-get update - apt-get install -y git - - name: Install from backports - run: | - set -e - apt-get install -y -t trixie-backports libcpp-httplib-dev node-markdown-it-texmath - - - uses: actions/checkout@v5 - with: - clean: true - fetch-depth: 0 - - - name: Configure git safe directory - run: git config --global --add safe.directory $(pwd) - - - name: Prepare Debian build - id: get_version - uses: ./.github/actions/prepare-debian-build - with: - release: '13' - codename: 'trixie' - - - name: Build Debian package - id: build_deb - uses: ./.github/actions/build-debian-package - with: - package-type: binary - deb-version: ${{ steps.get_version.outputs.version }} - - - name: Rename server .deb for release - id: rename - shell: bash - run: | - set -e - VERSION="${{ steps.get_version.outputs.version }}" - OUTPUT_DIR="${{ steps.build_deb.outputs.output-dir }}" - SRC=$(ls "$OUTPUT_DIR"/lemonade-server_*_arm64.deb | head -n1) - if [ -z "$SRC" ]; then - echo "ERROR: server .deb not found in $OUTPUT_DIR" - ls -la "$OUTPUT_DIR" - exit 1 - fi - DEST="$OUTPUT_DIR/lemonade-server_${VERSION}-debian13_arm64.deb" - mv "$SRC" "$DEST" - echo "Renamed $SRC -> $DEST" - echo "deb-path=$DEST" >> $GITHUB_OUTPUT - - - name: Upload .deb package - uses: actions/upload-artifact@v7 - with: - name: lemonade-debian13-arm64 - path: ${{ steps.rename.outputs.deb-path }} - retention-days: 7 - - test-lemonade-debian13-arm64-smoke: - name: Smoke test .deb (Debian 13, ARM64) - runs-on: ubuntu-24.04-arm - needs: build-lemonade-debian13-arm64 - container: - image: debian:trixie - env: - LEMONADE_VERSION: ${{ needs.build-lemonade-debian13-arm64.outputs.version }} - steps: - - name: Download Lemonade .deb Package - uses: actions/download-artifact@v7 - with: - name: lemonade-debian13-arm64 + name: lemonade-debian13-${{ matrix.artifact-suffix }} path: . - name: Install and smoke test shell: bash run: | set -e - DEB_FILE=$(ls lemonade-server_*-debian13_arm64.deb 2>/dev/null | head -n1) + DEB_FILE=$(ls lemonade-server_*-debian13_${{ matrix.deb-arch }}.deb 2>/dev/null | head -n1) if [ -z "$DEB_FILE" ]; then echo "ERROR: .deb file not found" ls -la *.deb 2>/dev/null || echo "No .deb files found in current directory" exit 1 fi - echo "Debian 13 ARM64 version: $(cat /etc/os-release | grep PRETTY_NAME)" + echo "Debian 13 ${{ matrix.arch-name }} version: $(cat /etc/os-release | grep PRETTY_NAME)" echo "Testing artifact: $DEB_FILE" echo "deb http://deb.debian.org/debian trixie-backports main" > /etc/apt/sources.list.d/trixie-backports.list @@ -544,75 +440,8 @@ jobs: kill $SERVER_PID 2>/dev/null || true build-lemonade-rpm: - name: Build Lemonade .rpm - Fedora ${{ matrix.fedora-version }} (X86_64) - runs-on: ubuntu-latest - container: - image: fedora:${{ matrix.fedora-version }} - - strategy: - fail-fast: false - matrix: - fedora-version: ["43", "44"] - - outputs: - version: ${{ steps.get_version.outputs.version }} - steps: - - uses: actions/checkout@v5 - with: - clean: true - fetch-depth: 0 - - - name: Install RPM packaging tools - shell: bash - run: | - set -e - dnf install -y rpm-build - - - name: Get version from CMakeLists.txt - id: get_version - uses: ./.github/actions/get-version - - - name: Build Linux .rpm package - shell: bash - run: | - set -e - - echo "Running setup.sh to configure build environment..." - bash setup.sh - - echo "Building lemond and lemonade for Fedora ${{ matrix.fedora-version }}..." - cmake --build --preset default - - cd build - - echo "Creating .rpm package with CPack..." - cpack -G RPM -V - - CPACK_RPM="lemonade-server-${LEMONADE_VERSION}.x86_64.rpm" - RPM_FILE="lemonade-server-${LEMONADE_VERSION}-fc${{ matrix.fedora-version }}.x86_64.rpm" - - if [ ! -f "$CPACK_RPM" ]; then - echo "ERROR: .rpm package not created!" - echo "Contents of build directory:" - ls -lR . - exit 1 - fi - - mv "$CPACK_RPM" "$RPM_FILE" - - echo "Package information:" - rpm -qip "$RPM_FILE" - - - name: Upload .rpm package - uses: actions/upload-artifact@v7 - with: - name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-x86_64 - path: build/lemonade-server-${{ env.LEMONADE_VERSION }}-fc${{ matrix.fedora-version }}.x86_64.rpm - retention-days: 7 - - build-lemonade-rpm-arm64: - name: Build Lemonade .rpm - Fedora ${{ matrix.fedora-version }} (ARM64) - runs-on: ubuntu-24.04-arm + name: Build Lemonade .rpm - Fedora ${{ matrix.fedora-version }} (${{ matrix.arch-name }}) + runs-on: ${{ matrix.runs-on }} container: image: fedora:${{ matrix.fedora-version }} @@ -620,6 +449,16 @@ jobs: fail-fast: false matrix: fedora-version: ["43", "44"] + runs-on: ["ubuntu-latest", "ubuntu-24.04-arm"] + include: + - runs-on: ubuntu-latest + arch-name: X86_64 + rpm-arch: x86_64 + artifact-suffix: x86_64 + - runs-on: ubuntu-24.04-arm + arch-name: ARM64 + rpm-arch: aarch64 + artifact-suffix: arm64 outputs: version: ${{ steps.get_version.outputs.version }} @@ -647,7 +486,7 @@ jobs: echo "Running setup.sh to configure build environment..." bash setup.sh - echo "Building lemond and lemonade for Fedora ${{ matrix.fedora-version }} ARM64..." + echo "Building lemond and lemonade for Fedora ${{ matrix.fedora-version }} (${{ matrix.arch-name }})..." cmake --build --preset default cd build @@ -655,8 +494,8 @@ jobs: echo "Creating .rpm package with CPack..." cpack -G RPM -V - CPACK_RPM="lemonade-server-${LEMONADE_VERSION}.aarch64.rpm" - RPM_FILE="lemonade-server-${LEMONADE_VERSION}-fc${{ matrix.fedora-version }}.aarch64.rpm" + CPACK_RPM="lemonade-server-${LEMONADE_VERSION}.${{ matrix.rpm-arch }}.rpm" + RPM_FILE="lemonade-server-${LEMONADE_VERSION}-fc${{ matrix.fedora-version }}.${{ matrix.rpm-arch }}.rpm" if [ ! -f "$CPACK_RPM" ]; then echo "ERROR: .rpm package not created!" @@ -673,8 +512,8 @@ jobs: - name: Upload .rpm package uses: actions/upload-artifact@v7 with: - name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-arm64 - path: build/lemonade-server-${{ env.LEMONADE_VERSION }}-fc${{ matrix.fedora-version }}.aarch64.rpm + name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-${{ matrix.artifact-suffix }} + path: build/lemonade-server-${{ env.LEMONADE_VERSION }}-fc${{ matrix.fedora-version }}.${{ matrix.rpm-arch }}.rpm retention-days: 7 build-lemonade-macos-dmg: @@ -1009,10 +848,22 @@ jobs: fi build-lemonade-embeddable-linux: - name: Build Embeddable Lemonade (Linux X86_64) - runs-on: ubuntu-latest + name: Build Embeddable Lemonade (Linux ${{ matrix.arch-name }}) + runs-on: ${{ matrix.runs-on }} outputs: version: ${{ steps.get_version.outputs.version }} + strategy: + fail-fast: false + matrix: + include: + - arch-name: X86_64 + runs-on: ubuntu-latest + platform: ubuntu-x64 + artifact-suffix: x86_64 + - arch-name: ARM64 + runs-on: ubuntu-24.04-arm + platform: ubuntu-arm64 + artifact-suffix: arm64 steps: - uses: actions/checkout@v4 with: @@ -1040,7 +891,7 @@ jobs: cmake --preset default -DBUILD_WEB_APP=OFF cmake --build --preset default --target embeddable - ARCHIVE="build/lemonade-embeddable-${LEMONADE_VERSION}-ubuntu-x64.tar.gz" + ARCHIVE="build/lemonade-embeddable-${LEMONADE_VERSION}-${{ matrix.platform }}.tar.gz" test -f "$ARCHIVE" echo "Archive contents:" tar tzf "$ARCHIVE" @@ -1049,50 +900,8 @@ jobs: - name: Upload embeddable archive uses: actions/upload-artifact@v4 with: - name: lemonade-embeddable-linux-x86_64 - path: build/lemonade-embeddable-${{ env.LEMONADE_VERSION }}-ubuntu-x64.tar.gz - retention-days: 7 - - build-lemonade-embeddable-linux-arm64: - name: Build Embeddable Lemonade (Linux ARM64) - runs-on: ubuntu-24.04-arm - outputs: - version: ${{ steps.get_version.outputs.version }} - steps: - - uses: actions/checkout@v4 - with: - clean: true - fetch-depth: 0 - - - name: Get version from CMakeLists.txt - id: get_version - uses: ./.github/actions/get-version - - - name: Install minimal build dependencies - run: | - set -e - sudo apt-get update - sudo apt-get install -y cmake ninja-build g++ pkg-config libssl-dev libdrm-dev - - - name: Build embeddable archive - shell: bash - run: | - set -e - - cmake --preset default -DBUILD_WEB_APP=OFF - cmake --build --preset default --target embeddable - - ARCHIVE="build/lemonade-embeddable-${LEMONADE_VERSION}-ubuntu-arm64.tar.gz" - test -f "$ARCHIVE" - echo "Archive contents:" - tar tzf "$ARCHIVE" - ls -lh "$ARCHIVE" - - - name: Upload embeddable archive - uses: actions/upload-artifact@v4 - with: - name: lemonade-embeddable-linux-arm64 - path: build/lemonade-embeddable-${{ env.LEMONADE_VERSION }}-ubuntu-arm64.tar.gz + name: lemonade-embeddable-linux-${{ matrix.artifact-suffix }} + path: build/lemonade-embeddable-${{ env.LEMONADE_VERSION }}-${{ matrix.platform }}.tar.gz retention-days: 7 build-lemonade-linux-arm64: @@ -1706,8 +1515,8 @@ jobs: uses: ./.github/actions/cleanup-processes-linux test-rpm-package: - name: Test .rpm - Fedora ${{ matrix.fedora-version }} (X86_64) - runs-on: ubuntu-latest + name: Test .rpm - Fedora ${{ matrix.fedora-version }} (${{ matrix.arch-name }}) + runs-on: ${{ matrix.runs-on }} needs: build-lemonade-rpm container: image: fedora:${{ matrix.fedora-version }} @@ -1716,6 +1525,16 @@ jobs: fail-fast: false matrix: fedora-version: ["43", "44"] + runs-on: ["ubuntu-latest", "ubuntu-24.04-arm"] + include: + - runs-on: ubuntu-latest + arch-name: X86_64 + rpm-arch: x86_64 + artifact-suffix: x86_64 + - runs-on: ubuntu-24.04-arm + arch-name: ARM64 + rpm-arch: aarch64 + artifact-suffix: arm64 env: LEMONADE_VERSION: ${{ needs.build-lemonade-rpm.outputs.version }} @@ -1723,60 +1542,7 @@ jobs: - name: Download Lemonade .rpm Package uses: actions/download-artifact@v7 with: - name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-x86_64 - path: . - - - name: Install and verify Lemonade (.rpm) - shell: bash - run: | - set -e - - RPM_FILE="lemonade-server-${LEMONADE_VERSION}-fc${{ matrix.fedora-version }}.x86_64.rpm" - - if [ ! -f "$RPM_FILE" ]; then - echo "ERROR: .rpm file not found: $RPM_FILE" - ls -la *.rpm 2>/dev/null || echo "No .rpm files found in current directory" - exit 1 - fi - - dnf install -y shadow-utils "$RPM_FILE" - - echo "Installed package information:" - rpm -qi lemonade-server - - echo "Installed file list:" - rpm -ql lemonade-server | sort - - test -f /opt/bin/lemonade - test -f /opt/bin/lemond - - /opt/bin/lemonade --version - /opt/bin/lemond --version - - rpm -qpl "$RPM_FILE" | grep -Fx "/usr/lib/systemd/user/lemond.service" - rpm -qpl --dump "$RPM_FILE" \ - | grep -E '^/usr/lib/systemd/user/lemond\.service ' \ - | grep -F "/opt/lib/systemd/user/lemond.service" - - test-rpm-arm64-package: - name: Test .rpm - Fedora ${{ matrix.fedora-version }} (ARM64) - runs-on: ubuntu-24.04-arm - needs: build-lemonade-rpm-arm64 - container: - image: fedora:${{ matrix.fedora-version }} - - strategy: - fail-fast: false - matrix: - fedora-version: ["43", "44"] - - env: - LEMONADE_VERSION: ${{ needs.build-lemonade-rpm-arm64.outputs.version }} - steps: - - name: Download Lemonade .rpm Package - uses: actions/download-artifact@v7 - with: - name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-arm64 + name: lemonade-rpm-fedora-${{ matrix.fedora-version }}-${{ matrix.artifact-suffix }} path: . - name: Install and verify Lemonade (.rpm) @@ -1784,7 +1550,7 @@ jobs: run: | set -e - RPM_FILE="lemonade-server-${LEMONADE_VERSION}-fc${{ matrix.fedora-version }}.aarch64.rpm" + RPM_FILE="lemonade-server-${LEMONADE_VERSION}-fc${{ matrix.fedora-version }}.${{ matrix.rpm-arch }}.rpm" if [ ! -f "$RPM_FILE" ]; then echo "ERROR: .rpm file not found: $RPM_FILE" @@ -1816,7 +1582,6 @@ jobs: runs-on: ${{ matrix.os }} needs: - build-lemonade-embeddable-linux - - build-lemonade-embeddable-linux-arm64 - build-lemonade-embeddable-macos strategy: fail-fast: false @@ -2767,19 +2532,14 @@ jobs: needs: - sign-msi-installers - build-lemonade-rpm - - build-lemonade-rpm-arm64 - build-lemonade-debian13 - test-lemonade-debian13-smoke - - build-lemonade-debian13-arm64 - - test-lemonade-debian13-arm64-smoke - build-lemonade-macos-dmg - build-lemonade-embeddable-linux - - build-lemonade-embeddable-linux-arm64 - build-lemonade-embeddable-windows - build-lemonade-embeddable-macos - test-cli-endpoints - test-rpm-package - - test-rpm-arm64-package - test-embeddable-posix - test-embeddable-windows if: startsWith(github.ref, 'refs/tags/v') diff --git a/.github/workflows/launchpad-ppa.yml b/.github/workflows/launchpad-ppa.yml index b6697d169..e14a87251 100644 --- a/.github/workflows/launchpad-ppa.yml +++ b/.github/workflows/launchpad-ppa.yml @@ -123,10 +123,6 @@ jobs: package-arm64: name: Build (ARM64) - # Uses official ubuntu:${{ matrix.release }} images from Docker Hub instead of - # the custom build-environment images, because the latter do not yet carry - # linux/arm64 manifests (they gain multi-arch support once build-container.yml - # runs after this PR merges). Official Ubuntu images are natively multi-arch. needs: prepare-matrix runs-on: ubuntu-24.04-arm permissions: @@ -135,7 +131,10 @@ jobs: strategy: matrix: ${{ fromJSON(needs.prepare-matrix.outputs.package_matrix) }} container: - image: ubuntu:${{ matrix.release }} + image: ghcr.io/lemonade-sdk/lemonade/build-environment:${{ matrix.distro }}${{ matrix.release }} + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout code uses: actions/checkout@v5 @@ -147,20 +146,9 @@ jobs: - name: Configure git safe directory run: git config --global --add safe.directory $(pwd) - - name: Install build dependencies + - name: Catch missing build-deps run: | - apt-get update - apt-get install -y \ - build-essential \ - curl \ - debhelper \ - devscripts \ - dpkg-dev \ - git \ - python3-pip \ - python3-venv \ - unzip - apt-get build-dep . -y + apt-get update && apt-get build-dep . -y - name: Prepare Debian build id: get_version