|
1 | 1 | jobs: |
2 | | - - job: Windows |
| 2 | + - job: Windows_Build |
3 | 3 | dependsOn: GetReleaseVersion |
4 | 4 | timeoutInMinutes: 180 |
5 | 5 | strategy: |
@@ -131,62 +131,6 @@ jobs: |
131 | 131 | npm_config_build_from_source: true |
132 | 132 | displayName: Build Atom |
133 | 133 |
|
134 | | - - script: | |
135 | | - %RunCommand% script\test.cmd |
136 | | - env: |
137 | | - CI: true |
138 | | - CI_PROVIDER: VSTS |
139 | | - ATOM_JASMINE_REPORTER: list |
140 | | - TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit |
141 | | - BUILD_ARCH: $(buildArch) |
142 | | - displayName: Run tests |
143 | | - condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true')) |
144 | | -
|
145 | | - - script: > |
146 | | - %RunCommand% script\postprocess-junit-results.cmd |
147 | | - --search-folder %TEST_JUNIT_XML_ROOT% --test-results-files "**/*.xml" |
148 | | - env: |
149 | | - TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit |
150 | | - displayName: Post-process test results |
151 | | - condition: ne(variables['Atom.SkipTests'], 'true') |
152 | | -
|
153 | | - - task: PublishTestResults@2 |
154 | | - inputs: |
155 | | - testResultsFormat: JUnit |
156 | | - searchFolder: $(Common.TestResultsDirectory)\junit |
157 | | - testResultsFiles: '**/*.xml' |
158 | | - mergeTestResults: true |
159 | | - testRunTitle: Windows $(buildArch) |
160 | | - condition: ne(variables['Atom.SkipTests'], 'true') |
161 | | - |
162 | | - - script: | |
163 | | - IF NOT EXIST "%ARTIFACT_STAGING_DIR%\crash-reports" MKDIR "%ARTIFACT_STAGING_DIR%\crash-reports" |
164 | | - IF EXIST "%Temp%\Atom Crashes" ( |
165 | | - FOR %%a in ("%Temp%\Atom Crashes\*.dmp") DO XCOPY "%%a" "%ARTIFACT_STAGING_DIR%\crash-reports" /I |
166 | | - ) |
167 | | - displayName: Stage crash reports |
168 | | - condition: failed() |
169 | | - env: |
170 | | - ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
171 | | -
|
172 | | - - task: PublishBuildArtifacts@1 |
173 | | - inputs: |
174 | | - PathtoPublish: $(Build.ArtifactStagingDirectory)/crash-reports |
175 | | - ArtifactName: crash-reports |
176 | | - displayName: Publish crash reports on non-release branch |
177 | | - condition: and(failed(), eq(variables['ATOM_RELEASES_S3_KEY'], '')) |
178 | | - |
179 | | - - script: > |
180 | | - node $(Build.SourcesDirectory)\script\vsts\upload-crash-reports.js --crash-report-path "%ARTIFACT_STAGING_DIR%\crash-reports" --s3-path "vsts-artifacts/%BUILD_ID%/" |
181 | | - env: |
182 | | - ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY) |
183 | | - ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET) |
184 | | - ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET) |
185 | | - ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
186 | | - BUILD_ID: $(Build.BuildId) |
187 | | - displayName: Upload crash reports to S3 on release branch |
188 | | - condition: and(failed(), ne(variables['ATOM_RELEASES_S3_KEY'], '')) |
189 | | -
|
190 | 134 | - task: PublishBuildArtifacts@1 |
191 | 135 | inputs: |
192 | 136 | PathtoPublish: $(Build.SourcesDirectory)/out/atom-x64-windows.zip |
@@ -268,3 +212,178 @@ jobs: |
268 | 212 | ArtifactType: Container |
269 | 213 | displayName: Upload RELEASES |
270 | 214 | condition: and(succeeded(), eq(variables['IsReleaseBranch'], 'true'), eq(variables['buildArch'], 'x86')) |
| 215 | + |
| 216 | + - job: Windows_Tets |
| 217 | + dependsOn: Windows_Build |
| 218 | + timeoutInMinutes: 180 |
| 219 | + strategy: |
| 220 | + maxParallel: 4 |
| 221 | + matrix: |
| 222 | + core_x64: |
| 223 | + RunCoreTests: true |
| 224 | + RunPackageTests: false |
| 225 | + buildArch: x64 |
| 226 | + core_x86: |
| 227 | + RunCoreTests: true |
| 228 | + RunPackageTests: false |
| 229 | + buildArch: x86 |
| 230 | + packages-1: |
| 231 | + RunCoreTests: false |
| 232 | + RunPackageTests: 1 |
| 233 | + buildArch: x64 |
| 234 | + packages-2: |
| 235 | + RunCoreTests: false |
| 236 | + RunPackageTests: 2 |
| 237 | + buildArch: x64 |
| 238 | + |
| 239 | + pool: |
| 240 | + vmImage: vs2017-win2016 |
| 241 | + |
| 242 | + variables: |
| 243 | + AppName: $[ dependencies.GetReleaseVersion.outputs['Version.AppName'] ] |
| 244 | + ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] |
| 245 | + IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] |
| 246 | + IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] |
| 247 | + |
| 248 | + steps: |
| 249 | + - script: | |
| 250 | + IF [%BUILD_ARCH%]==[x64] ( |
| 251 | + SET RunCommand= |
| 252 | + ) ELSE ( |
| 253 | + SET RunCommand=node script\vsts\windows-run.js |
| 254 | + ) |
| 255 | + echo RunCommand set to: %RunCommand% |
| 256 | + env: |
| 257 | + BUILD_ARCH: $(buildArch) |
| 258 | + displayName: Set RunCommand based on the arch |
| 259 | +
|
| 260 | + - task: UsePythonVersion@0 |
| 261 | + inputs: |
| 262 | + versionSpec: '2.7' |
| 263 | + |
| 264 | + - task: NodeTool@0 |
| 265 | + inputs: |
| 266 | + versionSpec: 12.13.1 |
| 267 | + displayName: Install Node.js 12.13.1 |
| 268 | + |
| 269 | + - script: | |
| 270 | + ECHO Installing npm-windows-upgrade |
| 271 | + npm install --global --production npm-windows-upgrade |
| 272 | + displayName: Install npm-windows-upgrade |
| 273 | +
|
| 274 | + - script: | |
| 275 | + ECHO Upgrading npm |
| 276 | + npm-windows-upgrade --no-spinner --no-prompt --npm-version 6.12.1 |
| 277 | + displayName: Install npm 6.12.1 |
| 278 | +
|
| 279 | + - script: | |
| 280 | + npm install --global --production [email protected] |
| 281 | + displayName: Install windows build tools |
| 282 | +
|
| 283 | + - script: | |
| 284 | + cd script\vsts |
| 285 | + npm install |
| 286 | + displayName: Install Windows build dependencies |
| 287 | +
|
| 288 | + - task: Cache@2 |
| 289 | + displayName: Cache node_modules |
| 290 | + inputs: |
| 291 | + key: 'npm | "$(Agent.OS)" | "$(buildArch)" | package.json, package-lock.json, script/vsts/platforms/windows.yml' |
| 292 | + path: 'node_modules' |
| 293 | + cacheHitVar: MainNodeModulesRestored |
| 294 | + |
| 295 | + - task: Cache@2 |
| 296 | + displayName: Cache script/node_modules |
| 297 | + inputs: |
| 298 | + key: 'npm | "$(Agent.OS)" | "$(buildArch)" | script/package.json, script/package-lock.json, script/vsts/platforms/windows.yml' |
| 299 | + path: 'script/node_modules' |
| 300 | + cacheHitVar: ScriptNodeModulesRestored |
| 301 | + |
| 302 | + - task: Cache@2 |
| 303 | + displayName: Cache apm/node_modules |
| 304 | + inputs: |
| 305 | + key: 'npm | "$(Agent.OS)" | "$(buildArch)" | apm/package.json, apm/package-lock.json, script/vsts/platforms/windows.yml' |
| 306 | + path: 'apm/node_modules' |
| 307 | + cacheHitVar: ApmNodeModulesRestored |
| 308 | + |
| 309 | + # Downloading the build artifacts |
| 310 | + - task: DownloadBuildArtifacts@0 |
| 311 | + displayName: Download atom-windows-x64.zip |
| 312 | + inputs: |
| 313 | + artifactName: 'atom-windows-x64.zip' |
| 314 | + downloadPath: $(Build.SourcesDirectory) |
| 315 | + condition: and(succeeded(), eq(variables['buildArch'], 'x64')) |
| 316 | + |
| 317 | + - script: unzip atom-windows-x64.zip/atom-windows-x64.zip -d out |
| 318 | + displayName: Unzip atom-windows-x64.zip |
| 319 | + condition: and(succeeded(), eq(variables['buildArch'], 'x64')) |
| 320 | + |
| 321 | + - task: DownloadBuildArtifacts@0 |
| 322 | + displayName: Download atom-windows-x86.zip |
| 323 | + inputs: |
| 324 | + artifactName: 'atom-windows-x86.zip' |
| 325 | + downloadPath: $(Build.SourcesDirectory) |
| 326 | + condition: and(succeeded(), eq(variables['buildArch'], 'x86')) |
| 327 | + |
| 328 | + - script: unzip atom-windows-x86.zip/atom-windows-x86.zip -d out |
| 329 | + displayName: Unzip atom-windows-x86.zip |
| 330 | + condition: and(succeeded(), eq(variables['buildArch'], 'x86')) |
| 331 | + |
| 332 | + # Run the tests |
| 333 | + - script: | |
| 334 | + %RunCommand% script\test.cmd |
| 335 | + env: |
| 336 | + CI: true |
| 337 | + CI_PROVIDER: VSTS |
| 338 | + ATOM_JASMINE_REPORTER: list |
| 339 | + TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit |
| 340 | + ATOM_RUN_CORE_TESTS: $(RunCoreTests) |
| 341 | + ATOM_RUN_PACKAGE_TESTS: $(RunPackageTests) |
| 342 | + BUILD_ARCH: $(buildArch) |
| 343 | + displayName: Run tests |
| 344 | + condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true')) |
| 345 | +
|
| 346 | + - script: > |
| 347 | + %RunCommand% script\postprocess-junit-results.cmd |
| 348 | + --search-folder %TEST_JUNIT_XML_ROOT% --test-results-files "**/*.xml" |
| 349 | + env: |
| 350 | + TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit |
| 351 | + displayName: Post-process test results |
| 352 | + condition: ne(variables['Atom.SkipTests'], 'true') |
| 353 | +
|
| 354 | + - task: PublishTestResults@2 |
| 355 | + inputs: |
| 356 | + testResultsFormat: JUnit |
| 357 | + searchFolder: $(Common.TestResultsDirectory)\junit |
| 358 | + testResultsFiles: '**/*.xml' |
| 359 | + mergeTestResults: true |
| 360 | + testRunTitle: Windows $(buildArch) |
| 361 | + condition: ne(variables['Atom.SkipTests'], 'true') |
| 362 | + |
| 363 | + - script: | |
| 364 | + IF NOT EXIST "%ARTIFACT_STAGING_DIR%\crash-reports" MKDIR "%ARTIFACT_STAGING_DIR%\crash-reports" |
| 365 | + IF EXIST "%Temp%\Atom Crashes" ( |
| 366 | + FOR %%a in ("%Temp%\Atom Crashes\*.dmp") DO XCOPY "%%a" "%ARTIFACT_STAGING_DIR%\crash-reports" /I |
| 367 | + ) |
| 368 | + displayName: Stage crash reports |
| 369 | + condition: failed() |
| 370 | + env: |
| 371 | + ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
| 372 | +
|
| 373 | + - task: PublishBuildArtifacts@1 |
| 374 | + inputs: |
| 375 | + PathtoPublish: $(Build.ArtifactStagingDirectory)/crash-reports |
| 376 | + ArtifactName: crash-reports |
| 377 | + displayName: Publish crash reports on non-release branch |
| 378 | + condition: and(failed(), eq(variables['ATOM_RELEASES_S3_KEY'], '')) |
| 379 | + |
| 380 | + - script: > |
| 381 | + node $(Build.SourcesDirectory)\script\vsts\upload-crash-reports.js --crash-report-path "%ARTIFACT_STAGING_DIR%\crash-reports" --s3-path "vsts-artifacts/%BUILD_ID%/" |
| 382 | + env: |
| 383 | + ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY) |
| 384 | + ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET) |
| 385 | + ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET) |
| 386 | + ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
| 387 | + BUILD_ID: $(Build.BuildId) |
| 388 | + displayName: Upload crash reports to S3 on release branch |
| 389 | + condition: and(failed(), ne(variables['ATOM_RELEASES_S3_KEY'], '')) |
0 commit comments