Skip to content

Commit

Permalink
Auto merge of #136977 - Kobzol:citool-datadog, r=<try>
Browse files Browse the repository at this point in the history
[WIP] Upload Datadog metrics with citool

Opening as a draft for testing.

r? `@ghost`
  • Loading branch information
bors committed Feb 13, 2025
2 parents c241e14 + 9043ce8 commit aa8f739
Show file tree
Hide file tree
Showing 19 changed files with 1,843 additions and 5,428 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file defines our primary CI workflow that runs on pull requests
# and also on pushes to special branches (auto, try).
#
# The actual definition of the executed jobs is calculated by a Python
# script located at src/ci/github-actions/ci.py, which
# The actual definition of the executed jobs is calculated by the
# `src/ci/citool` crate, which
# uses job definition data from src/ci/github-actions/jobs.yml.
# You should primarily modify the `jobs.yml` file if you want to modify
# what jobs are executed in CI.
Expand Down Expand Up @@ -56,7 +56,10 @@ jobs:
- name: Calculate the CI job matrix
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
run: |
cd src/ci/citool
cargo test
cargo run calculate-job-matrix >> $GITHUB_OUTPUT
id: jobs
job:
name: ${{ matrix.full_name }}
Expand Down Expand Up @@ -173,6 +176,12 @@ jobs:
- name: ensure the stable version number is correct
run: src/ci/scripts/verify-stable-version-number.sh

# Prebuilt citool before the following step uninstall rustup
- name: Build citool
run: |
cd src/ci/citool
cargo build
- name: run the build
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
run: src/ci/scripts/run-build-from-ci.sh 2>&1
Expand Down Expand Up @@ -212,13 +221,9 @@ jobs:
- name: upload job metrics to DataDog
if: needs.calculate_matrix.outputs.run_type != 'pr'
env:
DATADOG_SITE: datadoghq.com
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
run: |
cd src/ci
npm ci
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
run: ./src/ci/citool/target/debug/citool upload-build-metrics ../../build/cpu-usage.csv

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

0 comments on commit aa8f739

Please sign in to comment.