From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.160015.1669750003106924646 for ; Tue, 29 Nov 2022 11:26:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZmNXsQfS; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669750002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/7It7GXGtno28CaE3fHBo0VWo3F1YPtU6jH6WjbU8lY=; b=ZmNXsQfSXftbcs+lNaHW8IOAeh9CeTZQAOlhK7B8kARvtDsVf7L+VSBljOhjnngZHW9jTX Ftcez+4XDZVwZNv64A6JbZxNu1hIYFh6iWDvvERlYbP5EO+dXVj2UNhUa1Nzn1gwFp294p vpPdGAwDuvq9sT+1OJO1wXzNL1t0DME= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-235-YJ1aC-UvOyak5KRlkV2gwQ-1; Tue, 29 Nov 2022 14:26:41 -0500 X-MC-Unique: YJ1aC-UvOyak5KRlkV2gwQ-1 Received: by mail-lf1-f70.google.com with SMTP id c1-20020a197601000000b004a2b252ee0dso5643732lff.14 for ; Tue, 29 Nov 2022 11:26:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/7It7GXGtno28CaE3fHBo0VWo3F1YPtU6jH6WjbU8lY=; b=dgzOlbOTWKEP7XH7sCoDIzI7toTeBjmyK7KhF7vScIzb0o13Rx32h+69uCCiHtuxnm xNmFG1seW+0bP+UQsnUgf2bIuHTnptRH/5RUzDzfuDK/u14teTKGj4SmjChuZvIeGnQB kB46Wqb5s7fy2NT1TfL90ZwCFMPTIe0O+Cu+mgfj6XTnldRqf+Kej4G7xjjNLOdQ4wgx aIXXukVPC9i+fe9cvL3wNo0hVenIx+tB1THEhg94siPSyzFGi8OWnG35Lh+kZkSjJ+wL Bj/urS4hxitvhIJoHcRGiastbcc33enECIjtsprVhEwZQaOftCMYAwvjelN6o9zsevMb jXgQ== X-Gm-Message-State: ANoB5pl2V1LgBdgPzxVmm5U5ZSzWDFGviAOh7iSjGkSx5Un06XBPPeIn GCmkJ8KxXcJRCVV77tGYLiyIebEpCo18NKCPwEwCX2EZ0wlhWd2Mo/Mztc6r/XJpDkJ119DqnVr iP0B9EB1Kszi5Ag5V9pJAnD63Pw02Ew== X-Received: by 2002:a2e:3813:0:b0:279:9b88:384d with SMTP id f19-20020a2e3813000000b002799b88384dmr5489854lja.455.1669749999155; Tue, 29 Nov 2022 11:26:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf7AhuICmh0BgJ3LmYM3k0mAslCKg3IWC9hOoY8/djk4ygr9Egshk7m/D12X0rPoUAtVUeAiUoQjS7V1PsK2nTQ= X-Received: by 2002:a2e:3813:0:b0:279:9b88:384d with SMTP id f19-20020a2e3813000000b002799b88384dmr5489800lja.455.1669749998850; Tue, 29 Nov 2022 11:26:38 -0800 (PST) Received: from 567203818698 named unknown by gmailapi.google.com with HTTPREST; Tue, 29 Nov 2022 14:26:38 -0500 From: "Oliver Steffen" X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221129192625.643896-1-osteffen@redhat.com> References: <20221129192625.643896-1-osteffen@redhat.com> MIME-Version: 1.0 Date: Tue, 29 Nov 2022 14:26:38 -0500 Message-ID: Subject: [PATCH v7 1/6] CI: make Python version configurable To: devel@edk2.groups.io Cc: Abner Chang , Alexei Fedorov , Andrew Fish , Anthony Perard , Ard Biesheuvel , Bob Feng , Brijesh Singh , Chasel Chiu , Daniel Schaefer , Erdem Aktas , Eric Dong , Gerd Hoffmann , Gua Guo , Guo Dong , Guomin Jiang , Hao A Wu , Igor Kulchytskyy , James Bottomley , James Lu , Jian J Wang , Jiaxin Wu , Jiewen Yao , Jordan Justen , Julien Grall , Leif Lindholm , Liming Gao , Maciej Rabeda , Michael D Kinney , Michael Kubacki , Min Xu , Nate DeSimone , Nickle Wang , Peter Grehan , Pierre Gondois , Rahul Kumar , Ray Ni , Rebecca Cran , Sami Mujawar , Sean Brogan , Sean Rhodes , Sebastien Boeuf , Siyuan Fu , Star Zeng , Sunil V L , Supreeth Venkatesh , Tom Lendacky , Wei6 Xu , Xiaoyu Lu , Yuwei Chen , Zhichao Gao , Zhiguang Liu , Pawel Polawski , Chris Fernald , Oliver Steffen X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Add a new parameter "usePythonVersion" to the CI job templates. This makes it possible to specify the version of Python to use. The default value is ">=3.10.6". If '' is specified, Python will not be downloaded at runtime and the one provided by the VM/container image will be used. Signed-off-by: Oliver Steffen --- .azurepipelines/templates/platform-build-run-steps.yml | 6 +++++- .azurepipelines/templates/pr-gate-build-job.yml | 2 ++ .azurepipelines/templates/pr-gate-steps.yml | 6 ++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.azurepipelines/templates/platform-build-run-steps.yml b/.azurepipelines/templates/platform-build-run-steps.yml index 40a31a509fc5..6c9189a20fde 100644 --- a/.azurepipelines/templates/platform-build-run-steps.yml +++ b/.azurepipelines/templates/platform-build-run-steps.yml @@ -34,6 +34,9 @@ parameters: - name: extra_install_step type: stepList default: [] +- name: usePythonVersion + type: string + default: ">=3.10.6" steps: - checkout: self @@ -42,8 +45,9 @@ steps: - task: UsePythonVersion@0 inputs: - versionSpec: ">=3.10.6" + versionSpec: ${{ parameters.usePythonVersion }} architecture: "x64" + condition: ne('${{ parameters.usePythonVersion }}', '') - script: pip install -r pip-requirements.txt --upgrade displayName: 'Install/Upgrade pip modules' diff --git a/.azurepipelines/templates/pr-gate-build-job.yml b/.azurepipelines/templates/pr-gate-build-job.yml index 7f88b41dc8d3..d0a6ccd10700 100644 --- a/.azurepipelines/templates/pr-gate-build-job.yml +++ b/.azurepipelines/templates/pr-gate-build-job.yml @@ -12,6 +12,7 @@ parameters: tool_chain_tag: '' vm_image: '' arch_list: '' + usePythonVersion: '>=3.10.6' # Build step jobs: @@ -77,3 +78,4 @@ jobs: build_pkgs: $(Build.Pkgs) build_targets: $(Build.Targets) build_archs: ${{ parameters.arch_list }} + usePythonVersion: ${{ parameters.usePythonVersion }} diff --git a/.azurepipelines/templates/pr-gate-steps.yml b/.azurepipelines/templates/pr-gate-steps.yml index cb431e53fcd1..bf6574b33692 100644 --- a/.azurepipelines/templates/pr-gate-steps.yml +++ b/.azurepipelines/templates/pr-gate-steps.yml @@ -12,6 +12,7 @@ parameters: build_pkgs: '' build_targets: '' build_archs: '' + usePythonVersion: '>=3.10.6' steps: - checkout: self @@ -20,8 +21,9 @@ steps: - task: UsePythonVersion@0 inputs: - versionSpec: '>=3.10.6' - architecture: 'x64' + versionSpec: ${{ parameters.usePythonVersion }} + architecture: "x64" + condition: ne('${{ parameters.usePythonVersion }}', '') - script: pip install -r pip-requirements.txt --upgrade displayName: 'Install/Upgrade pip modules' -- 2.38.1