diff --git a/build/azure-devdiv-pipeline.pre-release.yml b/build/azure-devdiv-pipeline.pre-release.yml index 19cd7c6a0..740e6f1ea 100644 --- a/build/azure-devdiv-pipeline.pre-release.yml +++ b/build/azure-devdiv-pipeline.pre-release.yml @@ -81,6 +81,47 @@ parameters: - script: python ./build/update_ext_version.py --for-publishing displayName: Validate version number + - bash: | + case "$(vsceTarget)" in + win32-x64) target=x86_64-pc-windows-msvc ;; + win32-arm64) target=aarch64-pc-windows-msvc ;; + linux-x64|alpine-x64|web) target=x86_64-unknown-linux-musl ;; + linux-arm64|alpine-arm64) target=aarch64-unknown-linux-gnu ;; + linux-armhf) target=armv7-unknown-linux-gnueabihf ;; + darwin-x64) target=x86_64-apple-darwin ;; + darwin-arm64) target=aarch64-apple-darwin ;; + *) echo "Unsupported VS Code target: $(vsceTarget)" >&2; exit 1 ;; + esac + echo "##vso[task.setvariable variable=buildTarget]$target" + displayName: Select PET build target + + - task: DownloadPipelineArtifact@2 + displayName: Download PET + inputs: + buildType: specific + project: DevDiv + definition: 28980 + buildVersionToDownload: latestFromBranch + branchName: refs/heads/main + targetPath: $(Build.SourcesDirectory)/python-env-tools/bin + artifactName: bin-$(buildTarget) + itemPattern: | + pet.exe + pet + ThirdPartyNotices.txt + + - bash: | + set -euo pipefail + cd "$(Build.SourcesDirectory)/python-env-tools/bin" + if [ -f pet ]; then + chmod +x pet + elif [ ! -f pet.exe ]; then + echo "PET binary is missing from the downloaded artifact" >&2 + exit 1 + fi + test -f ThirdPartyNotices.txt + displayName: Verify PET artifact + - script: npm run package displayName: Build extension