mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
fix: 使用 ARM 模拟器构建 Linux ARM64
根据 Tauri 官方文档,Linux ARM64 需要使用 pguyot/arm-runner-action 模拟器来构建,而不是原生 ARM64 runner。 - 将 Linux ARM64 从 matrix 中移除 - 添加单独的 build-linux-arm64 job - 使用 DietPi RPi5 ARM64 镜像作为基础 - 使用 softprops/action-gh-release 上传构建产物 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,13 +32,9 @@ jobs:
|
||||
- platform: ubuntu-22.04
|
||||
target: x86_64-unknown-linux-gnu
|
||||
name: Linux-x64
|
||||
# 使用原生 ARM64 runner 而非交叉编译
|
||||
- platform: ubuntu-22.04-arm
|
||||
target: aarch64-unknown-linux-gnu
|
||||
name: Linux-arm64
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -50,7 +46,7 @@ jobs:
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: startsWith(matrix.platform, 'ubuntu')
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
@@ -79,31 +75,110 @@ jobs:
|
||||
releaseName: 'ProxyCast ${{ github.event.inputs.version || github.ref_name }}'
|
||||
releaseBody: |
|
||||
## ProxyCast Release
|
||||
|
||||
|
||||
### Features
|
||||
- AI API 代理服务
|
||||
- Kiro OAuth 凭证管理
|
||||
- OpenAI/Anthropic 兼容 API
|
||||
- 自动检测凭证文件变化
|
||||
- 多 Provider 支持
|
||||
|
||||
|
||||
### Downloads
|
||||
- **macOS (Apple Silicon)**: `proxycast_*_aarch64.dmg`
|
||||
- **macOS (Intel)**: `proxycast_*_x64.dmg`
|
||||
- **Windows (64-bit)**: `proxycast_*_x64-setup.exe`
|
||||
- **Linux x64**: `proxycast_*_amd64.deb` / `proxycast_*_amd64.AppImage`
|
||||
- **Linux ARM64**: `proxycast_*_arm64.deb` / `proxycast_*_arm64.AppImage`
|
||||
|
||||
|
||||
### macOS 首次安装
|
||||
|
||||
|
||||
由于应用未经 Apple 签名,首次打开可能提示「应用已损坏」,请运行:
|
||||
```bash
|
||||
xattr -cr /Applications/proxycast.app
|
||||
```
|
||||
|
||||
|
||||
### 默认配置
|
||||
- **端口**: 8999
|
||||
- **API Key**: 首次启动自动生成,可在设置页查看/修改
|
||||
releaseDraft: false
|
||||
prerelease: false
|
||||
args: --target ${{ matrix.target }}
|
||||
|
||||
# Linux ARM64 使用模拟 ARM runner 构建
|
||||
build-linux-arm64:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache rust build artifacts
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: src-tauri
|
||||
cache-on-failure: true
|
||||
|
||||
- name: Build app in ARM64 emulator
|
||||
uses: pguyot/arm-runner-action@v2.6.5
|
||||
with:
|
||||
base_image: https://dietpi.com/downloads/images/DietPi_RPi5-ARMv8-Bookworm.img.xz
|
||||
cpu: cortex-a72
|
||||
bind_mount_repository: true
|
||||
image_additional_mb: 10240
|
||||
optimize_image: no
|
||||
commands: |
|
||||
# Prevent Rust from complaining about $HOME not matching eid home
|
||||
export HOME=/root
|
||||
|
||||
# Workaround to CI worker being stuck on Updating crates.io index
|
||||
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||||
|
||||
# Install setup prerequisites
|
||||
apt-get update -y --allow-releaseinfo-change
|
||||
apt-get autoremove -y
|
||||
apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
curl \
|
||||
libwebkit2gtk-4.1-dev \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
libgtk-3-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
librsvg2-dev \
|
||||
patchelf \
|
||||
libfuse2 \
|
||||
file
|
||||
|
||||
# Install Rust
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
. "$HOME/.cargo/env"
|
||||
|
||||
# Install Node.js
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash
|
||||
apt-get install -y nodejs
|
||||
|
||||
# Install frontend dependencies
|
||||
npm ci
|
||||
|
||||
# Build the application
|
||||
npm run tauri build -- --verbose
|
||||
|
||||
- name: Get app version
|
||||
run: echo "APP_VERSION=$(jq -r .version src-tauri/tauri.conf.json)" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload deb bundle to release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.version || github.ref_name }}
|
||||
files: |
|
||||
src-tauri/target/release/bundle/deb/*.deb
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload AppImage bundle to release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.version || github.ref_name }}
|
||||
files: |
|
||||
src-tauri/target/release/bundle/appimage/*.AppImage
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user