Skip to content

Commit 0db3a9a

Browse files
committed
WIP
1 parent 3e3bcfa commit 0db3a9a

File tree

2 files changed

+34
-26
lines changed

2 files changed

+34
-26
lines changed

.github/workflows/ci.yml

+25-25
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@ jobs:
192192
- name: ensure the stable version number is correct
193193
run: src/ci/scripts/verify-stable-version-number.sh
194194

195-
- name: run the build
195+
# - name: run the build
196196
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
197-
run: src/ci/scripts/run-build-from-ci.sh 2>&1
198-
env:
199-
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
200-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
197+
# run: src/ci/scripts/run-build-from-ci.sh 2>&1
198+
# env:
199+
# AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
200+
# AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
201201

202202
- name: create github artifacts
203203
run: src/ci/scripts/create-doc-artifacts.sh
@@ -207,26 +207,26 @@ jobs:
207207
echo "disk usage:"
208208
df -h
209209
210-
- name: upload artifacts to github
211-
uses: actions/upload-artifact@v4
212-
with:
213-
# name is set in previous step
214-
name: ${{ env.DOC_ARTIFACT_NAME }}
215-
path: obj/artifacts/doc
216-
if-no-files-found: ignore
217-
retention-days: 5
218-
219-
- name: upload artifacts to S3
220-
run: src/ci/scripts/upload-artifacts.sh
221-
env:
222-
AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
223-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
224-
# Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
225-
# builders *should* have the AWS credentials available. Still, explicitly
226-
# adding the condition is helpful as this way CI will not silently skip
227-
# deploying artifacts from a dist builder if the variables are misconfigured,
228-
# erroring about invalid credentials instead.
229-
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
210+
# - name: upload artifacts to github
211+
# uses: actions/upload-artifact@v4
212+
# with:
213+
# # name is set in previous step
214+
# name: ${{ env.DOC_ARTIFACT_NAME }}
215+
# path: obj/artifacts/doc
216+
# if-no-files-found: ignore
217+
# retention-days: 5
218+
#
219+
# - name: upload artifacts to S3
220+
# run: src/ci/scripts/upload-artifacts.sh
221+
# env:
222+
# AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
223+
# AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
224+
# # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
225+
# # builders *should* have the AWS credentials available. Still, explicitly
226+
# # adding the condition is helpful as this way CI will not silently skip
227+
# # deploying artifacts from a dist builder if the variables are misconfigured,
228+
# # erroring about invalid credentials instead.
229+
# if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
230230

231231
- name: upload job metrics to DataDog
232232
if: needs.calculate_matrix.outputs.run_type != 'pr'

src/ci/scripts/upload-build-metrics.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222

2323
import argparse
2424
import csv
25+
import os
2526
import subprocess
27+
import sys
2628
from pathlib import Path
2729
from typing import List
2830

@@ -48,8 +50,14 @@ def upload_datadog_measure(name: str, value: float):
4850
"""
4951
print(f"Metric {name}: {value:.4f}")
5052

53+
cmd = "npx"
54+
if os.getenv("GITHUB_ACTIONS") is not None and sys.platform.lower().startswith("win"):
55+
# Due to weird interaction of MSYS2 and Python, we need to use an absolute path,
56+
# and also specify the ".cmd" at the end. See https://github.com/rust-lang/rust/pull/125771.
57+
cmd = "C:\\Program Files\\nodejs\\npx.cmd"
58+
5159
subprocess.run(
52-
["npx", "datadog-ci", "measure", "--level", "job", "--measures", f"{name}:{value}"],
60+
[cmd, "datadog-ci", "measure", "--level", "job", "--measures", f"{name}:{value}"],
5361
check=False,
5462
)
5563

0 commit comments

Comments
 (0)