From 02fa99c9ae5ac803604e916d5bcb43f2fa3cd8a9 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 3 Mar 2026 09:49:22 +0530 Subject: [PATCH 1/4] Add build validation workflow for node and binaries --- .github/workflows/build-validation.yml | 85 ++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/build-validation.yml diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml new file mode 100644 index 00000000..128ce1e6 --- /dev/null +++ b/.github/workflows/build-validation.yml @@ -0,0 +1,85 @@ +name: Build Validation + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + +jobs: + verify-node-build: + name: Verify Node Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "16.x" + + - name: Install dependencies + run: npm install + + - name: Verify CLI runs with Node + run: node index.js -v + + - name: Verify npm package can be built + run: npm pack + + verify-platform-binaries: + name: Verify Platform Binaries + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "16.x" + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: "latest" + + - name: Setup binfmt and QEMU + run: | + sudo apt update + sudo apt install -y qemu binfmt-support qemu-user-static + update-binfmts --display + + - name: Setup ldid + run: | + git clone https://github.com/tpoechtrager/ldid + cd ./ldid + sudo make + sudo make install + + - name: Install dependencies + run: bun install + + - name: Build all platform binaries + run: | + rm -rf build + mkdir -p build + bun run linux-x64 + bun run linux-arm64 + bun run windows-x64 + bun run windows-arm64 + bun run mac-x64 + bun run mac-arm64 + + - name: Verify generated binaries + run: | + test -s build/appwrite-cli-linux-x64 + test -s build/appwrite-cli-linux-arm64 + test -s build/appwrite-cli-win-x64.exe + test -s build/appwrite-cli-win-arm64.exe + test -s build/appwrite-cli-darwin-x64 + test -s build/appwrite-cli-darwin-arm64 From 80ac074e2d1ce1bfd6974ae963c94a9a571e64a6 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 3 Mar 2026 09:51:30 +0530 Subject: [PATCH 2/4] Run build validation on push and manual dispatch --- .github/workflows/build-validation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index 128ce1e6..f17dbd92 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -6,6 +6,8 @@ concurrency: on: pull_request: + push: + workflow_dispatch: jobs: verify-node-build: From 01b7f5ba41e20ee3c58f79cff6070619f399a86e Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 3 Mar 2026 09:52:24 +0530 Subject: [PATCH 3/4] Limit push trigger to main to avoid duplicate PR runs --- .github/workflows/build-validation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index f17dbd92..c88ef90a 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -7,6 +7,8 @@ concurrency: on: pull_request: push: + branches: + - main workflow_dispatch: jobs: From fde8da44a1b7b2fce0ad91310f0e7f3e3e50abfe Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 3 Mar 2026 09:53:59 +0530 Subject: [PATCH 4/4] Use setup-qemu-action instead of missing qemu apt package --- .github/workflows/build-validation.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index c88ef90a..9148360a 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -52,11 +52,10 @@ jobs: with: bun-version: "latest" - - name: Setup binfmt and QEMU - run: | - sudo apt update - sudo apt install -y qemu binfmt-support qemu-user-static - update-binfmts --display + - name: Setup QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: amd64,arm64 - name: Setup ldid run: |