Skip to content
Open

Jd #1559

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/build-arm64-native.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions .github/workflows/build-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jobs:
native-arm64:
runs-on: ubuntu-22.04
labels: [ARM64] # GitHub automatically schedules it on ARM64 runners
65 changes: 65 additions & 0 deletions .github/workflows/build-release-arm64.yml
Original file line number Diff line number Diff line change
@@ -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 }}
11 changes: 11 additions & 0 deletions .github/workflows/docker-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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
24 changes: 24 additions & 0 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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