Repository navigation
Update desktop.yml #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Pure Musl Desktop for pmOS (ARM64) | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build-pure-musl: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Native Alpine musl JDK | |
| run: | | |
| docker run --rm \ | |
| -v ${{ github.workspace }}:/work \ | |
| -w /work \ | |
| alpine:edge sh -c " | |
| set -e | |
| apk update | |
| apk add openjdk21-jdk git bash binutils fakeroot | |
| # 1. 彻底递归清除所有源码/配置(包括 build-logic/**/*.kt)中的 JetBrains vendor 限制 | |
| find . -type f \( -name '*.kt' -o -name '*.kts' -o -name '*.gradle' -o -name '*.properties' \) -exec sed -i -E \ | |
| -e 's/JvmVendorSpec\.JETBRAINS/JvmVendorSpec.any()/g' \ | |
| -e 's/vendor\.set\([^)]*\)//g' \ | |
| -e 's/vendor\s*=\s*JvmVendorSpec\.[A-Za-z0-9_]+/vendor = JvmVendorSpec.any()/g' \ | |
| {} + 2>/dev/null || true | |
| # 2. 传入 Alpine 原生 JDK 执行纯 musl 桌面构建 | |
| ./gradlew :app:ide-desktop:createDistributable \ | |
| -Pkotlin.native.ignoreDisabledTargets=true \ | |
| -Porg.gradle.java.installations.auto-download=false \ | |
| -Porg.gradle.java.installations.paths=/usr/lib/jvm/java-21-openjdk \ | |
| --stacktrace | |
| " | |
| - name: Package Tarball | |
| run: | | |
| cd app/ide-desktop/build/compose/binaries/main/app/ | |
| tar -czvf ${{ github.workspace }}/CodeAssist-pmOS-pure-musl-arm64.tar.gz * | |
| - name: Upload Pure Musl Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CodeAssist-pmOS-pure-musl-arm64 | |
| path: CodeAssist-pmOS-pure-musl-arm64.tar.gz |