Skip to content

ci: use mold linker for faster CI builds #248

ci: use mold linker for faster CI builds

ci: use mold linker for faster CI builds #248

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings -C link-arg=-fuse-ld=mold
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install mold linker
uses: rui314/setup-mold@v1
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Build debug
run: cargo build --all --verbose
- name: Build release
run: cargo build --all --release --verbose