Skip to content

Commit 2d60006

Browse files
committed
feat(ci): use mold linker
1 parent 0edd863 commit 2d60006

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/coprocessor-cargo-clippy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
checks: 'write' # Required to create GitHub checks for test results
4040
packages: 'read' # Required to read GitHub packages/container registry
4141
runs-on: large_ubuntu_16
42+
env:
43+
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
44+
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
4245
steps:
4346
- name: Checkout code
4447
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -58,7 +61,7 @@ jobs:
5861
- name: Install dependencies
5962
run: |
6063
sudo apt-get update
61-
sudo apt-get install -y protobuf-compiler
64+
sudo apt-get install -y protobuf-compiler mold clang
6265
6366
- name: Install foundry
6467
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c

.github/workflows/coprocessor-cargo-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
packages: 'read' # Required to read GitHub packages/container registry
4242
pull-requests: 'write' # Required to post coverage comment on PR
4343
runs-on: large_ubuntu_16
44+
env:
45+
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
46+
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
4447
steps:
4548
- name: Checkout code
4649
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -65,7 +68,7 @@ jobs:
6568
- name: Install cargo dependencies
6669
run: |
6770
sudo apt-get update
68-
sudo apt-get install -y protobuf-compiler && \
71+
sudo apt-get install -y protobuf-compiler mold clang && \
6972
cargo install sqlx-cli --version 0.7.2 --no-default-features --features postgres --locked
7073
7174
- name: Install foundry

.github/workflows/coprocessor-gpu-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ permissions: {}
66
env:
77
CARGO_TERM_COLOR: always
88
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
9-
RUSTFLAGS: "-C target-cpu=native"
9+
RUSTFLAGS: "-C target-cpu=native -C link-arg=-fuse-ld=mold"
10+
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
1011
RUST_BACKTRACE: "full"
1112
RUST_MIN_STACK: "8388608"
1213
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
@@ -134,7 +135,7 @@ jobs:
134135
run: |
135136
sudo apt-get update
136137
sudo apt-get install -y protobuf-compiler cmake pkg-config libssl-dev \
137-
libclang-dev docker-compose-v2 docker.io acl
138+
libclang-dev docker-compose-v2 docker.io acl mold clang
138139
sudo usermod -aG docker "$USER"
139140
newgrp docker
140141
sudo setfacl --modify user:"$USER":rw /var/run/docker.sock

0 commit comments

Comments
 (0)