mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-31 23:27:43 +00:00
Fix bug in telemetry-steps.yml that causes telemetry setup to be disabled even if TELEMETRYGUID is set.
19 lines
982 B
YAML
19 lines
982 B
YAML
# sets the TelemetryOption variable and optionally generates TraceLoggingConfigPrivate.h based on the TELEMETRYGUID
|
|
# variable
|
|
|
|
steps:
|
|
- powershell: |
|
|
if ($env:TELEMETRYGUID) {
|
|
$length = $env:TELEMETRYGUID.length
|
|
$fileContent = "#define TraceLoggingOptionMicrosoftTelemetry() \
|
|
TraceLoggingOptionGroup("+$env:TELEMETRYGUID.substring(1, $length-2)+")"
|
|
New-Item -Path "$(Build.SourcesDirectory)\include\onnxruntime\core\platform\windows\TraceLoggingConfigPrivate.h" -ItemType "file" -Value "$fileContent" -Force
|
|
Write-Host "##vso[task.setvariable variable=TelemetryOption]--use_telemetry"
|
|
Write-Host "Telemetry is enabled."
|
|
} else {
|
|
Write-Host "##vso[task.setvariable variable=TelemetryOption]"
|
|
Write-Host "Telemetry is disabled."
|
|
}
|
|
displayName: 'Set TelemetryOption variable and optionally create TraceLoggingConfigPrivate.h for WinML Telemetry'
|
|
env:
|
|
TELEMETRYGUID: $(TELEMETRYGUID)
|