src/tools/rust-analyzer/.github/workflows/metrics.yaml YAML 137 lines View on github.com → Search inside
1name: metrics2on:3  push:4    branches:5      - master67env:8  CARGO_INCREMENTAL: 09  CARGO_NET_RETRY: 1010  RUSTFLAGS: "-D warnings -W unreachable-pub --cfg no_salsa_async_drops"11  RUSTUP_MAX_RETRIES: 101213jobs:14  build_metrics:15    if: github.repository == 'rust-lang/rust-analyzer'16    runs-on: ubuntu-latest1718    steps:19      - name: Install Rust toolchain20        run: |21          rustup update --no-self-update beta22          rustup default beta23          rustup component add --toolchain beta rust-src2425      - name: Checkout repository26        uses: actions/checkout@v62728      - name: Cache cargo29        uses: actions/cache@v430        with:31          path: |32            ~/.cargo/bin/33            ~/.cargo/registry/index/34            ~/.cargo/registry/cache/35            ~/.cargo/git/db/36          key: ${{ runner.os }}-cargo-${{ github.sha }}3738      - name: Collect build metrics39        run: cargo xtask metrics build4041      - name: Cache target42        uses: actions/cache@v443        with:44          path: target/45          key: ${{ runner.os }}-target-${{ github.sha }}4647      - name: Upload build metrics48        uses: actions/upload-artifact@v749        with:50          name: build-${{ github.sha }}51          path: target/build.json52          if-no-files-found: error5354  other_metrics:55    strategy:56      matrix:57        names: [self, ripgrep-13.0.0, webrender-2022, diesel-1.4.8, hyper-0.14.18]58    runs-on: ubuntu-latest59    needs: build_metrics6061    steps:62      - name: Install Rust toolchain63        run: |64          rustup update --no-self-update beta65          rustup default beta66          rustup component add --toolchain beta rust-src6768      - name: Checkout repository69        uses: actions/checkout@v67071      - name: Restore target cache72        uses: actions/cache@v473        with:74          path: target/75          key: ${{ runner.os }}-target-${{ github.sha }}7677      - name: Collect metrics78        run: cargo xtask metrics "${{ matrix.names }}"7980      - name: Upload metrics81        uses: actions/upload-artifact@v782        with:83          name: ${{ matrix.names }}-${{ github.sha }}84          path: target/${{ matrix.names }}.json85          if-no-files-found: error8687  generate_final_metrics:88    runs-on: ubuntu-latest89    needs: [build_metrics, other_metrics]90    steps:91      - name: Checkout repository92        uses: actions/checkout@v69394      - name: Download build metrics95        uses: actions/download-artifact@v896        with:97          name: build-${{ github.sha }}9899      - name: Download self metrics100        uses: actions/download-artifact@v8101        with:102          name: self-${{ github.sha }}103104      - name: Download ripgrep-13.0.0 metrics105        uses: actions/download-artifact@v8106        with:107          name: ripgrep-13.0.0-${{ github.sha }}108109      - name: Download webrender-2022 metrics110        uses: actions/download-artifact@v8111        with:112          name: webrender-2022-${{ github.sha }}113114      - name: Download diesel-1.4.8 metrics115        uses: actions/download-artifact@v8116        with:117          name: diesel-1.4.8-${{ github.sha }}118119      - name: Download hyper-0.14.18 metrics120        uses: actions/download-artifact@v8121        with:122          name: hyper-0.14.18-${{ github.sha }}123124      - name: Combine json125        run: |126          mkdir ~/.ssh127          echo "${{ secrets.METRICS_DEPLOY_KEY }}" > ~/.ssh/id_ed25519128          chmod 600 ~/.ssh/id_ed25519129          chmod 700 ~/.ssh130131          git clone --depth 1 git@github.com:rust-analyzer/metrics.git132          jq -s ".[0] * .[1] * .[2] * .[3] * .[4] * .[5]" build.json self.json ripgrep-13.0.0.json webrender-2022.json diesel-1.4.8.json hyper-0.14.18.json -c >> metrics/metrics.json133          cd metrics134          git add .135          git -c user.name=Bot -c user.email=dummy@example.com commit --message 📈136          git push origin master

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.