Skip to content

Commit ce39fa3

Browse files
authored
Use mold for building tests (#6436)
1 parent 228d4b2 commit ce39fa3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/rust.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ jobs:
2525
uses: arduino/setup-protoc@v3
2626
with:
2727
repo-token: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Install mold
29+
uses: rui314/setup-mold@v1
30+
- name: Enable mold on Linux
31+
run: |
32+
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
33+
mkdir .cargo
34+
echo "[target.x86_64-unknown-linux-gnu]" >> .cargo/config.toml
35+
echo "linker = \"clang\"" >> .cargo/config.toml
36+
echo "rustflags = [\"-C\", \"link-arg=-fuse-ld=/usr/local/bin/mold\"]" >> .cargo/config.toml
37+
fi
38+
shell: bash
2839
- name: Install nextest
2940
uses: taiki-e/install-action@nextest
3041
- name: Build

0 commit comments

Comments
 (0)