summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2024-09-26 13:44:06 +0200
committerJakub Beránek <berykubik@gmail.com>2024-09-27 11:39:52 +0200
commitc1c0bd7a251865e82b1e8d0292451f78f19f22a8 (patch)
treeb10f19f00b6ac91634e6917ef43cc5ea2985ab27 /.github
parent76ed7a1fa40c3f54d3fd3f834e12bf9c932d0146 (diff)
downloadrust-c1c0bd7a251865e82b1e8d0292451f78f19f22a8.tar.gz
rust-c1c0bd7a251865e82b1e8d0292451f78f19f22a8.zip
Upload average CPU consumption of CI jobs to DataDog
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8032154a736..b6dc27f1234 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -212,6 +212,16 @@ jobs:
         # erroring about invalid credentials instead.
         if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
 
+      - 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.name }}
+        run: |
+          npm install -g @datadog/datadog-ci@^2.x.x
+          python3 src/ci/scripts/upload-build-metrics.py 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).
   outcome: