Skip to content

Commit 7f1145c

Browse files
author
OpenMoTa3
authored
Update desktop.yml
1 parent 5412f40 commit 7f1145c

1 file changed

Lines changed: 24 additions & 25 deletions

File tree

‎.github/workflows/desktop.yml‎

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,46 @@
1-
name: Build Desktop for pmOS (Linux ARM64)
1+
name: Build Pure Musl Desktop for pmOS (ARM64)
22

33
on:
44
push:
55
branches: [ "main" ]
66
workflow_dispatch:
77

88
jobs:
9-
build:
9+
build-musl:
1010
runs-on: ubuntu-24.04-arm
1111

12+
# 直接在原生 Alpine Linux (musl) 容器内执行全套编译
13+
container:
14+
image: alpine:edge
15+
1216
steps:
17+
- name: Install Alpine Native Build Dependencies
18+
run: |
19+
apk update
20+
# 安装 Alpine 原生 musl JDK 17 及桌面构建依赖
21+
apk add openjdk17-jdk git bash binutils fakeroot dpkg libx11-dev libxext-dev libxrender-dev libxtst-dev libxi-dev
22+
1323
- name: Checkout Code
1424
uses: actions/checkout@v4
1525

16-
- name: Set up JDK 17
17-
uses: actions/setup-java@v4
18-
with:
19-
java-version: '17'
20-
distribution: 'temurin'
21-
cache: gradle
22-
2326
- name: Grant execute permission for gradlew
2427
run: chmod +x gradlew
2528

26-
# 1. 忽略无关平台的 Native 警告并执行全量桌面打包
27-
- name: Build Desktop Distributable
29+
# 使用 Alpine 原生 musl JDK 进行 jpackage 裁剪与打包
30+
- name: Build Pure Musl Distributable
31+
env:
32+
JAVA_HOME: /usr/lib/jvm/java-17-openjdk
2833
run: |
29-
./gradlew packageDistributionForCurrentOS createDistributable -Pkotlin.native.ignoreDisabledTargets=true --continue || ./gradlew assemble -Pkotlin.native.ignoreDisabledTargets=true
34+
./gradlew :app:ide-desktop:createDistributable -Pkotlin.native.ignoreDisabledTargets=true --stacktrace
3035
31-
# 2. 自动定位打包生成的 app 绿色目录并压缩
36+
# 压缩打包纯 musl 产物
3237
- name: Package Tarball
3338
run: |
34-
DIST_DIR=$(find . -type d -path "*/build/compose/binaries/main/app" 2>/dev/null | head -n 1)
35-
if [ -z "$DIST_DIR" ]; then
36-
echo "Searching for any built binary folder..."
37-
DIST_DIR=$(find . -type d -name "app" | grep "binaries" | head -n 1)
38-
fi
39-
echo "Found distributable at: $DIST_DIR"
40-
cd "$DIST_DIR"
41-
tar -czvf ${{ github.workspace }}/CodeAssist-Linux-arm64.tar.gz *
42-
43-
- name: Upload Artifact
39+
cd app/ide-desktop/build/compose/binaries/main/app/
40+
tar -czvf ${{ github.workspace }}/CodeAssist-pmOS-musl-arm64.tar.gz *
41+
42+
- name: Upload Musl Artifact
4443
uses: actions/upload-artifact@v4
4544
with:
46-
name: CodeAssist-Linux-arm64
47-
path: CodeAssist-Linux-arm64.tar.gz
45+
name: CodeAssist-pmOS-musl-arm64
46+
path: CodeAssist-pmOS-musl-arm64.tar.gz

0 commit comments

Comments
 (0)