mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Use rust-lld
in CI (#1253)
Which guarantees: - faster linking on all targets when `cargo-zigbuild` is not used - allow cross-lang-lto to be enabled Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
435df675b3
commit
1e4e0d166d
2 changed files with 25 additions and 0 deletions
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
|
@ -38,11 +38,18 @@ jobs:
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
env:
|
env:
|
||||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- name: Use rust-lld
|
||||||
|
run: |
|
||||||
|
echo "CARGO_TARGET_${CARGO_BUILD_TARGET}_LINKER=rust-lld" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- uses: ./.github/actions/just-setup
|
- uses: ./.github/actions/just-setup
|
||||||
env:
|
env:
|
||||||
# just-setup use binstall to install sccache,
|
# just-setup use binstall to install sccache,
|
||||||
|
@ -74,10 +81,17 @@ jobs:
|
||||||
- target: aarch64-pc-windows-msvc
|
- target: aarch64-pc-windows-msvc
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
env:
|
env:
|
||||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- name: Use rust-lld
|
||||||
|
run: |
|
||||||
|
echo "CARGO_TARGET_${CARGO_BUILD_TARGET}_LINKER=rust-lld" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- uses: ./.github/actions/just-setup
|
- uses: ./.github/actions/just-setup
|
||||||
with:
|
with:
|
||||||
tools: cargo-hack
|
tools: cargo-hack
|
||||||
|
@ -107,6 +121,9 @@ jobs:
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: ./.github/actions/just-setup
|
- uses: ./.github/actions/just-setup
|
||||||
|
|
8
.github/workflows/release-build.yml
vendored
8
.github/workflows/release-build.yml
vendored
|
@ -42,6 +42,9 @@ jobs:
|
||||||
|
|
||||||
name: ${{ matrix.t }}
|
name: ${{ matrix.t }}
|
||||||
runs-on: ${{ matrix.o }}
|
runs-on: ${{ matrix.o }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
env:
|
env:
|
||||||
CARGO_BUILD_TARGET: ${{ matrix.t }}
|
CARGO_BUILD_TARGET: ${{ matrix.t }}
|
||||||
GLIBC_VERSION: ${{ matrix.g }}
|
GLIBC_VERSION: ${{ matrix.g }}
|
||||||
|
@ -60,6 +63,10 @@ jobs:
|
||||||
if: inputs.CARGO_PROFILE_RELEASE_CODEGEN_UNITS
|
if: inputs.CARGO_PROFILE_RELEASE_CODEGEN_UNITS
|
||||||
run: echo "CARGO_PROFILE_RELEASE_CODEGEN_UNITS=${{ inputs.CARGO_PROFILE_RELEASE_CODEGEN_UNITS }}" >> "$GITHUB_ENV"
|
run: echo "CARGO_PROFILE_RELEASE_CODEGEN_UNITS=${{ inputs.CARGO_PROFILE_RELEASE_CODEGEN_UNITS }}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Use rust-lld
|
||||||
|
run: |
|
||||||
|
echo "CARGO_TARGET_${CARGO_BUILD_TARGET}_LINKER=rust-lld" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- uses: ./.github/actions/just-setup
|
- uses: ./.github/actions/just-setup
|
||||||
with:
|
with:
|
||||||
tools: cargo-auditable
|
tools: cargo-auditable
|
||||||
|
@ -73,6 +80,7 @@ jobs:
|
||||||
|
|
||||||
- run: just package
|
- run: just package
|
||||||
- if: runner.os == 'Windows'
|
- if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
run: Get-ChildItem packages/
|
run: Get-ChildItem packages/
|
||||||
- if: runner.os != 'Windows'
|
- if: runner.os != 'Windows'
|
||||||
run: ls -shal packages/
|
run: ls -shal packages/
|
||||||
|
|
Loading…
Add table
Reference in a new issue