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..1ee760321fe7 --- /dev/null +++ b/build/azure-devdiv-pipeline.pre-release.yml @@ -0,0 +1,159 @@ +# 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: + # Python 3.10 is not cached on the hosted macOS image. + versionSpec: '3.11' + 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 @@ + + + +