File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " Install Rust"
2+ description : " Install Rust"
3+ inputs :
4+ components :
5+ description : " Comma-separated list of components to install (e.g. clippy, rustfmt)"
6+ default : " "
7+ runs :
8+ using : " composite"
9+ steps :
10+ - name : install rust
11+ shell : bash
12+ run : |
13+ set -e
14+
15+ args=(--no-self-update --profile=minimal)
16+ if [ -n "${{ inputs.components }}" ]; then
17+ args+=(--component ${{ inputs.components }})
18+ fi
19+
20+ rustup toolchain install ${{ env.CI_RUST_VERSION }} "${args[@]}"
21+ rustup override set ${{ env.CI_RUST_VERSION }}
Original file line number Diff line number Diff line change 99 CARGO_INCREMENTAL : false
1010 CARGO_TERM_COLOR : always
1111 RUST_BACKTRACE : short
12+ CI_RUST_VERSION : " 1.94"
1213
1314jobs :
1415 fmt :
1718 steps :
1819 - uses : actions/checkout@v4
1920
21+ - uses : ./.github/actions/install-rust
22+ with :
23+ components : rustfmt
24+
2025 - run : cargo fmt --all -- --check
2126
2227 check :
2934 steps :
3035 - uses : actions/checkout@v4
3136
37+ - uses : ./.github/actions/install-rust
38+ with :
39+ components : clippy
40+
3241 - run : cargo clippy --workspace --all-targets -- -D warnings
3342
3443 - run : cargo doc --workspace --no-deps
4958 steps :
5059 - uses : actions/checkout@v4
5160
61+ - uses : ./.github/actions/install-rust
62+
5263 - name : Install cargo-nextest
5364 uses : taiki-e/install-action@nextest
5465
7687 steps :
7788 - uses : actions/checkout@v4
7889
90+ - uses : ./.github/actions/install-rust
91+
7992 - name : (Linux) Install Mesa
8093 if : runner.os == 'Linux'
8194 uses : ./.github/actions/install-mesa
You can’t perform that action at this time.
0 commit comments