Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/azure-pipelines/win32/product-build-win32-cli.yml
4772 views
1
parameters:
2
- name: VSCODE_ARCH
3
type: string
4
- name: VSCODE_CHECK_ONLY
5
type: boolean
6
default: false
7
- name: VSCODE_QUALITY
8
type: string
9
10
jobs:
11
- job: WindowsCLI_${{ upper(parameters.VSCODE_ARCH) }}
12
displayName: Windows (${{ upper(parameters.VSCODE_ARCH) }})
13
pool:
14
name: 1es-windows-2022-x64
15
os: windows
16
timeoutInMinutes: 30
17
variables:
18
VSCODE_ARCH: ${{ parameters.VSCODE_ARCH }}
19
templateContext:
20
outputs:
21
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
22
- output: pipelineArtifact
23
targetPath: $(Build.ArtifactStagingDirectory)/unsigned_vscode_cli_win32_$(VSCODE_ARCH)_cli.zip
24
artifactName: unsigned_vscode_cli_win32_$(VSCODE_ARCH)_cli
25
displayName: Publish unsigned_vscode_cli_win32_$(VSCODE_ARCH)_cli artifact
26
sbomEnabled: false
27
isProduction: false
28
29
steps:
30
- template: ../common/checkout.yml@self
31
32
- task: NodeTool@0
33
inputs:
34
versionSource: fromFile
35
versionFilePath: .nvmrc
36
37
- template: ../cli/cli-apply-patches.yml@self
38
39
- task: Npm@1
40
displayName: Download openssl prebuilt
41
inputs:
42
command: custom
43
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.11
44
customRegistry: useFeed
45
customFeed: "Monaco/openssl-prebuilt"
46
workingDir: $(Build.ArtifactStagingDirectory)
47
48
- powershell: |
49
mkdir $(Build.ArtifactStagingDirectory)/openssl
50
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.11.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
51
displayName: Extract openssl prebuilt
52
53
- template: ./steps/product-build-win32-install-rust.yml@self
54
parameters:
55
targets:
56
- ${{ if eq(parameters.VSCODE_ARCH, 'x64') }}:
57
- x86_64-pc-windows-msvc
58
- ${{ if eq(parameters.VSCODE_ARCH, 'arm64') }}:
59
- aarch64-pc-windows-msvc
60
61
- template: ../cli/cli-compile.yml@self
62
parameters:
63
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
64
${{ if eq(parameters.VSCODE_ARCH, 'x64') }}:
65
VSCODE_CLI_TARGET: x86_64-pc-windows-msvc
66
${{ if eq(parameters.VSCODE_ARCH, 'arm64') }}:
67
VSCODE_CLI_TARGET: aarch64-pc-windows-msvc
68
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_$(VSCODE_ARCH)_cli
69
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
70
VSCODE_CLI_ENV:
71
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/$(VSCODE_ARCH)-windows-static/lib
72
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/$(VSCODE_ARCH)-windows-static/include
73
${{ if eq(parameters.VSCODE_ARCH, 'x64') }}:
74
RUSTFLAGS: "-Ctarget-feature=+crt-static -Clink-args=/guard:cf -Clink-args=/CETCOMPAT"
75
${{ if eq(parameters.VSCODE_ARCH, 'arm64') }}:
76
RUSTFLAGS: "-Ctarget-feature=+crt-static -Clink-args=/guard:cf -Clink-args=/CETCOMPAT:NO"
77
CFLAGS: "/guard:cf /Qspectre"
78
79