|
1 | 1 | jobs:
|
2 |
| - - job: Windows |
| 2 | + - job: Windows_Build |
3 | 3 | dependsOn: GetReleaseVersion
|
4 | 4 | timeoutInMinutes: 180
|
5 | 5 | strategy:
|
@@ -114,69 +114,13 @@ jobs:
|
114 | 114 | npm_config_build_from_source: true
|
115 | 115 | displayName: Build Atom
|
116 | 116 |
|
117 |
| - - script: | |
118 |
| - %RunCommand% script\test.cmd |
119 |
| - env: |
120 |
| - CI: true |
121 |
| - CI_PROVIDER: VSTS |
122 |
| - ATOM_JASMINE_REPORTER: list |
123 |
| - TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit |
124 |
| - BUILD_ARCH: $(buildArch) |
125 |
| - displayName: Run tests |
126 |
| - condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true')) |
127 |
| -
|
128 |
| - - script: > |
129 |
| - %RunCommand% script\postprocess-junit-results.cmd |
130 |
| - --search-folder %TEST_JUNIT_XML_ROOT% --test-results-files "**/*.xml" |
131 |
| - env: |
132 |
| - TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit |
133 |
| - displayName: Post-process test results |
134 |
| - condition: ne(variables['Atom.SkipTests'], 'true') |
135 |
| -
|
136 |
| - - task: PublishTestResults@2 |
137 |
| - inputs: |
138 |
| - testResultsFormat: JUnit |
139 |
| - searchFolder: $(Common.TestResultsDirectory)\junit |
140 |
| - testResultsFiles: '**/*.xml' |
141 |
| - mergeTestResults: true |
142 |
| - testRunTitle: Windows $(buildArch) |
143 |
| - condition: ne(variables['Atom.SkipTests'], 'true') |
144 |
| - |
145 |
| - - script: | |
146 |
| - IF NOT EXIST "%ARTIFACT_STAGING_DIR%\crash-reports" MKDIR "%ARTIFACT_STAGING_DIR%\crash-reports" |
147 |
| - IF EXIST "%Temp%\Atom Crashes" ( |
148 |
| - FOR %%a in ("%Temp%\Atom Crashes\*.dmp") DO XCOPY "%%a" "%ARTIFACT_STAGING_DIR%\crash-reports" /I |
149 |
| - ) |
150 |
| - displayName: Stage crash reports |
151 |
| - condition: failed() |
152 |
| - env: |
153 |
| - ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
154 |
| -
|
155 |
| - - task: PublishBuildArtifacts@1 |
156 |
| - inputs: |
157 |
| - PathtoPublish: $(Build.ArtifactStagingDirectory)/crash-reports |
158 |
| - ArtifactName: crash-reports |
159 |
| - displayName: Publish crash reports on non-release branch |
160 |
| - condition: and(failed(), eq(variables['ATOM_RELEASES_S3_KEY'], '')) |
161 |
| - |
162 |
| - - script: > |
163 |
| - node $(Build.SourcesDirectory)\script\vsts\upload-crash-reports.js --crash-report-path "%ARTIFACT_STAGING_DIR%\crash-reports" --s3-path "vsts-artifacts/%BUILD_ID%/" |
164 |
| - env: |
165 |
| - ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY) |
166 |
| - ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET) |
167 |
| - ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET) |
168 |
| - ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
169 |
| - BUILD_ID: $(Build.BuildId) |
170 |
| - displayName: Upload crash reports to S3 on release branch |
171 |
| - condition: and(failed(), ne(variables['ATOM_RELEASES_S3_KEY'], '')) |
172 |
| -
|
173 | 117 | - task: PublishBuildArtifacts@1
|
174 | 118 | inputs:
|
175 | 119 | PathtoPublish: $(Build.SourcesDirectory)/out/atom-x64-windows.zip
|
176 | 120 | ArtifactName: atom-x64-windows.zip
|
177 | 121 | ArtifactType: Container
|
178 | 122 | displayName: Upload atom-x64-windows.zip
|
179 |
| - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['buildArch'], 'x64')) |
| 123 | + condition: and(succeeded(), eq(variables['buildArch'], 'x64')) |
180 | 124 |
|
181 | 125 | - task: PublishBuildArtifacts@1
|
182 | 126 | inputs:
|
@@ -217,7 +161,7 @@ jobs:
|
217 | 161 | ArtifactName: atom-windows.zip
|
218 | 162 | ArtifactType: Container
|
219 | 163 | displayName: Upload atom-windows.zip
|
220 |
| - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['buildArch'], 'x86')) |
| 164 | + condition: and(succeeded(), eq(variables['buildArch'], 'x86')) |
221 | 165 |
|
222 | 166 | - task: PublishBuildArtifacts@1
|
223 | 167 | inputs:
|
@@ -251,3 +195,161 @@ jobs:
|
251 | 195 | ArtifactType: Container
|
252 | 196 | displayName: Upload RELEASES
|
253 | 197 | condition: and(succeeded(), eq(variables['IsReleaseBranch'], 'true'), eq(variables['buildArch'], 'x86'))
|
| 198 | + |
| 199 | + - job: Windows_Tets |
| 200 | + dependsOn: Windows_Build |
| 201 | + timeoutInMinutes: 180 |
| 202 | + strategy: |
| 203 | + maxParallel: 4 |
| 204 | + matrix: |
| 205 | + core_x64: |
| 206 | + RunCoreTests: true |
| 207 | + RunPackageTests: false |
| 208 | + buildArch: x64 |
| 209 | + core_x86: |
| 210 | + RunCoreTests: true |
| 211 | + RunPackageTests: false |
| 212 | + buildArch: x86 |
| 213 | + packages-1: |
| 214 | + RunCoreTests: false |
| 215 | + RunPackageTests: 1 |
| 216 | + buildArch: x64 |
| 217 | + packages-2: |
| 218 | + RunCoreTests: false |
| 219 | + RunPackageTests: 2 |
| 220 | + buildArch: x64 |
| 221 | + |
| 222 | + pool: |
| 223 | + vmImage: vs2017-win2016 |
| 224 | + |
| 225 | + variables: |
| 226 | + AppName: $[ dependencies.GetReleaseVersion.outputs['Version.AppName'] ] |
| 227 | + ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] |
| 228 | + IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] |
| 229 | + IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] |
| 230 | + |
| 231 | + steps: |
| 232 | + - script: | |
| 233 | + IF [%BUILD_ARCH%]==[x64] ( |
| 234 | + SET RunCommand= |
| 235 | + ) ELSE ( |
| 236 | + SET RunCommand=node script\vsts\windows-run.js |
| 237 | + ) |
| 238 | + echo RunCommand set to: %RunCommand% |
| 239 | + env: |
| 240 | + BUILD_ARCH: $(buildArch) |
| 241 | + displayName: Set RunCommand based on the arch |
| 242 | +
|
| 243 | + - task: UsePythonVersion@0 |
| 244 | + inputs: |
| 245 | + versionSpec: '2.7' |
| 246 | + |
| 247 | + - task: NodeTool@0 |
| 248 | + inputs: |
| 249 | + versionSpec: 12.13.1 |
| 250 | + displayName: Install Node.js 12.13.1 |
| 251 | + |
| 252 | + - script: | |
| 253 | + ECHO Installing npm-windows-upgrade |
| 254 | + npm install --global --production npm-windows-upgrade |
| 255 | + displayName: Install npm-windows-upgrade |
| 256 | +
|
| 257 | + - script: | |
| 258 | + ECHO Upgrading npm |
| 259 | + npm-windows-upgrade --no-spinner --no-prompt --npm-version 6.12.1 |
| 260 | + displayName: Install npm 6.12.1 |
| 261 | +
|
| 262 | + - script: | |
| 263 | + npm install --global --production [email protected] |
| 264 | + displayName: Install windows build tools |
| 265 | +
|
| 266 | + - script: | |
| 267 | + cd script\vsts |
| 268 | + npm install |
| 269 | + displayName: Install Windows build dependencies |
| 270 | +
|
| 271 | + - template: cache.yml |
| 272 | + parameters: |
| 273 | + OS: windows |
| 274 | + |
| 275 | + # Downloading the build artifacts |
| 276 | + - task: DownloadBuildArtifacts@0 |
| 277 | + displayName: Download atom-x64-windows.zip |
| 278 | + inputs: |
| 279 | + artifactName: 'atom-x64-windows.zip' |
| 280 | + downloadPath: $(Build.SourcesDirectory) |
| 281 | + condition: and(succeeded(), eq(variables['buildArch'], 'x64')) |
| 282 | + |
| 283 | + - script: unzip atom-x64-windows.zip/atom-x64-windows.zip -d out |
| 284 | + displayName: Unzip atom-x64-windows.zip |
| 285 | + condition: and(succeeded(), eq(variables['buildArch'], 'x64')) |
| 286 | + |
| 287 | + - task: DownloadBuildArtifacts@0 |
| 288 | + displayName: Download atom-windows.zip |
| 289 | + inputs: |
| 290 | + artifactName: 'atom-windows.zip' |
| 291 | + downloadPath: $(Build.SourcesDirectory) |
| 292 | + condition: and(succeeded(), eq(variables['buildArch'], 'x86')) |
| 293 | + |
| 294 | + - script: unzip atom-windows.zip/atom-windows.zip -d out |
| 295 | + displayName: Unzip atom-windows.zip |
| 296 | + condition: and(succeeded(), eq(variables['buildArch'], 'x86')) |
| 297 | + |
| 298 | + # Run the tests |
| 299 | + - script: | |
| 300 | + %RunCommand% script\test.cmd |
| 301 | + env: |
| 302 | + CI: true |
| 303 | + CI_PROVIDER: VSTS |
| 304 | + ATOM_JASMINE_REPORTER: list |
| 305 | + TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit |
| 306 | + ATOM_RUN_CORE_TESTS: $(RunCoreTests) |
| 307 | + ATOM_RUN_PACKAGE_TESTS: $(RunPackageTests) |
| 308 | + BUILD_ARCH: $(buildArch) |
| 309 | + displayName: Run tests |
| 310 | + condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true')) |
| 311 | +
|
| 312 | + - script: > |
| 313 | + %RunCommand% script\postprocess-junit-results.cmd |
| 314 | + --search-folder %TEST_JUNIT_XML_ROOT% --test-results-files "**/*.xml" |
| 315 | + env: |
| 316 | + TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit |
| 317 | + displayName: Post-process test results |
| 318 | + condition: ne(variables['Atom.SkipTests'], 'true') |
| 319 | +
|
| 320 | + - task: PublishTestResults@2 |
| 321 | + inputs: |
| 322 | + testResultsFormat: JUnit |
| 323 | + searchFolder: $(Common.TestResultsDirectory)\junit |
| 324 | + testResultsFiles: '**/*.xml' |
| 325 | + mergeTestResults: true |
| 326 | + testRunTitle: Windows $(buildArch) |
| 327 | + condition: ne(variables['Atom.SkipTests'], 'true') |
| 328 | + |
| 329 | + - script: | |
| 330 | + IF NOT EXIST "%ARTIFACT_STAGING_DIR%\crash-reports" MKDIR "%ARTIFACT_STAGING_DIR%\crash-reports" |
| 331 | + IF EXIST "%Temp%\Atom Crashes" ( |
| 332 | + FOR %%a in ("%Temp%\Atom Crashes\*.dmp") DO XCOPY "%%a" "%ARTIFACT_STAGING_DIR%\crash-reports" /I |
| 333 | + ) |
| 334 | + displayName: Stage crash reports |
| 335 | + condition: failed() |
| 336 | + env: |
| 337 | + ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
| 338 | +
|
| 339 | + - task: PublishBuildArtifacts@1 |
| 340 | + inputs: |
| 341 | + PathtoPublish: $(Build.ArtifactStagingDirectory)/crash-reports |
| 342 | + ArtifactName: crash-reports |
| 343 | + displayName: Publish crash reports on non-release branch |
| 344 | + condition: and(failed(), eq(variables['ATOM_RELEASES_S3_KEY'], '')) |
| 345 | + |
| 346 | + - script: > |
| 347 | + node $(Build.SourcesDirectory)\script\vsts\upload-crash-reports.js --crash-report-path "%ARTIFACT_STAGING_DIR%\crash-reports" --s3-path "vsts-artifacts/%BUILD_ID%/" |
| 348 | + env: |
| 349 | + ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY) |
| 350 | + ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET) |
| 351 | + ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET) |
| 352 | + ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
| 353 | + BUILD_ID: $(Build.BuildId) |
| 354 | + displayName: Upload crash reports to S3 on release branch |
| 355 | + condition: and(failed(), ne(variables['ATOM_RELEASES_S3_KEY'], '')) |
0 commit comments