1111 RUSTUP_MAX_RETRIES : 10
1212
1313jobs :
14- setup_cargo :
14+ build_metrics :
1515 if : github.repository == 'rust-lang/rust-analyzer'
1616 runs-on : ubuntu-latest
17+
1718 steps :
1819 - name : Install Rust toolchain
1920 run : |
2021 rustup update --no-self-update stable
2122 rustup default stable
22- rustup component add --toolchain stable rustfmt rust-src
23-
24- - name : Cache cargo
25- uses : Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012
26- with :
27- key : ${{ runner.os }}-cargo-${{ github.sha }}
28- cache-targets : " false"
23+ rustup component add --toolchain stable rust-src
2924
30- build_metrics :
31- runs-on : ubuntu-latest
32- needs : setup_cargo
33-
34- steps :
3525 - name : Checkout repository
3626 uses : actions/checkout@v4
3727
3828 - name : Restore cargo cache
39- uses : Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012
29+ uses : Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
4030 with :
4131 key : ${{ runner.os }}-cargo-${{ github.sha }}
4232 cache-targets : " false"
4535 run : cargo xtask metrics build
4636
4737 - name : Cache target
48- uses : Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012
38+ uses : Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
4939 with :
5040 key : ${{ runner.os }}-cargo-${{ github.sha }}
5141 cache-targets : " true"
@@ -62,14 +52,20 @@ jobs:
6252 matrix :
6353 names : [self, ripgrep-13.0.0, webrender-2022, diesel-1.4.8, hyper-0.14.18]
6454 runs-on : ubuntu-latest
65- needs : [setup_cargo, build_metrics]
55+ needs : build_metrics
6656
6757 steps :
58+ - name : Install Rust toolchain
59+ run : |
60+ rustup update --no-self-update stable
61+ rustup default stable
62+ rustup component add --toolchain stable rust-src
63+
6864 - name : Checkout repository
6965 uses : actions/checkout@v4
7066
7167 - name : Restore cargo cache
72- uses : Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012
68+ uses : Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
7369 with :
7470 key : ${{ runner.os }}-cargo-${{ github.sha }}
7571 cache-targets : " true"
0 commit comments