Skip to content

Commit aa8f739

Browse files
committed
Auto merge of #136977 - Kobzol:citool-datadog, r=<try>
[WIP] Upload Datadog metrics with citool Opening as a draft for testing. r? `@ghost`
2 parents c241e14 + 9043ce8 commit aa8f739

File tree

19 files changed

+1843
-5428
lines changed

19 files changed

+1843
-5428
lines changed

.github/workflows/ci.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file defines our primary CI workflow that runs on pull requests
22
# and also on pushes to special branches (auto, try).
33
#
4-
# The actual definition of the executed jobs is calculated by a Python
5-
# script located at src/ci/github-actions/ci.py, which
4+
# The actual definition of the executed jobs is calculated by the
5+
# `src/ci/citool` crate, which
66
# uses job definition data from src/ci/github-actions/jobs.yml.
77
# You should primarily modify the `jobs.yml` file if you want to modify
88
# what jobs are executed in CI.
@@ -56,7 +56,10 @@ jobs:
5656
- name: Calculate the CI job matrix
5757
env:
5858
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
59-
run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
59+
run: |
60+
cd src/ci/citool
61+
cargo test
62+
cargo run calculate-job-matrix >> $GITHUB_OUTPUT
6063
id: jobs
6164
job:
6265
name: ${{ matrix.full_name }}
@@ -173,6 +176,12 @@ jobs:
173176
- name: ensure the stable version number is correct
174177
run: src/ci/scripts/verify-stable-version-number.sh
175178

179+
# Prebuilt citool before the following step uninstall rustup
180+
- name: Build citool
181+
run: |
182+
cd src/ci/citool
183+
cargo build
184+
176185
- name: run the build
177186
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
178187
run: src/ci/scripts/run-build-from-ci.sh 2>&1
@@ -212,13 +221,9 @@ jobs:
212221
- name: upload job metrics to DataDog
213222
if: needs.calculate_matrix.outputs.run_type != 'pr'
214223
env:
215-
DATADOG_SITE: datadoghq.com
216224
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
217225
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
218-
run: |
219-
cd src/ci
220-
npm ci
221-
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
226+
run: ./src/ci/citool/target/debug/citool upload-build-metrics ../../build/cpu-usage.csv
222227

223228
# This job isused to tell bors the final status of the build, as there is no practical way to detect
224229
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).

0 commit comments

Comments
 (0)