Skip to content

Commit b098a33

Browse files
committed
fix(ci): improve compilation speed
1 parent b2b5747 commit b098a33

4 files changed

Lines changed: 25 additions & 1 deletion

File tree

.cargo/mutants.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
profile = "mutants"
2+
13
exclude_globs = [
24
"src/passes/codegen.rs", # Until LLVM snapshot tests are implemented.
35
"src/ty/solver.rs", # Until solver is hardened and tested.

.github/actions/setup/action.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@ inputs:
88
llvm-version:
99
description: Version of LLVM to install.
1010
required: true
11+
tmpfs-path:
12+
description: Path to tmpfs
13+
default: /ram
14+
required: false
1115

1216
runs:
1317
using: composite
1418
steps:
19+
- name: Setup tmpfs
20+
shell: bash
21+
run: |
22+
sudo mkdir '${{ inputs.tmpfs-path }}'
23+
sudo mount -t tmpfs '${{ inputs.tmpfs-path }}' '${{ inputs.tmpfs-path }}'
24+
sudo chmod 1777 '${{ inputs.tmpfs-path }}'
25+
1526
- name: Install LLVM Dependencies
1627
shell: bash
1728
run: |
@@ -31,3 +42,5 @@ runs:
3142
rustup toolchain install stable --profile minimal --no-self-update
3243
3344
- uses: Swatinem/rust-cache@v2
45+
46+
# spell-checker:ignore libtinfo,Swatinem,tmpfs

.github/workflows/ci.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: "always"
11+
CARGO_INCREMENTAL: 0
1112
LLVM_PATH: "${{ github.workspace }}/llvm"
1213
LLVM_VERSION: "18.1"
14+
TMPDIR: "/ram"
1315

1416
jobs:
1517
test:
@@ -22,6 +24,7 @@ jobs:
2224
with:
2325
llvm-version: ${{ env.LLVM_VERSION }}
2426
llvm-path: ${{ env.LLVM_PATH }}
27+
tmpfs-path: /ram
2528

2629
- name: Install cargo-llvm-cov and nextest
2730
uses: taiki-e/install-action@v2
@@ -60,6 +63,7 @@ jobs:
6063
with:
6164
llvm-version: ${{ env.LLVM_VERSION }}
6265
llvm-path: ${{ env.LLVM_PATH }}
66+
tmpfs-path: /ram
6367

6468
- name: Run clippy
6569
run: |
@@ -87,6 +91,7 @@ jobs:
8791
with:
8892
llvm-version: ${{ env.LLVM_VERSION }}
8993
llvm-path: ${{ env.LLVM_PATH }}
94+
tmpfs-path: /ram
9095

9196
- name: Install cargo-mutants and nextest
9297
uses: taiki-e/install-action@v2
@@ -101,4 +106,4 @@ jobs:
101106
name: mutants-out
102107
path: mutants.out
103108

104-
# spell-checker:ignore libtinfo,Swatinem
109+
# spell-checker:ignore tmpfs

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ thiserror = "2.0.17"
1212
insta = "1.46.0"
1313
mockall = "0.14.0"
1414
rstest = "0.26.1"
15+
16+
[profile.mutants]
17+
inherits = "test"
18+
debug = "none"

0 commit comments

Comments
 (0)