mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-06 04:48:54 +08:00
Compare commits
8 Commits
30d2ec7ba4
...
fdf6f7561f
| Author | SHA1 | Date | |
|---|---|---|---|
| fdf6f7561f | |||
| 7b340492e2 | |||
| 692f9faca1 | |||
| 96f0471d66 | |||
| 221f19f00b | |||
| 0aa5ee543a | |||
| d5f8193418 | |||
| 2c510d5285 |
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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-"):
|
||||
|
||||
Reference in New Issue
Block a user