Enable native-tls on non-cross build & pkg-config on x86_64 linux gnu

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-23 21:29:41 +10:00
parent 272d049cf6
commit 1df00e5ba8
No known key found for this signature in database
GPG key ID: 591C0B03040416D6
2 changed files with 165 additions and 10 deletions

View file

@ -23,21 +23,25 @@ jobs:
output: cargo-binstall
use-cross: false
test: true
debug_build_args: --features pkg-config,native-tls
- target: x86_64-apple-darwin
os: macos-latest
output: cargo-binstall
use-cross: false
test: true
debug_build_args: --features native-tls
- target: aarch64-apple-darwin
os: macos-latest
output: cargo-binstall
use-cross: false
test: false
debug_build_args: --features native-tls
- target: x86_64-pc-windows-msvc
os: windows-latest
output: cargo-binstall.exe
use-cross: false
test: false
debug_build_args: --features native-tls
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
output: cargo-binstall
@ -93,18 +97,10 @@ jobs:
- name: Build debug
uses: actions-rs/cargo@v1
if: ${{ ! startsWith(github.ref, 'refs/tags/v') && matrix.use-cross }}
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
with:
command: build
args: --target ${{ matrix.target }} --no-default-features --features pkg-config,native-tls
- name: Build debug with cross compilation
uses: actions-rs/cargo@v1
if: ${{ ! startsWith(github.ref, 'refs/tags/v') && matrix.use-cross }}
with:
command: build
args: --target ${{ matrix.target }} --no-default-features --features rustls
use-cross: true
args: --target ${{ matrix.target }} --no-default-features ${{ matrix.debug_build_args }}
- name: Copy and rename utility
if: ${{ startsWith(github.ref, 'refs/tags/v') }}