From 9bb6c3ca32978ed2daa9ff311a77d313c6f80047 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 24 Apr 2026 10:05:33 +0200 Subject: [PATCH 1/3] rename nightly.yml into release.yml --- .github/workflows/{nightly.yml => release.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{nightly.yml => release.yml} (99%) diff --git a/.github/workflows/nightly.yml b/.github/workflows/release.yml similarity index 99% rename from .github/workflows/nightly.yml rename to .github/workflows/release.yml index cc5aed83..333e87fe 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: nightly build +name: release build env: AWS_ACCESS_KEY_ID: ${{ vars.NIGHTLY_BUILD_AWS_ACCESS_ID }} From ce541fbc6372122bba5afb4e9a80185ab25c3203 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 24 Apr 2026 10:28:30 +0200 Subject: [PATCH 2/3] ci: add arch linux package generation --- .github/workflows/release.yml | 86 +++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 333e87fe..4842ce9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,13 @@ jobs: tag: ${{ env.RELEASE }} makeLatest: true + - name: Share binary with packaging jobs + uses: actions/upload-artifact@v4 + with: + name: lightpanda-${{ env.ARCH }}-${{ env.OS }} + path: lightpanda-${{ env.ARCH }}-${{ env.OS }} + retention-days: 1 + build-linux-aarch64: env: ARCH: aarch64 @@ -103,6 +110,13 @@ jobs: tag: ${{ env.RELEASE }} makeLatest: true + - name: Share binary with packaging jobs + uses: actions/upload-artifact@v4 + with: + name: lightpanda-${{ env.ARCH }}-${{ env.OS }} + path: lightpanda-${{ env.ARCH }}-${{ env.OS }} + retention-days: 1 + build-macos-aarch64: env: ARCH: aarch64 @@ -184,3 +198,75 @@ jobs: artifacts: lightpanda-${{ env.ARCH }}-${{ env.OS }} tag: ${{ env.RELEASE }} makeLatest: true + + package-archlinux: + if: github.ref_type == 'tag' + strategy: + fail-fast: false + matrix: + arch: [x86_64, aarch64] + + env: + ARCH: ${{ matrix.arch }} + OS: linux + + needs: + - build-linux-x86_64 + - build-linux-aarch64 + runs-on: ubuntu-22.04 + container: archlinux:latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v6 + + - name: Install packaging deps + run: pacman -Syu --noconfirm --needed base-devel sudo + + - name: Download linux binary + uses: actions/download-artifact@v4 + with: + name: lightpanda-${{ env.ARCH }}-${{ env.OS }} + path: . + + - name: Build Arch package + run: | + useradd -m builder + echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + + RAW_VERSION="${{ env.RELEASE }}" + PKGVER="${RAW_VERSION#v}" + PKGREL="1" + echo "PKGVER=${PKGVER}" >> "$GITHUB_ENV" + echo "PKGREL=${PKGREL}" >> "$GITHUB_ENV" + + mkdir -p pkg + cp lightpanda-${{ env.ARCH }}-${{ env.OS }} pkg/ + cp LICENSE pkg/ + + cat > pkg/PKGBUILD < Date: Fri, 24 Apr 2026 10:51:43 +0200 Subject: [PATCH 3/3] ci: refacto build step into 1 job per os + CPU matrix --- .github/workflows/release.yml | 129 ++++++++-------------------------- 1 file changed, 30 insertions(+), 99 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4842ce9c..62f75198 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,12 +23,23 @@ permissions: contents: write jobs: - build-linux-x86_64: + build-linux: + strategy: + fail-fast: false + matrix: + include: + - arch: x86_64 + runner: ubuntu-22.04 + cpu_flag: -Dcpu=x86_64 + - arch: aarch64 + runner: ubuntu-22.04-arm + cpu_flag: -Dcpu=generic + env: - ARCH: x86_64 + ARCH: ${{ matrix.arch }} OS: linux - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.runner }} timeout-minutes: 20 steps: @@ -45,7 +56,7 @@ jobs: run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin - name: zig build - run: zig build -Dsnapshot_path=../../snapshot.bin -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast -Dcpu=x86_64 ${{ env.VERSION_FLAG }} + run: zig build -Dsnapshot_path=../../snapshot.bin -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast ${{ matrix.cpu_flag }} ${{ env.VERSION_FLAG }} - name: Rename binary run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }} @@ -70,101 +81,23 @@ jobs: path: lightpanda-${{ env.ARCH }}-${{ env.OS }} retention-days: 1 - build-linux-aarch64: + build-macos: + strategy: + fail-fast: false + matrix: + include: + # macos-14 runs on arm CPU. see + # https://github.com/actions/runner-images?tab=readme-ov-file + - arch: aarch64 + runner: macos-14 + - arch: x86_64 + runner: macos-14-large + env: - ARCH: aarch64 - OS: linux - - runs-on: ubuntu-22.04-arm - timeout-minutes: 20 - - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - uses: ./.github/actions/install - with: - os: ${{env.OS}} - arch: ${{env.ARCH}} - - - name: v8 snapshot - run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin - - - name: zig build - run: zig build -Dsnapshot_path=../../snapshot.bin -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast -Dcpu=generic ${{ env.VERSION_FLAG }} - - - name: Rename binary - run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }} - - - name: upload on s3 - run: | - export DIR=`git show --no-patch --no-notes --pretty='%cs_%h'` - aws s3 cp --storage-class=GLACIER_IR lightpanda-${{ env.ARCH }}-${{ env.OS }} s3://lpd-nightly-build/${DIR}/lightpanda-${{ env.ARCH }}-${{ env.OS }} - - - name: Upload the build - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - artifacts: lightpanda-${{ env.ARCH }}-${{ env.OS }} - tag: ${{ env.RELEASE }} - makeLatest: true - - - name: Share binary with packaging jobs - uses: actions/upload-artifact@v4 - with: - name: lightpanda-${{ env.ARCH }}-${{ env.OS }} - path: lightpanda-${{ env.ARCH }}-${{ env.OS }} - retention-days: 1 - - build-macos-aarch64: - env: - ARCH: aarch64 + ARCH: ${{ matrix.arch }} OS: macos - # macos-14 runs on arm CPU. see - # https://github.com/actions/runner-images?tab=readme-ov-file - runs-on: macos-14 - timeout-minutes: 20 - - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - uses: ./.github/actions/install - with: - os: ${{env.OS}} - arch: ${{env.ARCH}} - - - name: v8 snapshot - run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin - - - name: zig build - run: zig build -Dsnapshot_path=../../snapshot.bin -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast ${{ env.VERSION_FLAG }} - - - name: Rename binary - run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }} - - - name: upload on s3 - run: | - export DIR=`git show --no-patch --no-notes --pretty='%cs_%h'` - aws s3 cp --storage-class=GLACIER_IR lightpanda-${{ env.ARCH }}-${{ env.OS }} s3://lpd-nightly-build/${DIR}/lightpanda-${{ env.ARCH }}-${{ env.OS }} - - - name: Upload the build - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - artifacts: lightpanda-${{ env.ARCH }}-${{ env.OS }} - tag: ${{ env.RELEASE }} - makeLatest: true - - build-macos-x86_64: - env: - ARCH: x86_64 - OS: macos - - runs-on: macos-14-large + runs-on: ${{ matrix.runner }} timeout-minutes: 20 steps: @@ -210,9 +143,7 @@ jobs: ARCH: ${{ matrix.arch }} OS: linux - needs: - - build-linux-x86_64 - - build-linux-aarch64 + needs: build-linux runs-on: ubuntu-22.04 container: archlinux:latest timeout-minutes: 10