8 Commits

Author SHA1 Message Date
fdf6f7561f Fix CI 2026-04-05 15:46:18 +08:00
7b340492e2 Fix ci 2026-04-05 15:44:43 +08:00
692f9faca1 Handle zig can not compile libjxl 2026-04-05 15:42:09 +08:00
96f0471d66 Fix missing cmake 2026-04-05 15:27:22 +08:00
221f19f00b Fix ci 2026-04-05 15:19:27 +08:00
0aa5ee543a Fix ci 2026-04-05 15:16:05 +08:00
d5f8193418 remove rustup because image don't have rustup 2026-04-05 14:55:14 +08:00
2c510d5285 Update macos release ci 2026-04-05 14:51:14 +08:00
3 changed files with 5 additions and 28 deletions

View File

@@ -54,36 +54,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Rust
run: |
rustup update
rustup target add ${{ matrix.arch }}
- name: Set up Zig
uses: goto-bus-stop/setup-zig@v2
- name: Install cargo-zigbuild
run: cargo install cargo-zigbuild --locked
- name: Build project
run: |
target=${{ matrix.arch }}
case "${target}" in
aarch64-apple-darwin)
zig_target="aarch64-macos"
;;
x86_64-apple-darwin)
zig_target="x86_64-macos"
;;
*)
echo "Unsupported target: ${target}"
exit 1
;;
esac
target_env=${target//-/_}
export "CC_${target_env}=zig cc -target ${zig_target}"
export "CXX_${target_env}=zig c++ -target ${zig_target}"
export "AR_${target_env}=zig ar"
cargo zigbuild --release --target "${target}"
docker run --rm -v $(pwd):/io -w /io ghcr.io/rust-cross/cargo-zigbuild /bin/bash -c 'apt-get update && apt-get install -y cmake && cargo zigbuild --release --target ${{ matrix.arch }} --no-default-features -F zig'
version=${{ github.event.release.tag_name }}
cd target/${{ matrix.arch }}/release

View File

@@ -61,6 +61,8 @@ zstd = { version = "0.13", optional = true }
[features]
default = ["all-fmt", "image-jpg", "image-jxl", "image-webp", "audio-flac", "jieba"]
# Zig can not build libjxl
zig = ["all-fmt", "image-jpg", "image-webp", "audio-flac", "jieba"]
all-fmt = ["all-script", "all-img", "all-arc", "all-audio"]
all-script = ["artemis", "artemis-panmimisoft", "bgi", "cat-system", "circus", "entis-gls", "escude", "ex-hibit", "favorite", "hexen-haus", "kirikiri", "musica", "qlie", "silky", "softpal", "will-plus", "yaneurao", "yaneurao-itufuru"]
all-img = ["bgi-img", "cat-system-img", "circus-img", "emote-img", "hexen-haus-img", "kirikiri-img", "qlie-img", "softpal-img", "will-plus-img"]

View File

@@ -3,6 +3,8 @@ import subprocess
import sys
def filter_name(name):
if name == 'zig':
return False
if name.startswith("utils-"):
return False
if name.startswith("all-"):