2022-09-20 07:40:39 +08:00
parameters :
2022-10-11 01:16:02 +08:00
- name : VSCODE_BUILD_WIN32
type : boolean
2022-10-25 02:21:03 +08:00
default : false
2022-10-11 01:16:02 +08:00
- name : VSCODE_BUILD_WIN32_ARM64
type : boolean
2022-10-25 02:21:03 +08:00
default : false
2023-06-08 06:48:55 +08:00
- name : VSCODE_CHECK_ONLY
type : boolean
default : false
2022-10-06 01:05:40 +08:00
- name : VSCODE_QUALITY
type : string
2022-09-20 07:40:39 +08:00
steps :
2023-04-02 15:35:39 +08:00
- task : NodeTool@0
inputs :
2023-10-05 10:08:50 +08:00
versionSource : fromFile
versionFilePath : .nvmrc
2023-10-20 15:53:57 +08:00
nodejsMirror : https://github.com/joaomoreno/node-mirror/releases/download
2023-04-02 15:35:39 +08:00
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
2024-03-21 21:16:32 +08:00
- template : ../cli/cli-apply-patches.yml@self
2023-04-02 15:35:39 +08:00
2022-10-22 01:17:22 +08:00
- task : Npm@1
displayName : Download openssl prebuilt
2022-10-21 08:14:14 +08:00
inputs :
2022-10-22 01:17:22 +08:00
command : custom
2023-11-04 04:32:30 +08:00
customCommand : pack @vscode-internal/openssl-prebuilt@0.0.11
2022-10-22 01:17:22 +08:00
customRegistry : useFeed
2023-04-02 15:35:39 +08:00
customFeed : "Monaco/openssl-prebuilt"
2022-10-22 01:17:22 +08:00
workingDir : $(Build.ArtifactStagingDirectory)
- powershell : |
mkdir $(Build.ArtifactStagingDirectory)/openssl
2023-11-04 04:32:30 +08:00
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.11.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
2022-10-22 01:17:22 +08:00
displayName : Extract openssl prebuilt
2022-10-21 08:14:14 +08:00
2024-03-21 21:16:32 +08:00
- template : ../cli/install-rust-win32.yml@self
2022-09-20 07:40:39 +08:00
parameters :
2022-10-11 02:08:59 +08:00
targets :
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
- x86_64-pc-windows-msvc
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
- aarch64-pc-windows-msvc
2022-09-20 07:40:39 +08:00
2022-10-11 02:08:59 +08:00
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
2024-03-21 21:16:32 +08:00
- template : ../cli/cli-compile.yml@self
2022-10-11 02:08:59 +08:00
parameters :
2023-08-11 11:14:30 +08:00
VSCODE_QUALITY : ${{ parameters.VSCODE_QUALITY }}
2022-10-11 02:08:59 +08:00
VSCODE_CLI_TARGET : x86_64-pc-windows-msvc
VSCODE_CLI_ARTIFACT : unsigned_vscode_cli_win32_x64_cli
2023-06-08 06:48:55 +08:00
VSCODE_CHECK_ONLY : ${{ parameters.VSCODE_CHECK_ONLY }}
2022-10-11 02:08:59 +08:00
VSCODE_CLI_ENV :
2023-09-12 06:44:14 +08:00
OPENSSL_LIB_DIR : $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static/lib
OPENSSL_INCLUDE_DIR : $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static/include
2024-10-30 02:51:22 +08:00
RUSTFLAGS : "-Ctarget-feature=+crt-static -Clink-args=/guard:cf -Clink-args=/CETCOMPAT"
CFLAGS : "/guard:cf /Qspectre"
2022-10-11 02:08:59 +08:00
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
2024-03-21 21:16:32 +08:00
- template : ../cli/cli-compile.yml@self
2022-10-11 02:08:59 +08:00
parameters :
2023-08-11 11:14:30 +08:00
VSCODE_QUALITY : ${{ parameters.VSCODE_QUALITY }}
2022-10-11 02:08:59 +08:00
VSCODE_CLI_TARGET : aarch64-pc-windows-msvc
VSCODE_CLI_ARTIFACT : unsigned_vscode_cli_win32_arm64_cli
2023-06-08 06:48:55 +08:00
VSCODE_CHECK_ONLY : ${{ parameters.VSCODE_CHECK_ONLY }}
2022-10-11 02:08:59 +08:00
VSCODE_CLI_ENV :
2023-09-12 06:44:14 +08:00
OPENSSL_LIB_DIR : $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static/lib
OPENSSL_INCLUDE_DIR : $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static/include
2024-10-30 02:51:22 +08:00
RUSTFLAGS : "-C target-feature=+crt-static -Clink-args=/guard:cf -Clink-args=/CETCOMPAT:NO"
CFLAGS : "/guard:cf /Qspectre"
2024-02-01 03:22:50 +08:00
2024-03-21 21:16:32 +08:00
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
- task : 1ES.PublishPipelineArtifact@1
inputs :
targetPath : $(Build.ArtifactStagingDirectory)/unsigned_vscode_cli_win32_arm64_cli.zip
artifactName : unsigned_vscode_cli_win32_arm64_cli
sbomBuildDropPath : $(Build.ArtifactStagingDirectory)/cli
sbomPackageName : "VS Code Windows arm64 CLI (unsigned)"
sbomPackageVersion : $(Build.SourceVersion)
displayName : Publish unsigned_vscode_cli_win32_arm64_cli artifact
2024-02-01 03:22:50 +08:00
2024-03-21 21:16:32 +08:00
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
- task : 1ES.PublishPipelineArtifact@1
inputs :
targetPath : $(Build.ArtifactStagingDirectory)/unsigned_vscode_cli_win32_x64_cli.zip
artifactName : unsigned_vscode_cli_win32_x64_cli
sbomBuildDropPath : $(Build.ArtifactStagingDirectory)/cli
sbomPackageName : "VS Code Windows x64 CLI (unsigned)"
sbomPackageVersion : $(Build.SourceVersion)
displayName : Publish unsigned_vscode_cli_win32_x64_cli artifact