Skip to content

Commit ba93c44

Browse files
authored
ci: link with mold (#11776)
Add `rui314/setup-mold` to set `mold` as the default linker wherever we build any code. This makes linking a lot faster for dylibs (proc macros) and the final binaries.
1 parent 5d7b6e1 commit ba93c44

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

.github/workflows/benchmarks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
with:
4848
toolchain: stable
4949

50+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
51+
5052
- name: Cache Rust dependencies
5153
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2
5254
with:

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
3333
with:
3434
toolchain: stable
35+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
3536
- name: Install gcc aarch64
3637
id: aarch_64_setup
3738
run: |

.github/workflows/nextest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
with:
6666
toolchain: stable
6767
target: ${{ matrix.target }}
68+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
6869
- uses: taiki-e/install-action@cd39cb0572834c149bf3533a143f05e09def0f3c # v2
6970
with:
7071
tool: nextest

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ jobs:
145145
with:
146146
toolchain: stable
147147
targets: ${{ matrix.target }}
148+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
148149

149150
- name: Apple M1 setup
150151
if: matrix.target == 'aarch64-apple-darwin'

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
3838
with:
3939
toolchain: nightly
40+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
4041
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2
4142
with:
4243
cache-on-failure: true
@@ -79,6 +80,7 @@ jobs:
7980
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
8081
with:
8182
toolchain: stable
83+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
8284
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2
8385
with:
8486
cache-on-failure: true
@@ -108,6 +110,7 @@ jobs:
108110
with:
109111
toolchain: nightly
110112
components: clippy
113+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
111114
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2
112115
with:
113116
cache-on-failure: true
@@ -142,6 +145,7 @@ jobs:
142145
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
143146
with:
144147
toolchain: stable
148+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
145149
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2
146150
with:
147151
cache-on-failure: true
@@ -161,6 +165,7 @@ jobs:
161165
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
162166
with:
163167
toolchain: stable
168+
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
164169
- uses: taiki-e/install-action@cd39cb0572834c149bf3533a143f05e09def0f3c # v2
165170
with:
166171
tool: cargo-hack

0 commit comments

Comments
 (0)