From 84a8eb618c350c6ea4b78f56a8539e3f9b24f12a Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:05:38 +1000 Subject: [PATCH 01/19] Create main.yml --- .github/workflows/main.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..f5bc869c3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: CI (Linux ARM64) +on: [push, pull_request] +jobs: + build-linux-arm64: + runs-on: ubuntu-22.04 + strategy: + matrix: + node-version: [18.x] + steps: + - uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm ci + - name: Build App + env: + TAURI_ARCH: aarch64-linux + run: npm run tauri build -- --target aarch64-unknown-linux-gnu + - name: Package AppImage + run: | + # locate and archive Artifacts for aarch64 + tar czf chatgpt-linux-arm64.tar.gz src-tauri/target/release/bundle/appimage/*.AppImage + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: chatgpt-linux-arm64 + path: chatgpt-linux-arm64.tar.gz From 2f046a725b554d1ff3d26057ed3b497c74fdceaa Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:07:21 +1000 Subject: [PATCH 02/19] Create mgain.yml --- .github/workflows/mgain.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/mgain.yml diff --git a/.github/workflows/mgain.yml b/.github/workflows/mgain.yml new file mode 100644 index 000000000..2866df135 --- /dev/null +++ b/.github/workflows/mgain.yml @@ -0,0 +1,22 @@ +jobs: + build-cross-arm64: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Aarch64 Toolchain + run: | + sudo apt-get update + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + - name: Setup Node.js & Dependencies + uses: actions/setup-node@v3 + with: { node-version: '18.x' } + - run: npm ci + - name: Build (Cross-Compile) + env: + CC: aarch64-linux-gnu-gcc + CXX: aarch64-linux-gnu-g++ + TAURI_ARCH: aarch64-unknown-linux-gnu + run: | + npm run tauri build -- --target aarch64-unknown-linux-gnu \ + --cross-gcc "$CC" --cross-gxx "$CXX" + # packaging and upload same as above From 3be5f32e569f01d9e6e7459586f16280aa53d950 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:11:25 +1000 Subject: [PATCH 03/19] Create build-arm64.yml --- .github/workflows/build-arm64.yml | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/build-arm64.yml diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml new file mode 100644 index 000000000..85f9bb356 --- /dev/null +++ b/.github/workflows/build-arm64.yml @@ -0,0 +1,55 @@ +name: Build ChatGPT for ARM Cortex-A72 (Linux AArch64) + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-arm64: + runs-on: ubuntu-22.04 # GitHub-hosted AArch64 runner + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Install Rust toolchain (with target) + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + rustup target add aarch64-unknown-linux-gnu + rustup update + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.0-dev \ + build-essential \ + libssl-dev \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + curl git pkg-config libglib2.0-dev \ + libgdk-pixbuf2.0-dev libgtk-3-dev + + - name: Install frontend dependencies + run: npm ci + + - name: Build ChatGPT with Tauri (ARM64) + env: + TAURI_ARCH: aarch64 + run: | + source $HOME/.cargo/env + npm run tauri build -- --target aarch64-unknown-linux-gnu + + - name: Upload Linux AArch64 artifact + uses: actions/upload-artifact@v3 + with: + name: chatgpt-linux-arm64 + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle From 132b6978bbe102d1f56e7158695bd97c5a4b5df9 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:19:08 +1000 Subject: [PATCH 04/19] Update build-arm64.yml Hejr --- .github/workflows/build-arm64.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml index 85f9bb356..425d819e2 100644 --- a/.github/workflows/build-arm64.yml +++ b/.github/workflows/build-arm64.yml @@ -41,6 +41,7 @@ jobs: - name: Install frontend dependencies run: npm ci + - name: Build ChatGPT with Tauri (ARM64) env: TAURI_ARCH: aarch64 From f8e2c4c9cc39234bea0a050fc0f0db73e791f296 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:25:35 +1000 Subject: [PATCH 05/19] Delete .github/workflows directory --- .github/workflows/build-arm64.yml | 56 ------------------------------- .github/workflows/main.yml | 29 ---------------- .github/workflows/mgain.yml | 22 ------------ 3 files changed, 107 deletions(-) delete mode 100644 .github/workflows/build-arm64.yml delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/mgain.yml diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml deleted file mode 100644 index 425d819e2..000000000 --- a/.github/workflows/build-arm64.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Build ChatGPT for ARM Cortex-A72 (Linux AArch64) - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build-arm64: - runs-on: ubuntu-22.04 # GitHub-hosted AArch64 runner - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Install Rust toolchain (with target) - run: | - curl https://sh.rustup.rs -sSf | sh -s -- -y - source $HOME/.cargo/env - rustup target add aarch64-unknown-linux-gnu - rustup update - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.0-dev \ - build-essential \ - libssl-dev \ - libgtk-3-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev \ - curl git pkg-config libglib2.0-dev \ - libgdk-pixbuf2.0-dev libgtk-3-dev - - - name: Install frontend dependencies - run: npm ci - - - - name: Build ChatGPT with Tauri (ARM64) - env: - TAURI_ARCH: aarch64 - run: | - source $HOME/.cargo/env - npm run tauri build -- --target aarch64-unknown-linux-gnu - - - name: Upload Linux AArch64 artifact - uses: actions/upload-artifact@v3 - with: - name: chatgpt-linux-arm64 - path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index f5bc869c3..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: CI (Linux ARM64) -on: [push, pull_request] -jobs: - build-linux-arm64: - runs-on: ubuntu-22.04 - strategy: - matrix: - node-version: [18.x] - steps: - - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - name: Install Dependencies - run: npm ci - - name: Build App - env: - TAURI_ARCH: aarch64-linux - run: npm run tauri build -- --target aarch64-unknown-linux-gnu - - name: Package AppImage - run: | - # locate and archive Artifacts for aarch64 - tar czf chatgpt-linux-arm64.tar.gz src-tauri/target/release/bundle/appimage/*.AppImage - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: chatgpt-linux-arm64 - path: chatgpt-linux-arm64.tar.gz diff --git a/.github/workflows/mgain.yml b/.github/workflows/mgain.yml deleted file mode 100644 index 2866df135..000000000 --- a/.github/workflows/mgain.yml +++ /dev/null @@ -1,22 +0,0 @@ -jobs: - build-cross-arm64: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Aarch64 Toolchain - run: | - sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - - name: Setup Node.js & Dependencies - uses: actions/setup-node@v3 - with: { node-version: '18.x' } - - run: npm ci - - name: Build (Cross-Compile) - env: - CC: aarch64-linux-gnu-gcc - CXX: aarch64-linux-gnu-g++ - TAURI_ARCH: aarch64-unknown-linux-gnu - run: | - npm run tauri build -- --target aarch64-unknown-linux-gnu \ - --cross-gcc "$CC" --cross-gxx "$CXX" - # packaging and upload same as above From 5df96d5b4b507e8cbf433da80dbf111098fc02c4 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:28:10 +1000 Subject: [PATCH 06/19] Create build-arm64.yml Add ARM Cortex-A72 build workflow --- .github/workflows/build-arm64.yml | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/build-arm64.yml diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml new file mode 100644 index 000000000..e614eed66 --- /dev/null +++ b/.github/workflows/build-arm64.yml @@ -0,0 +1,52 @@ +name: Build ChatGPT for ARM Cortex-A72 (Linux AArch64) + +on: + workflow_dispatch: + +jobs: + build-arm64: + runs-on: ubuntu-22.04 # GitHub-hosted ARM64 runner + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Install Rust toolchain (with target) + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + rustup target add aarch64-unknown-linux-gnu + rustup update + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.0-dev \ + build-essential \ + libssl-dev \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + curl git pkg-config libglib2.0-dev \ + libgdk-pixbuf2.0-dev libgtk-3-dev + + - name: Install frontend dependencies + run: npm ci + + - name: Build ChatGPT with Tauri (ARM64) + env: + TAURI_ARCH: aarch64 + run: | + source $HOME/.cargo/env + npm run tauri build -- --target aarch64-unknown-linux-gnu + + - name: Upload Linux AArch64 artifact + uses: actions/upload-artifact@v3 + with: + name: chatgpt-linux-arm64 + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle From 8d8945b3225184f277f1508631f2905a13ad94dd Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:33:10 +1000 Subject: [PATCH 07/19] Update build-arm64.yml Fix error --- .github/workflows/build-arm64.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml index e614eed66..b21e901b8 100644 --- a/.github/workflows/build-arm64.yml +++ b/.github/workflows/build-arm64.yml @@ -45,8 +45,8 @@ jobs: source $HOME/.cargo/env npm run tauri build -- --target aarch64-unknown-linux-gnu - - name: Upload Linux AArch64 artifact - uses: actions/upload-artifact@v3 - with: - name: chatgpt-linux-arm64 - path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle +- name: Upload Linux AArch64 artifact + uses: actions/upload-artifact@v4 + with: + name: chatgpt-linux-arm64 + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle From 4fb0bc08a5372a0fc9103684fb83a136e89addc7 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:34:55 +1000 Subject: [PATCH 08/19] Update build-arm64.yml --- .github/workflows/build-arm64.yml | 43 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml index b21e901b8..02f3e0421 100644 --- a/.github/workflows/build-arm64.yml +++ b/.github/workflows/build-arm64.yml @@ -1,52 +1,51 @@ -name: Build ChatGPT for ARM Cortex-A72 (Linux AArch64) +name: Build ChatGPT for ARM Cortex-A72 (Linux ARM64) on: workflow_dispatch: jobs: build-arm64: - runs-on: ubuntu-22.04 # GitHub-hosted ARM64 runner + runs-on: ubuntu-22.04 # GitHub ARM64 runner steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18.x - - name: Install Rust toolchain (with target) + - name: Install Rust toolchain run: | curl https://sh.rustup.rs -sSf | sh -s -- -y - source $HOME/.cargo/env + echo 'source $HOME/.cargo/env' >> $GITHUB_ENV + echo "PATH=$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV rustup target add aarch64-unknown-linux-gnu - rustup update - name: Install system dependencies run: | sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.0-dev \ - build-essential \ - libssl-dev \ - libgtk-3-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev \ - curl git pkg-config libglib2.0-dev \ - libgdk-pixbuf2.0-dev libgtk-3-dev + sudo apt-get install -y \ + libwebkit2gtk-4.0-dev \ + build-essential \ + libssl-dev \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + curl git pkg-config libglib2.0-dev \ + libgdk-pixbuf2.0-dev libgtk-3-dev - name: Install frontend dependencies run: npm ci - - name: Build ChatGPT with Tauri (ARM64) - env: - TAURI_ARCH: aarch64 + - name: Build ChatGPT with Tauri for ARM64 run: | source $HOME/.cargo/env npm run tauri build -- --target aarch64-unknown-linux-gnu -- name: Upload Linux AArch64 artifact - uses: actions/upload-artifact@v4 - with: - name: chatgpt-linux-arm64 - path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle + - name: Upload Linux ARM64 artifacts + uses: actions/upload-artifact@v4 + with: + name: chatgpt-linux-arm64 + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle From 4496fa215ec228f844b55bd98c57d2962e01d155 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:39:55 +1000 Subject: [PATCH 09/19] Update build-arm64.yml --- .github/workflows/build-arm64.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml index 02f3e0421..ef719b8ea 100644 --- a/.github/workflows/build-arm64.yml +++ b/.github/workflows/build-arm64.yml @@ -5,7 +5,7 @@ on: jobs: build-arm64: - runs-on: ubuntu-22.04 # GitHub ARM64 runner + runs-on: ubuntu-22.04 # GitHub-hosted ARM64 runner steps: - name: Checkout repository @@ -16,12 +16,11 @@ jobs: with: node-version: 18.x - - name: Install Rust toolchain + - name: Install Rust toolchain and target run: | curl https://sh.rustup.rs -sSf | sh -s -- -y - echo 'source $HOME/.cargo/env' >> $GITHUB_ENV - echo "PATH=$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV - rustup target add aarch64-unknown-linux-gnu + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu - name: Install system dependencies run: | @@ -41,11 +40,11 @@ jobs: - name: Build ChatGPT with Tauri for ARM64 run: | - source $HOME/.cargo/env + ~/.cargo/bin/cargo build --release --target aarch64-unknown-linux-gnu npm run tauri build -- --target aarch64-unknown-linux-gnu - name: Upload Linux ARM64 artifacts uses: actions/upload-artifact@v4 with: name: chatgpt-linux-arm64 - path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle \ No newline at end of file From 55487330c4e62b292f1746e7653b9705d5e079e5 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:43:39 +1000 Subject: [PATCH 10/19] Update build-arm64.yml --- .github/workflows/build-arm64.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml index ef719b8ea..8ec2035cd 100644 --- a/.github/workflows/build-arm64.yml +++ b/.github/workflows/build-arm64.yml @@ -36,7 +36,7 @@ jobs: libgdk-pixbuf2.0-dev libgtk-3-dev - name: Install frontend dependencies - run: npm ci + run: npm install - name: Build ChatGPT with Tauri for ARM64 run: | @@ -47,4 +47,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: chatgpt-linux-arm64 - path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle \ No newline at end of file + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle From 1a0fbe49f61a89ffbf36cdc63e1e2962b0cff96c Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:46:41 +1000 Subject: [PATCH 11/19] Update build-arm64.yml --- .github/workflows/build-arm64.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml index 8ec2035cd..95d5a57ab 100644 --- a/.github/workflows/build-arm64.yml +++ b/.github/workflows/build-arm64.yml @@ -5,7 +5,7 @@ on: jobs: build-arm64: - runs-on: ubuntu-22.04 # GitHub-hosted ARM64 runner + runs-on: ubuntu-22.04 steps: - name: Checkout repository @@ -26,14 +26,17 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ + pkg-config \ libwebkit2gtk-4.0-dev \ build-essential \ libssl-dev \ libgtk-3-dev \ libayatana-appindicator3-dev \ librsvg2-dev \ - curl git pkg-config libglib2.0-dev \ - libgdk-pixbuf2.0-dev libgtk-3-dev + curl git \ + libglib2.0-dev \ + libgdk-pixbuf2.0-dev \ + libgtk-3-dev - name: Install frontend dependencies run: npm install From 145f025033efd0fc2f574272905a378fd8e06de7 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:50:27 +1000 Subject: [PATCH 12/19] Create Dockerfile.arm64 --- Dockerfile.arm64 | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Dockerfile.arm64 diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 new file mode 100644 index 000000000..05348a688 --- /dev/null +++ b/Dockerfile.arm64 @@ -0,0 +1,43 @@ +FROM --platform=linux/arm64 ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive +ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc +ENV PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu +ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig +ENV PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig +ENV CC=aarch64-linux-gnu-gcc +ENV CXX=aarch64-linux-gnu-g++ +ENV TARGET=aarch64-unknown-linux-gnu + +# Install dependencies +RUN apt-get update && apt-get install -y \ + curl git gnupg2 build-essential \ + libwebkit2gtk-4.0-dev \ + libssl-dev libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev libglib2.0-dev \ + libgdk-pixbuf2.0-dev libgtk-3-dev \ + pkg-config \ + cmake \ + python3 \ + nodejs npm \ + aarch64-linux-gnu-gcc \ + aarch64-linux-gnu-g++ \ + qemu-user-static + +# Install Rust +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ + ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu + +# Set paths +ENV PATH="/root/.cargo/bin:$PATH" + +# Add project +WORKDIR /build +COPY . . + +# Build frontend +RUN npm install && npm run build + +# Build tauri +RUN npm run tauri build -- --target aarch64-unknown-linux-gnu From d7413bef52d32f2da05e8f89ba4ebe266f0e2ee2 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:23:54 +1000 Subject: [PATCH 13/19] Create docker-arm64.yml --- .github/workflows/docker-arm64.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/docker-arm64.yml diff --git a/.github/workflows/docker-arm64.yml b/.github/workflows/docker-arm64.yml new file mode 100644 index 000000000..abc3b20c8 --- /dev/null +++ b/.github/workflows/docker-arm64.yml @@ -0,0 +1,41 @@ +name: Build ChatGPT for ARM Cortex-A72 using Docker (ARM64) + +on: + workflow_dispatch: + +jobs: + docker-build-arm64: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Enable QEMU for ARM64 emulation + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + + - name: Build ChatGPT ARM64 image + run: | + docker buildx build \ + --platform linux/arm64 \ + -f Dockerfile.arm64 \ + -t chatgpt-arm64 . \ + --load + + - name: Extract built artifact + run: | + mkdir -p output + docker run --rm -v ${{ github.workspace }}/output:/out \ + chatgpt-arm64 \ + cp -r /build/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle /out + + - name: Upload ChatGPT ARM64 Artifact + uses: actions/upload-artifact@v4 + with: + name: chatgpt-linux-arm64 + path: output/bundle From 3ed667bfd93281e7e5c0c5f4ea1057c0bf2228b0 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:24:21 +1000 Subject: [PATCH 14/19] Update Dockerfile.arm64 --- Dockerfile.arm64 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 05348a688..019d76280 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -29,6 +29,31 @@ RUN apt-get update && apt-get install -y \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu +FROM --platform=linux/arm64 ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y \ + curl git build-essential pkg-config \ + libwebkit2gtk-4.0-dev libssl-dev libgtk-3-dev \ + libayatana-appindicator3-dev librsvg2-dev libglib2.0-dev \ + libgdk-pixbuf2.0-dev cmake python3 nodejs npm \ + aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ \ + qemu-user-static + +# Install Rust & target +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ + ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu + +ENV PATH="/root/.cargo/bin:$PATH" +ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc + +WORKDIR /build +COPY . . + +RUN npm install && npm run build +RUN npm run tauri build -- --target aarch64-unknown-linux-gnu + # Set paths ENV PATH="/root/.cargo/bin:$PATH" From 49bbf00f3ca52a727ab3ceff70a58a7312ffd117 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:33:35 +1000 Subject: [PATCH 15/19] Update Dockerfile.arm64 --- Dockerfile.arm64 | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 019d76280..1ee07b4e0 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -1,36 +1,5 @@ FROM --platform=linux/arm64 ubuntu:22.04 -ENV DEBIAN_FRONTEND=noninteractive -ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc -ENV PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu -ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig -ENV PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig -ENV CC=aarch64-linux-gnu-gcc -ENV CXX=aarch64-linux-gnu-g++ -ENV TARGET=aarch64-unknown-linux-gnu - -# Install dependencies -RUN apt-get update && apt-get install -y \ - curl git gnupg2 build-essential \ - libwebkit2gtk-4.0-dev \ - libssl-dev libgtk-3-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev libglib2.0-dev \ - libgdk-pixbuf2.0-dev libgtk-3-dev \ - pkg-config \ - cmake \ - python3 \ - nodejs npm \ - aarch64-linux-gnu-gcc \ - aarch64-linux-gnu-g++ \ - qemu-user-static - -# Install Rust -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ - ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu - -FROM --platform=linux/arm64 ubuntu:22.04 - ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y \ @@ -53,16 +22,3 @@ COPY . . RUN npm install && npm run build RUN npm run tauri build -- --target aarch64-unknown-linux-gnu - -# Set paths -ENV PATH="/root/.cargo/bin:$PATH" - -# Add project -WORKDIR /build -COPY . . - -# Build frontend -RUN npm install && npm run build - -# Build tauri -RUN npm run tauri build -- --target aarch64-unknown-linux-gnu From 1e168af046abca2cdd72318a0a7612a4d9de4dee Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:38:25 +1000 Subject: [PATCH 16/19] Update build-arm64.yml --- .github/workflows/build-arm64.yml | 53 ++----------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml index 95d5a57ab..6c6f3bb67 100644 --- a/.github/workflows/build-arm64.yml +++ b/.github/workflows/build-arm64.yml @@ -1,53 +1,4 @@ -name: Build ChatGPT for ARM Cortex-A72 (Linux ARM64) - -on: - workflow_dispatch: - jobs: - build-arm64: + native-arm64: runs-on: ubuntu-22.04 - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18.x - - - name: Install Rust toolchain and target - run: | - curl https://sh.rustup.rs -sSf | sh -s -- -y - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - pkg-config \ - libwebkit2gtk-4.0-dev \ - build-essential \ - libssl-dev \ - libgtk-3-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev \ - curl git \ - libglib2.0-dev \ - libgdk-pixbuf2.0-dev \ - libgtk-3-dev - - - name: Install frontend dependencies - run: npm install - - - name: Build ChatGPT with Tauri for ARM64 - run: | - ~/.cargo/bin/cargo build --release --target aarch64-unknown-linux-gnu - npm run tauri build -- --target aarch64-unknown-linux-gnu - - - name: Upload Linux ARM64 artifacts - uses: actions/upload-artifact@v4 - with: - name: chatgpt-linux-arm64 - path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle + labels: [ARM64] # GitHub automatically schedules it on ARM64 runners From 1a8e2186e6cd78f807eb29e9c93142f3cb77783b Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:38:53 +1000 Subject: [PATCH 17/19] Update docker-arm64.yml --- .github/workflows/docker-arm64.yml | 52 +++++++----------------------- 1 file changed, 11 insertions(+), 41 deletions(-) diff --git a/.github/workflows/docker-arm64.yml b/.github/workflows/docker-arm64.yml index abc3b20c8..48bda9f5a 100644 --- a/.github/workflows/docker-arm64.yml +++ b/.github/workflows/docker-arm64.yml @@ -1,41 +1,11 @@ -name: Build ChatGPT for ARM Cortex-A72 using Docker (ARM64) - -on: - workflow_dispatch: - -jobs: - docker-build-arm64: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Enable QEMU for ARM64 emulation - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - name: Build ChatGPT ARM64 image - run: | - docker buildx build \ - --platform linux/arm64 \ - -f Dockerfile.arm64 \ - -t chatgpt-arm64 . \ - --load - - - name: Extract built artifact - run: | - mkdir -p output - docker run --rm -v ${{ github.workspace }}/output:/out \ - chatgpt-arm64 \ - cp -r /build/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle /out - - - name: Upload ChatGPT ARM64 Artifact - uses: actions/upload-artifact@v4 - with: - name: chatgpt-linux-arm64 - path: output/bundle +FROM --platform=linux/arm64 debian:bullseye + +RUN dpkg --add-architecture arm64 && \ + apt-get update && \ + apt-get install -y \ + build-essential curl git pkg-config \ + libssl-dev libgtk-3-dev libgdk-pixbuf2.0-dev \ + librsvg2-dev libglib2.0-dev cmake python3 \ + nodejs npm \ + aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ \ + qemu-user-static From e108e84b494b716188642bc1c34deaf951f17be3 Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:41:02 +1000 Subject: [PATCH 18/19] Create build-arm64-native.yml --- .github/workflows/build-arm64-native.yml | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/build-arm64-native.yml diff --git a/.github/workflows/build-arm64-native.yml b/.github/workflows/build-arm64-native.yml new file mode 100644 index 000000000..aac7ea166 --- /dev/null +++ b/.github/workflows/build-arm64-native.yml @@ -0,0 +1,52 @@ +name: Native ARM64 Build for ChatGPT + +on: + workflow_dispatch: + +jobs: + build-arm64: + runs-on: ubuntu-22.04 # GitHub ARM64 native runner + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.x + + - name: Install Rust toolchain and ARM64 target + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libwebkit2gtk-4.0-dev \ + build-essential \ + libssl-dev libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + libglib2.0-dev \ + libgdk-pixbuf2.0-dev \ + cmake curl git \ + pkg-config python3 \ + nodejs npm + + - name: Install frontend dependencies + run: npm install + + - name: Build ChatGPT with Tauri for ARM64 + run: | + ~/.cargo/bin/cargo build --release --target aarch64-unknown-linux-gnu + npm run tauri build -- --target aarch64-unknown-linux-gnu + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: chatgpt-linux-arm64 + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle From d1e353f7c406e24a3633b0755aed78c22c40c10d Mon Sep 17 00:00:00 2001 From: AirysDark <47623717+AirysDark@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:47:07 +1000 Subject: [PATCH 19/19] Create build-release-arm64.yml --- .github/workflows/build-release-arm64.yml | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/build-release-arm64.yml diff --git a/.github/workflows/build-release-arm64.yml b/.github/workflows/build-release-arm64.yml new file mode 100644 index 000000000..5f657b821 --- /dev/null +++ b/.github/workflows/build-release-arm64.yml @@ -0,0 +1,65 @@ +name: Native ARM64 Release Build for ChatGPT + +on: + workflow_dispatch: + inputs: + tag: + description: 'Release tag (e.g. v1.0.0)' + required: true + default: 'v1.0.0' + +jobs: + build-arm64: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.x + + - name: Install Rust toolchain + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libwebkit2gtk-4.0-dev \ + build-essential \ + libssl-dev libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + libglib2.0-dev \ + libgdk-pixbuf2.0-dev \ + cmake curl git \ + pkg-config python3 \ + nodejs npm + + - name: Install frontend dependencies + run: npm install + + - name: Build ChatGPT with Tauri for ARM64 + run: | + ~/.cargo/bin/cargo build --release --target aarch64-unknown-linux-gnu + npm run tauri build -- --target aarch64-unknown-linux-gnu + + - name: Rename output files for release + run: | + mkdir -p release + cp src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage release/chatgpt-${{ github.event.inputs.tag }}-arm64.AppImage + cp src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb release/chatgpt-${{ github.event.inputs.tag }}-arm64.deb + + - name: Upload to GitHub Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ github.event.inputs.tag }} + files: release/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}