diff options
| author | 2026-01-20 14:09:06 +0800 | |
|---|---|---|
| committer | 2026-01-20 14:09:06 +0800 | |
| commit | d2624887ca74e77ad524098c38114e3a7c91f065 (patch) | |
| tree | 530174ba55187e2c74700e8f402c05662a26f998 /.github/workflows | |
| parent | cf71adf8b02397ff14445c8f8b659ee519c60c50 (diff) | |
| download | DropOut-d2624887ca74e77ad524098c38114e3a7c91f065.tar.gz DropOut-d2624887ca74e77ad524098c38114e3a7c91f065.zip | |
fix(ci): Enable cross compilation for musl builds and streamline dependency installation
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/semifold-ci.yaml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/.github/workflows/semifold-ci.yaml b/.github/workflows/semifold-ci.yaml index 89d9e7e..b820a78 100644 --- a/.github/workflows/semifold-ci.yaml +++ b/.github/workflows/semifold-ci.yaml @@ -28,6 +28,7 @@ jobs: name: "Linux x86_64 (Musl)" target: "x86_64-unknown-linux-musl" args: "--target x86_64-unknown-linux-musl" + use-cross: true - platform: "ubuntu-24.04-arm" name: "Linux arm64" target: "aarch64-unknown-linux-gnu" @@ -65,9 +66,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libfuse2 - if [ "${{ matrix.target }}" = "x86_64-unknown-linux-musl" ]; then - sudo apt-get install -y musl-tools pkg-config - fi - name: Install pnpm uses: pnpm/action-setup@v4 @@ -87,6 +85,10 @@ jobs: with: targets: ${{ matrix.target }} + - name: Install cross (for musl builds) + if: matrix.use-cross == true + run: cargo install cross + - name: Rust Cache uses: swatinem/rust-cache@v2 with: @@ -109,9 +111,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RUSTFLAGS: ${{ matrix.rustflags || '' }} - PKG_CONFIG_PATH: ${{ (matrix.target == 'x86_64-unknown-linux-musl') && '/usr/lib/x86_64-linux-musl/pkgconfig' || '' }} + CARGO_BUILD_TARGET: ${{ matrix.target }} with: args: ${{ matrix.args }} + command: ${{ matrix.use-cross && 'cross' || 'cargo' }} - name: Fix AppImage for Wayland (Linux) if: startsWith(matrix.platform, 'ubuntu') && !startsWith(matrix.platform, 'macos') && !startsWith(matrix.platform, 'windows') |