From 8d1c3ff58abde5f35f31666b68598f62992307ec Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Mon, 14 Oct 2019 08:07:33 +0200 Subject: [PATCH] ci: copy python.exe to python3.exe on Windows Some of our CI scripts use `#!/usr/bin/env python3` which works fine on Linux and macOS, but fails on Windows as only python.exe (pointing to Python 3) is present. To avoid the failure this commit adds a step that copies python.exe to python3.exe. --- src/ci/azure-pipelines/steps/run.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ci/azure-pipelines/steps/run.yml b/src/ci/azure-pipelines/steps/run.yml index a717dd530c6f3..be8f3db4793c5 100644 --- a/src/ci/azure-pipelines/steps/run.yml +++ b/src/ci/azure-pipelines/steps/run.yml @@ -42,6 +42,10 @@ steps: fi displayName: Decide whether to run this job +- bash: cp $(which python) $(dirname $(which python))/python3.exe + displayName: Copy python.exe to python3.exe + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + # Spawn a background process to collect CPU usage statistics which we'll upload # at the end of the build. See the comments in the script here for more # information.