From 629e41583b6690556d2b15656929aae8b0be1323 Mon Sep 17 00:00:00 2001 From: Eduardo Villalpando Mello Date: Tue, 1 Dec 2026 13:32:34 -0800 Subject: [PATCH 1/2] Add DevDiv pre-release pipeline using pylance-eng templates Adds build/azure-devdiv-pipeline.pre-release.yml, which extends the microsoft/pylance-eng extension pre-release template and downloads python-environment-tools from DevDiv pipeline 28980 instead of Monaco 591. Adds the MicroBuild signing files the shared signing job expects and excludes packages.config from the VSIX. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6 --- .vscodeignore | 1 + build/NuGet.config | 11 ++ build/azure-devdiv-pipeline.pre-release.yml | 158 ++++++++++++++++++++ build/sign.proj | 59 ++++++++ packages.config | 4 + 5 files changed, 233 insertions(+) create mode 100644 build/NuGet.config create mode 100644 build/azure-devdiv-pipeline.pre-release.yml create mode 100644 build/sign.proj create mode 100644 packages.config diff --git a/.vscodeignore b/.vscodeignore index 720b3ddf01f9..c4e9a893d2ae 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -44,6 +44,7 @@ nodeLanguageServer/** nodeLanguageServer.*/** bin/** build/** +packages.config BuildOutput/** coverage/** data/** diff --git a/build/NuGet.config b/build/NuGet.config new file mode 100644 index 000000000000..f5eaa928b681 --- /dev/null +++ b/build/NuGet.config @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/build/azure-devdiv-pipeline.pre-release.yml b/build/azure-devdiv-pipeline.pre-release.yml new file mode 100644 index 000000000000..8176e289c957 --- /dev/null +++ b/build/azure-devdiv-pipeline.pre-release.yml @@ -0,0 +1,158 @@ +# Run on a schedule +trigger: none +pr: none + +schedules: + - cron: '0 10 * * 1-5' # 10AM UTC (2AM PDT) MON-FRI (VS Code Pre-release builds at 9PM PDT) + displayName: Nightly Pre-Release Schedule + always: false # only run if there are source code changes + branches: + include: + - main + +resources: + repositories: + - repository: templates + type: github + name: microsoft/pylance-eng + ref: refs/heads/main + endpoint: Github-Pylance + +variables: + - name: TeamName + value: vscode-python + - name: NodeVersion + value: '22.21.1' + - name: AZURE_ARTIFACTS_FEED + value: 'https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/Pylance_PublicPackages/npm/registry/' + +parameters: + - name: publishExtension + displayName: 🚀 Publish Extension + type: boolean + default: false + + - name: buildPlatforms + type: object + default: + - name: Linux + vsceTarget: web + - name: Linux + vsceTarget: linux-arm64 + - name: Linux + vsceTarget: linux-armhf + - name: Linux + vsceTarget: linux-x64 + - name: Linux + vsceTarget: alpine-arm64 + - name: Linux + vsceTarget: alpine-x64 + - name: MacOS + vsceTarget: darwin-arm64 + - name: MacOS + vsceTarget: darwin-x64 + - name: Windows + vsceTarget: win32-arm64 + - name: Windows + vsceTarget: win32-x64 + + - name: buildSteps + type: stepList + default: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.10' + addToPath: true + architecture: 'x64' + displayName: Select Python version + + - script: python -m pip install -U pip + displayName: Upgrade pip + + - script: python -m pip install wheel==0.47.0 nox==2026.7.11 + displayName: Install wheel and nox + + - script: npm ci + displayName: Install NPM dependencies + + - script: nox --session install_python_libs + displayName: Install Python extension dependencies + + - script: python ./build/update_package_file.py + displayName: Update telemetry in package.json + + - script: npm run addExtensionPackDependencies + displayName: Update optional extension dependencies + + - script: npx gulp prePublishBundle + displayName: Build + + - bash: | + mkdir -p $(Build.SourcesDirectory)/python-env-tools/bin + chmod +x $(Build.SourcesDirectory)/python-env-tools/bin + displayName: Make Directory for python-env-tool binary + + - bash: | + if [ "$(vsceTarget)" == "win32-x64" ]; then + echo "##vso[task.setvariable variable=buildTarget]x86_64-pc-windows-msvc" + elif [ "$(vsceTarget)" == "win32-arm64" ]; then + echo "##vso[task.setvariable variable=buildTarget]aarch64-pc-windows-msvc" + elif [ "$(vsceTarget)" == "linux-x64" ]; then + echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl" + elif [ "$(vsceTarget)" == "linux-arm64" ]; then + echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu" + elif [ "$(vsceTarget)" == "linux-armhf" ]; then + echo "##vso[task.setvariable variable=buildTarget]armv7-unknown-linux-gnueabihf" + elif [ "$(vsceTarget)" == "darwin-x64" ]; then + echo "##vso[task.setvariable variable=buildTarget]x86_64-apple-darwin" + elif [ "$(vsceTarget)" == "darwin-arm64" ]; then + echo "##vso[task.setvariable variable=buildTarget]aarch64-apple-darwin" + elif [ "$(vsceTarget)" == "alpine-x64" ]; then + echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl" + elif [ "$(vsceTarget)" == "alpine-arm64" ]; then + echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu" + elif [ "$(vsceTarget)" == "web" ]; then + echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl" + else + echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl" + fi + displayName: Set buildTarget variable + + - task: DownloadPipelineArtifact@2 + inputs: + buildType: 'specific' + project: 'DevDiv' + definition: 28980 # python-environment-tools DevDiv pre-release + buildVersionToDownload: 'latestFromBranch' + branchName: 'refs/heads/main' + targetPath: '$(Build.SourcesDirectory)/python-env-tools/bin' + artifactName: 'bin-$(buildTarget)' + itemPattern: | + pet.exe + pet + ThirdPartyNotices.txt + displayName: Download python-environment-tools binary + + - bash: | + ls -lf ./python-env-tools/bin + chmod +x ./python-env-tools/bin/pet* + ls -lf ./python-env-tools/bin + displayName: Set chmod for pet binary + + - script: python -c "import shutil; shutil.rmtree('.nox', ignore_errors=True)" + displayName: Clean up Nox + +extends: + template: azure-pipelines/extension/pre-release.yml@templates + parameters: + buildPlatforms: ${{ parameters.buildPlatforms }} + buildSteps: ${{ parameters.buildSteps }} + standardizedVersioning: true + customNPMRegistry: $(AZURE_ARTIFACTS_FEED) + nodeVersion: $(NodeVersion) + publishExtension: ${{ parameters.publishExtension }} + teamName: $(TeamName) + ghCreateTag: false + ghCreateRelease: false + ghReleaseAddChangeLog: false + sourceAnalysisPool: VSEng-MicroBuildVSStable diff --git a/build/sign.proj b/build/sign.proj new file mode 100644 index 000000000000..fe69273eab98 --- /dev/null +++ b/build/sign.proj @@ -0,0 +1,59 @@ + + + + + + + + + Debug + + .\ + + $(BaseOutputDirectory)/intermediate + $(BaseOutputDirectory) + + + + + + + + + + + + + + + + + + + + + + + + + + + VSCodePublisher + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + diff --git a/packages.config b/packages.config new file mode 100644 index 000000000000..d6d31fac8f53 --- /dev/null +++ b/packages.config @@ -0,0 +1,4 @@ + + + + From 93d179852c9990ccaa884f3d3c954ae8bf165dbf Mon Sep 17 00:00:00 2001 From: Eduardo Villalpando Mello Date: Tue, 1 Dec 2026 13:55:20 -0800 Subject: [PATCH 2/2] Use cached Python 3.11 in the DevDiv pre-release build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6 --- build/azure-devdiv-pipeline.pre-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/azure-devdiv-pipeline.pre-release.yml b/build/azure-devdiv-pipeline.pre-release.yml index 8176e289c957..1ee760321fe7 100644 --- a/build/azure-devdiv-pipeline.pre-release.yml +++ b/build/azure-devdiv-pipeline.pre-release.yml @@ -61,7 +61,8 @@ parameters: default: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + # Python 3.10 is not cached on the hosted macOS image. + versionSpec: '3.11' addToPath: true architecture: 'x64' displayName: Select Python version