mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-31 23:38:45 +00:00
Auto merge of #17238 - Veykril:metrics-caching, r=Veykril
Fix metrics workflow not actually updating the toolchain The install won't persist across jobs
This commit is contained in:
commit
8772b865c9
1 changed files with 13 additions and 17 deletions
30
.github/workflows/metrics.yaml
vendored
30
.github/workflows/metrics.yaml
vendored
|
@ -11,32 +11,22 @@ env:
|
||||||
RUSTUP_MAX_RETRIES: 10
|
RUSTUP_MAX_RETRIES: 10
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup_cargo:
|
build_metrics:
|
||||||
if: github.repository == 'rust-lang/rust-analyzer'
|
if: github.repository == 'rust-lang/rust-analyzer'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
run: |
|
run: |
|
||||||
rustup update --no-self-update stable
|
rustup update --no-self-update stable
|
||||||
rustup default stable
|
rustup default stable
|
||||||
rustup component add --toolchain stable rustfmt rust-src
|
rustup component add --toolchain stable rust-src
|
||||||
|
|
||||||
- name: Cache cargo
|
|
||||||
uses: Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012
|
|
||||||
with:
|
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
|
||||||
cache-targets: "false"
|
|
||||||
|
|
||||||
build_metrics:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: setup_cargo
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012
|
uses: Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
||||||
cache-targets: "false"
|
cache-targets: "false"
|
||||||
|
@ -45,7 +35,7 @@ jobs:
|
||||||
run: cargo xtask metrics build
|
run: cargo xtask metrics build
|
||||||
|
|
||||||
- name: Cache target
|
- name: Cache target
|
||||||
uses: Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012
|
uses: Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
||||||
cache-targets: "true"
|
cache-targets: "true"
|
||||||
|
@ -62,14 +52,20 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
names: [self, ripgrep-13.0.0, webrender-2022, diesel-1.4.8, hyper-0.14.18]
|
names: [self, ripgrep-13.0.0, webrender-2022, diesel-1.4.8, hyper-0.14.18]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [setup_cargo, build_metrics]
|
needs: build_metrics
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
run: |
|
||||||
|
rustup update --no-self-update stable
|
||||||
|
rustup default stable
|
||||||
|
rustup component add --toolchain stable rust-src
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: Swatinem/rust-cache@640a22190e7a783d4c409684cea558f081f92012
|
uses: Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
||||||
cache-targets: "true"
|
cache-targets: "true"
|
||||||
|
|
Loading…
Reference in a new issue