Skip to content

Commit ab9e135

Browse files
committed
Use preinstalled rust & CARGO_INCREMENTAL=0
1 parent 89a5327 commit ab9e135

File tree

2 files changed

+10
-43
lines changed

2 files changed

+10
-43
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ jobs:
1111
os: [ubuntu-latest, macOS-latest, windows-latest]
1212
steps:
1313
- uses: actions/checkout@v6
14-
- name: Install `rust` toolchain
15-
run: |
16-
## Install `rust` toolchain
17-
rustup toolchain install stable --no-self-update -c rustfmt --profile minimal
18-
rustup default stable
19-
2014
# For bindgen: https://github.com/rust-lang/rust-bindgen/issues/1797
2115
- uses: KyleMayes/install-llvm-action@v2
2216
if: matrix.os == 'windows-latest'
@@ -28,6 +22,7 @@ jobs:
2822

2923
- name: Check
3024
run: |
25+
export CARGO_INCREMENTAL=0
3126
cargo check --all --all-features
3227
3328
test:
@@ -38,12 +33,6 @@ jobs:
3833
os: [ubuntu-latest, macOS-latest, windows-latest]
3934
steps:
4035
- uses: actions/checkout@v6
41-
- name: Install `rust` toolchain
42-
run: |
43-
## Install `rust` toolchain
44-
rustup toolchain install stable --no-self-update -c rustfmt --profile minimal
45-
rustup default stable
46-
4736
# For bindgen: https://github.com/rust-lang/rust-bindgen/issues/1797
4837
- uses: KyleMayes/install-llvm-action@v2
4938
if: matrix.os == 'windows-latest'
@@ -55,38 +44,27 @@ jobs:
5544

5645
- name: Test
5746
run: |
58-
cargo test
47+
CARGO_INCREMENTAL=0 cargo test
5948
6049
fmt:
6150
name: cargo fmt --all -- --check
6251
runs-on: ubuntu-latest
6352
steps:
6453
- uses: actions/checkout@v6
65-
- name: Install `rust` toolchain
66-
run: |
67-
## Install `rust` toolchain
68-
rustup toolchain install stable --no-self-update -c rustfmt --profile minimal
69-
rustup default stable
70-
7154
- run: rustup component add rustfmt
7255
- name: cargo fmt
7356
run: |
74-
cargo fmt --all -- --check
57+
CARGO_INCREMENTAL=0 cargo fmt --all -- --check
7558
7659
clippy:
7760
name: cargo clippy -- -D warnings
7861
runs-on: ubuntu-latest
7962
steps:
8063
- uses: actions/checkout@v6
81-
- name: Install `rust` toolchain
82-
run: |
83-
## Install `rust` toolchain
84-
rustup toolchain install stable --no-self-update -c rustfmt --profile minimal
85-
rustup default stable
8664
- run: rustup component add clippy
8765
- name: cargo clippy
8866
run: |
89-
cargo clippy --all-targets -- -D warnings
67+
CARGO_INCREMENTAL=0 cargo clippy --all-targets -- -D warnings
9068
9169
grcov:
9270
name: Code coverage
@@ -102,16 +80,13 @@ jobs:
10280
steps:
10381
- name: Checkout source code
10482
uses: actions/checkout@v6
105-
106-
- name: Install `rust` toolchain
107-
run: |
108-
rustup toolchain install nightly --no-self-update -c rustfmt --profile minimal
109-
rustup default nightly
110-
11183
- name: Install cargo-llvm-cov
11284
uses: taiki-e/install-action@cargo-llvm-cov
11385
- name: Generate code coverage
114-
run: cargo llvm-cov --all-features --lcov --branch --output-path lcov.info
86+
run: |
87+
export RUSTC_BOOTSTRAP=1 # Use -Z
88+
export CARGO_INCREMENTAL=0
89+
cargo llvm-cov --all-features --lcov --branch --output-path lcov.info
11590
11691
- name: Upload coverage as artifact
11792
uses: actions/upload-artifact@v6

.github/workflows/compat.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ jobs:
2929
git config submodule.gnulib.url https://github.com/coreutils/gnulib.git
3030
git submodule update --init --recursive --depth 1
3131
working-directory: findutils.gnu
32-
- name: Install `rust` toolchain
33-
run: |
34-
## Install `rust` toolchain
35-
rustup toolchain install stable --no-self-update -c rustfmt --profile minimal
36-
rustup default stable
3732
- name: Install dependencies
3833
shell: bash
3934
run: |
@@ -45,6 +40,7 @@ jobs:
4540
shell: bash
4641
run: |
4742
cd findutils
43+
export CARGO_INCREMENTAL=0
4844
bash util/build-gnu.sh ||:
4945
- name: Extract testing info
5046
shell: bash
@@ -126,11 +122,6 @@ jobs:
126122
repository: tavianator/bfs
127123
path: bfs
128124
ref: "4.0"
129-
- name: Install `rust` toolchain
130-
run: |
131-
## Install `rust` toolchain
132-
rustup toolchain install stable --no-self-update -c rustfmt --profile minimal
133-
rustup default stable
134125
- name: Install dependencies
135126
shell: bash
136127
run: |
@@ -142,6 +133,7 @@ jobs:
142133
shell: bash
143134
run: |
144135
cd findutils
136+
export CARGO_INCREMENTAL=0
145137
bash util/build-bfs.sh ||:
146138
- name: Upload bfs-test-report
147139
uses: actions/upload-artifact@v6

0 commit comments

Comments
 (0)