Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/build/release.yml
13383 views
1
name: $(Date:yyyyMMdd)$(Rev:.r)
2
3
trigger:
4
branches:
5
include:
6
- main
7
pr: none
8
9
resources:
10
repositories:
11
- repository: templates
12
type: github
13
name: microsoft/vscode-engineering
14
ref: main
15
endpoint: Monaco
16
17
parameters:
18
- name: customNPMRegistry
19
displayName: Custom NPM Registry (Terrapin)
20
type: boolean
21
default: true
22
- name: generateNotice
23
displayName: Generate Notice
24
type: boolean
25
default: true
26
- name: publishExtension
27
displayName: Publish Stable Extension
28
type: boolean
29
default: false
30
31
extends:
32
template: azure-pipelines/extension/stable.yml@templates
33
parameters:
34
l10nSourcePaths: ./src
35
nodeVersion: 22.21.x
36
37
cgIgnoreDirectories: $(Build.SourcesDirectory)/script
38
39
# Suppress false positive strings SG.default.* that show up in
40
# dist/extension.js after the build. The original strings come from ora.
41
vscePackageArgs: '--allow-package-secrets sendgrid'
42
43
buildSteps:
44
- task: NodeTool@0
45
inputs:
46
versionSpec: '22.21.x'
47
48
- task: AzureKeyVault@2
49
displayName: "Azure Key Vault: Get Secrets"
50
inputs:
51
azureSubscription: vscode
52
KeyVaultName: vscode-build-secrets
53
SecretsFilter: "github-distro-mixin-password"
54
55
- pwsh: |
56
"machine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$Home/_netrc" -Encoding ASCII
57
condition: and(succeeded(), contains(variables['Agent.OS'], 'windows'))
58
displayName: Setup distro auth (Windows)
59
60
- script: |
61
mkdir -p .build
62
cat << EOF | tee ~/.netrc .build/.netrc > /dev/null
63
machine github.com
64
login vscode
65
password $(github-distro-mixin-password)
66
EOF
67
condition: and(succeeded(), not(contains(variables['Agent.OS'], 'windows')))
68
displayName: Setup distro auth (non-Windows)
69
70
- task: Cache@2
71
inputs:
72
key: '"release_build_cache" | build/.cachesalt | build/setup-emsdk.sh | package-lock.json'
73
path: .build/build_cache
74
cacheHitVar: BUILD_CACHE_RESTORED
75
displayName: Restore build cache (node modules, python packages)
76
77
- script: ./build/setup-emsdk.sh
78
displayName: Setup emsdk
79
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
80
- script: echo '##vso[task.prependpath]/opt/dev/emsdk/upstream/emscripten'
81
displayName: Setup emsdk path 1
82
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
83
- script: echo '##vso[task.prependpath]/opt/dev/emsdk'
84
displayName: Setup emsdk path 2
85
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
86
87
- script: tar -xzf .build/build_cache/cache.tgz
88
condition: and(succeeded(), eq(variables.BUILD_CACHE_RESTORED, 'true'))
89
displayName: Extract build cache
90
91
- script: npm ci
92
displayName: Install dependencies
93
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
94
95
- script: |
96
set -e
97
mkdir -p .build
98
node build/listBuildCacheFiles.js .build/build_cache_list.txt
99
mkdir -p .build/build_cache
100
tar -czf .build/build_cache/cache.tgz --files-from .build/build_cache_list.txt
101
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
102
displayName: Create build cache archive
103
104
- pwsh: |
105
# Clone the vscode-capi repository
106
git clone https://github.com/microsoft/vscode-capi.git --depth 1 ../vscode-capi
107
108
# Run the mixin script
109
Push-Location ../vscode-capi
110
npm ci && npm run mixin
111
112
# Clean up the cloned repository
113
Pop-Location
114
Remove-Item -Recurse -Force ../vscode-capi
115
displayName: mixin
116
117
- script: npm run build
118
displayName: npm run build
119
120
uploadSourceMaps:
121
enabled: true
122
123
# testPlatforms:
124
# - name: Linux
125
# nodeVersions: [16.x]
126
# - name: MacOS
127
# nodeVersions: [16.x]
128
# - name: Windows
129
# nodeVersions: [16.x]
130
131
testSteps:
132
- checkout: self
133
lfs: true
134
135
- task: NodeTool@0
136
inputs:
137
versionSpec: '22.21.x'
138
139
- task: AzureKeyVault@2
140
displayName: "Azure Key Vault: Get Secrets"
141
inputs:
142
azureSubscription: vscode
143
KeyVaultName: vscode-build-secrets
144
SecretsFilter: "github-distro-mixin-password"
145
146
- pwsh: |
147
"machine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$Home/_netrc" -Encoding ASCII
148
condition: and(succeeded(), contains(variables['Agent.OS'], 'windows'))
149
displayName: Setup distro auth (Windows)
150
151
- script: |
152
mkdir -p .build
153
cat << EOF | tee ~/.netrc .build/.netrc > /dev/null
154
machine github.com
155
login vscode
156
password $(github-distro-mixin-password)
157
EOF
158
condition: and(succeeded(), not(contains(variables['Agent.OS'], 'windows')))
159
displayName: Setup distro auth (non-Windows)
160
161
- task: Cache@2
162
inputs:
163
key: '"release_build_cache" | build/.cachesalt | build/setup-emsdk.sh | package-lock.json'
164
path: .build/build_cache
165
cacheHitVar: BUILD_CACHE_RESTORED
166
displayName: Restore build cache (node modules, python packages)
167
168
- script: ./build/setup-emsdk.sh
169
displayName: Setup emsdk
170
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
171
- script: echo '##vso[task.prependpath]/opt/dev/emsdk/upstream/emscripten'
172
displayName: Setup emsdk path 1
173
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
174
- script: echo '##vso[task.prependpath]/opt/dev/emsdk'
175
displayName: Setup emsdk path 2
176
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
177
178
- script: tar -xzf .build/build_cache/cache.tgz
179
condition: and(succeeded(), eq(variables.BUILD_CACHE_RESTORED, 'true'))
180
displayName: Extract build cache
181
182
- script: npm ci
183
displayName: Install dependencies
184
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
185
186
- script: |
187
set -e
188
mkdir -p .build
189
node build/listBuildCacheFiles.js .build/build_cache_list.txt
190
mkdir -p .build/build_cache
191
tar -czf .build/build_cache/cache.tgz --files-from .build/build_cache_list.txt
192
condition: and(succeeded(), ne(variables.BUILD_CACHE_RESTORED, 'true'))
193
displayName: Create build cache archive
194
195
- task: AzureCLI@2
196
inputs:
197
azureSubscription: 'VS Code Development WIF'
198
scriptType: 'bash'
199
scriptLocation: 'inlineScript'
200
inlineScript: npm run setup
201
displayName: npm run setup
202
203
- script: npm run setup:dotnet
204
displayName: Install dotnet cli
205
206
- script: npm run typecheck
207
displayName: npm run typecheck
208
209
- script: npm run lint
210
displayName: npm run lint
211
212
- script: npm run compile
213
displayName: npm run compile
214
215
- script: npm run test:unit
216
displayName: Run vitest unit tests
217
218
- script: npm run simulate-ci
219
displayName: Run simulation tests
220
221
- script: xvfb-run -a npm run test:extension
222
displayName: Run extension tests using VS Code
223
224
- script: npm run test:prompt
225
displayName: Run Completions Core prompt tests
226
227
- script: xvfb-run -a npm run test:completions-core
228
displayName: Run Completions Core lib tests using VS Code
229
230
- script: xvfb-run -a npm run test:sanity
231
displayName: Run extension sanity tests using VS Code
232
233
tsa:
234
config:
235
areaPath: 'Visual Studio Code Copilot Extensions'
236
serviceTreeID: '1788a767-5861-45fb-973b-c686b67c5541'
237
enabled: true
238
239
${{ if eq(parameters.customNPMRegistry, false) }}:
240
customNPMRegistry: ''
241
242
generateNotice: ${{ parameters.generateNotice }}
243
244
publishExtension: ${{ parameters.publishExtension }}
245
ghReleasePublishVSIX: true
246
ghTagPrefix: 'copilot/'
247
248