Fix CI: Only turn on feature pkg-config on linux and fix cross compilation (#815)

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-02-17 22:07:24 +11:00 committed by GitHub
parent 61c992612c
commit 9923788f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -38,13 +38,14 @@ jobs:
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
c: true
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
CARGO_BINSTALL_LOG_LEVEL: debug
JUST_USE_CARGO_ZIGBUILD: ${{ matrix.c }}
steps:
- uses: actions/checkout@v3

View file

@ -63,7 +63,7 @@ cargo-no-default-features := if default-features == "false" { " --no-default-fea
} else { "" }
support-pkg-config := if target == target-host {
if target-os != "windows" { "true" } else { "" }
if target-os == "linux" { "true" } else { "" }
} else { "" }
cargo-features := trim_end_match(if override-features != "" { override-features