Auto merge of #15275 - Veykril:ci-metrics, r=Veykril
Default to stable toolchain for metrics workflow Metrics CI is failing because of a function that was stabilized in 1.70. So for some reason, it's trying to use an older toolchain i seems though I don't understand why it randomly started complaining about that.
This commit is contained in:
commit
6acb989448
1 changed files with 81 additions and 81 deletions
162
.github/workflows/metrics.yaml
vendored
162
.github/workflows/metrics.yaml
vendored
|
@ -1,8 +1,8 @@
|
||||||
name: metrics
|
name: metrics
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
@ -19,6 +19,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
rustup update --no-self-update stable
|
rustup update --no-self-update stable
|
||||||
rustup component add rustfmt rust-src
|
rustup component add rustfmt rust-src
|
||||||
|
rustup default stable
|
||||||
- name: Cache cargo
|
- name: Cache cargo
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
@ -34,35 +35,34 @@ jobs:
|
||||||
needs: setup_cargo
|
needs: setup_cargo
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Collect build metrics
|
||||||
|
run: cargo xtask metrics build
|
||||||
|
|
||||||
- name: Collect build metrics
|
- name: Cache target
|
||||||
run: cargo xtask metrics build
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: target/
|
||||||
|
key: ${{ runner.os }}-target-${{ github.sha }}
|
||||||
|
|
||||||
- name: Cache target
|
- name: Upload build metrics
|
||||||
uses: actions/cache@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: target/
|
name: build-${{ github.sha }}
|
||||||
key: ${{ runner.os }}-target-${{ github.sha }}
|
path: target/build.json
|
||||||
|
if-no-files-found: error
|
||||||
- name: Upload build metrics
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: build-${{ github.sha }}
|
|
||||||
path: target/build.json
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
other_metrics:
|
other_metrics:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -72,74 +72,74 @@ jobs:
|
||||||
needs: [setup_cargo, build_metrics]
|
needs: [setup_cargo, build_metrics]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
||||||
|
|
||||||
- name: Restore target cache
|
- name: Restore target cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: target/
|
path: target/
|
||||||
key: ${{ runner.os }}-target-${{ github.sha }}
|
key: ${{ runner.os }}-target-${{ github.sha }}
|
||||||
|
|
||||||
- name: Collect metrics
|
- name: Collect metrics
|
||||||
run: cargo xtask metrics ${{ matrix.names }}
|
run: cargo xtask metrics ${{ matrix.names }}
|
||||||
|
|
||||||
- name: Upload metrics
|
- name: Upload metrics
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.names }}-${{ github.sha }}
|
name: ${{ matrix.names }}-${{ github.sha }}
|
||||||
path: target/${{ matrix.names }}.json
|
path: target/${{ matrix.names }}.json
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
generate_final_metrics:
|
generate_final_metrics:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build_metrics, other_metrics]
|
needs: [build_metrics, other_metrics]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Download build metrics
|
- name: Download build metrics
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-${{ github.sha }}
|
name: build-${{ github.sha }}
|
||||||
|
|
||||||
- name: Download self metrics
|
- name: Download self metrics
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: self-${{ github.sha }}
|
name: self-${{ github.sha }}
|
||||||
|
|
||||||
- name: Download ripgrep metrics
|
- name: Download ripgrep metrics
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ripgrep-${{ github.sha }}
|
name: ripgrep-${{ github.sha }}
|
||||||
|
|
||||||
- name: Download webrender metrics
|
- name: Download webrender metrics
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: webrender-${{ github.sha }}
|
name: webrender-${{ github.sha }}
|
||||||
|
|
||||||
- name: Download diesel metrics
|
- name: Download diesel metrics
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: diesel-${{ github.sha }}
|
name: diesel-${{ github.sha }}
|
||||||
|
|
||||||
- name: Combine json
|
- name: Combine json
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 https://$METRICS_TOKEN@github.com/rust-analyzer/metrics.git
|
git clone --depth 1 https://$METRICS_TOKEN@github.com/rust-analyzer/metrics.git
|
||||||
jq -s ".[0] * .[1] * .[2] * .[3] * .[4]" build.json self.json ripgrep.json webrender.json diesel.json -c >> metrics/metrics.json
|
jq -s ".[0] * .[1] * .[2] * .[3] * .[4]" build.json self.json ripgrep.json webrender.json diesel.json -c >> metrics/metrics.json
|
||||||
cd metrics
|
cd metrics
|
||||||
git add .
|
git add .
|
||||||
git -c user.name=Bot -c user.email=dummy@example.com commit --message 📈
|
git -c user.name=Bot -c user.email=dummy@example.com commit --message 📈
|
||||||
git push origin master
|
git push origin master
|
||||||
env:
|
env:
|
||||||
METRICS_TOKEN: ${{ secrets.METRICS_TOKEN }}
|
METRICS_TOKEN: ${{ secrets.METRICS_TOKEN }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue