mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
refactor(workflow): Use build matrix
This commit is contained in:
parent
68e64025fd
commit
506153b9f3
121
.github/workflows/metrics.yaml
vendored
121
.github/workflows/metrics.yaml
vendored
@ -63,7 +63,10 @@ jobs:
|
|||||||
path: target/build.json
|
path: target/build.json
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
self_metrics:
|
other_metrics:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
names: [self, ripgrep, webrender, diesel]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [setup_cargo, build_metrics]
|
needs: [setup_cargo, build_metrics]
|
||||||
|
|
||||||
@ -87,123 +90,19 @@ jobs:
|
|||||||
path: target/
|
path: target/
|
||||||
key: ${{ runner.os }}-target-${{ github.sha }}
|
key: ${{ runner.os }}-target-${{ github.sha }}
|
||||||
|
|
||||||
- name: Collect build metrics
|
- name: Collect metrics
|
||||||
run: cargo xtask metrics self
|
run: cargo xtask metrics ${{ matrix.names }}
|
||||||
|
|
||||||
- name: Upload build metrics
|
- name: Upload metrics
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: self-${{ github.sha }}
|
name: ${{ matrix.names }}-${{ github.sha }}
|
||||||
path: target/self.json
|
path: target/${{ matrix.names }}.json
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
ripgrep_metrics:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [setup_cargo, build_metrics]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Restore cargo cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Restore target cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: target/
|
|
||||||
key: ${{ runner.os }}-target-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Collect build metrics
|
|
||||||
run: cargo xtask metrics ripgrep
|
|
||||||
|
|
||||||
- name: Upload ripgrep metrics
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ripgrep-${{ github.sha }}
|
|
||||||
path: target/ripgrep.json
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
webrender_metrics:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [setup_cargo, build_metrics]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Restore cargo cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Restore target cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: target/
|
|
||||||
key: ${{ runner.os }}-target-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Collect webrender metrics
|
|
||||||
run: cargo xtask metrics webrender
|
|
||||||
|
|
||||||
- name: Upload webrender metrics
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: webrender-${{ github.sha }}
|
|
||||||
path: target/webrender.json
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
diesel_metrics:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [setup_cargo, build_metrics]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Restore cargo cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
key: ${{ runner.os }}-cargo-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Restore target cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: target/
|
|
||||||
key: ${{ runner.os }}-target-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Collect build metrics
|
|
||||||
run: cargo xtask metrics diesel
|
|
||||||
|
|
||||||
- name: Upload build metrics
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: diesel-${{ github.sha }}
|
|
||||||
path: target/diesel.json
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
generate_final_metrics:
|
generate_final_metrics:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build_metrics, self_metrics, ripgrep_metrics, webrender_metrics, diesel_metrics]
|
needs: [build_metrics, other_metrics]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user