Skip to content

ci: rewrite build workflows#2089

Merged
KKRainbow merged 15 commits intoEasyTier:mainfrom
ZnqbuZ:ci/zigbuild
Apr 12, 2026
Merged

ci: rewrite build workflows#2089
KKRainbow merged 15 commits intoEasyTier:mainfrom
ZnqbuZ:ci/zigbuild

Conversation

@ZnqbuZ
Copy link
Copy Markdown
Contributor

@ZnqbuZ ZnqbuZ commented Apr 8, 2026

重写 CI 构建配置文件

  • 用 zigbuild 编译所有需要交叉编译的目标,简化环境搭建
  • 用 mold 链接 native linux 目标
  • 用 arm runner 运行 aarch64 目标的构建
  • 给 aarch64 linux 构建了 GUI 的 AppImage 包
  • 拆分 apk,不再提供 universal 而是用 matrix 分别构建
  • 为之前没有添加 upx 压缩的几个目标添加压缩
  • 修正了 build.rs 中对 cfg(target_os) 的误用
  • etc.

freebsd 的构建消耗时间减半;GUI 的 windows arm 目标构建用时减少一些;使用 zigbuild 进行交叉编译的目标用时均增加一分钟;其他 target 基本不变

@ZnqbuZ ZnqbuZ marked this pull request as ready for review April 8, 2026 15:39
Copilot AI review requested due to automatic review settings April 8, 2026 15:39
@ZnqbuZ ZnqbuZ closed this Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Core GitHub Actions workflow to switch the FreeBSD build from a FreeBSD VM-based build to a Zig-based cross-compilation approach (via cargo-zigbuild), and adjusts some workflow formatting.

Changes:

  • Removes most target entries from the build matrix, leaving only x86_64-unknown-freebsd.
  • Adds mlugg/setup-zig and installs cargo-zigbuild to support Zig-based cross compilation.
  • Replaces the FreeBSD VM action step with a direct cargo zigbuild-based build on Ubuntu.
Comments suppressed due to low confidence (2)

.github/workflows/core.yml:66

  • The build matrix now only includes the FreeBSD target. Downstream jobs in this workflow (e.g., magisk_build) and any releases that expect Linux/macOS/Windows artifacts will no longer have those artifacts available, which will cause this workflow to fail or publish incomplete releases. If the intent is to switch how targets are built (via zigbuild) rather than to drop platforms, re-add the removed targets to the matrix (or update downstream consumers to match the reduced artifact set).
    strategy:
      fail-fast: true
      matrix:
        include:
          - TARGET: x86_64-unknown-freebsd
            OS: ubuntu-22.04
            ARTIFACT_NAME: freebsd-13.2-x86_64
            BSD_VERSION: 13.2

.github/workflows/core.yml:66

  • BSD_VERSION is still defined in the matrix but is no longer used after removing the FreeBSD VM action inputs. Consider removing it (or using it to parameterize the target environment) to avoid confusion about which FreeBSD version the artifact is built against.
          - TARGET: x86_64-unknown-freebsd
            OS: ubuntu-22.04
            ARTIFACT_NAME: freebsd-13.2-x86_64
            BSD_VERSION: 13.2


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/core.yml Outdated
@ZnqbuZ ZnqbuZ changed the title Ci/zigbuild ci: rewrite build workflows Apr 9, 2026
@ZnqbuZ ZnqbuZ reopened this Apr 9, 2026
@ZnqbuZ ZnqbuZ requested a review from Copilot April 9, 2026 20:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/core.yml Outdated
Comment thread easytier/Cargo.toml
Comment thread easytier-web/Cargo.toml
Comment thread easytier-gui/src-tauri/Cargo.toml
Comment thread .github/actions/prepare-build/action.yml
Comment thread .github/actions/prepare-build/action.yml
Comment thread .github/workflows/mobile.yml
Comment thread .github/workflows/mobile.yml
ZnqbuZ added 6 commits April 9, 2026 22:20
features

rearrange matrix

rustflags in config.toml

config.toml: linker

c

p

c
core compress

core.yml
core: use actions-rust-lang/setup-rust-toolchain@v1
gui: arm os

armos

gui collect

dll
@KKRainbow
Copy link
Copy Markdown
Member

upx的行为不要改了,都是踩坑踩出来的,不是报毒就是用不了

@ZnqbuZ
Copy link
Copy Markdown
Contributor Author

ZnqbuZ commented Apr 10, 2026

Windows Defender 确实报毒,riscv64 和 web, web-embed 的压缩我用虚拟机测一下试试

@ZnqbuZ
Copy link
Copy Markdown
Contributor Author

ZnqbuZ commented Apr 10, 2026

qemu 跑了 x86_64-unknown-linux-musl, aarch64-unknown-linux-musl, riscv64gc-unknown-linux-musl, armv7-unknown-linux-musleabihf, arm-unknown-linux-musleabihf 的所有四个产物,都能运行

@KKRainbow
Copy link
Copy Markdown
Member

mips 应该跑不了吧?

@KKRainbow
Copy link
Copy Markdown
Member

而且之前我遇到的情况是我用 qemu 能跑起来,一上板子就跪了

@ZnqbuZ
Copy link
Copy Markdown
Contributor Author

ZnqbuZ commented Apr 10, 2026

mips 应该跑不了吧?

mips 原本就有压缩,新增的 target 只有 riscv64

而且之前我遇到的情况是我用 qemu 能跑起来,一上板子就跪了

那这有点麻烦……现在 upx 的修改是 version 更新到 5.1.1,增加了 web 和 web-embed 的压缩,并且给 riscv64 也压缩,如果 core 和 cli 之前没问题,那 web 和 web-embed 应该也没问题?

@KKRainbow
Copy link
Copy Markdown
Member

upx/upx#895
mips 的看起来是修掉了

@KKRainbow
Copy link
Copy Markdown
Member

windows 报毒还是很头疼的,要不把 windows 的 upx 关掉吧,win 上感觉也没啥必要压缩

@ZnqbuZ
Copy link
Copy Markdown
Contributor Author

ZnqbuZ commented Apr 10, 2026

我上一个提交已经关了

@ZnqbuZ
Copy link
Copy Markdown
Contributor Author

ZnqbuZ commented Apr 10, 2026

我申请了一个 RISCV Builder 的 GitHub App,我先在我自己的 fork 上试试


一直卡在 Waiting for a runner to pick up this job...,还是算了

@ZnqbuZ ZnqbuZ marked this pull request as draft April 10, 2026 15:56
@ZnqbuZ ZnqbuZ marked this pull request as ready for review April 10, 2026 16:05
@KKRainbow KKRainbow merged commit 9e0a3b6 into EasyTier:main Apr 12, 2026
78 checks passed
@ZnqbuZ ZnqbuZ deleted the ci/zigbuild branch April 12, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants