Revert to one job instead of two

Splitting into build and test jobs is slower and we can set individual timeouts on the test steps.
This commit is contained in:
John Kleinschmidt 2018-09-21 16:54:24 -04:00
Родитель 334fea3d7b
Коммит 806e236850
1 изменённых файлов: 22 добавлений и 107 удалений

129
vsts.yml
Просмотреть файл

@ -70,113 +70,6 @@ jobs:
displayName: Check sccache stats after build
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
- bash: |
cd src
ninja -C out/Default electron:electron_dist_zip
displayName: Build dist zip
- bash: |
cd src
ninja -C out/Default electron:electron_chromedriver_zip
displayName: Build chromedriver and zip
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts (application zip)
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/dist.zip'
ArtifactName: Default
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts (chromedriver.zip)
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/chromedriver.zip'
ArtifactName: Default
- task: PublishBuildArtifacts@1
displayName: Publish gn args for ffmpeg testing
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/args.gn'
ArtifactName: Default
- task: PublishBuildArtifacts@1
displayName: Publish build.ninja for ffmpeg testing
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/build.ninja'
ArtifactName: Default
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
- task: PublishBuildArtifacts@1
displayName: Publish libffmpeg.dylib for ffmpeg testing
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/ffmpeg/libffmpeg.dylib'
ArtifactName: ffmpeg
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
- bash: |
cd src
find -L buildtools -type l -exec rm -- {} +
displayName: Remove broken symlinks from buildtools
- task: PublishBuildArtifacts@1
displayName: Publish buildtools for ffmpeg testing
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/buildtools'
ArtifactName: buildtools
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
- task: PublishBuildArtifacts@1
displayName: Publish Node.js headers for testing
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/gen/node_headers'
ArtifactName: node_headers
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
- job: Test_Electron_Build
displayName: Test
dependsOn: Build_Electron_via_GN
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
timeoutInMinutes: 30
steps:
- bash: |
set -ex
mkdir -p src/out/Default/gen
mkdir -p src/out/ffmpeg
git clone https://github.com/electron/electron src/electron
(cd src/electron; git fetch origin +"${BUILD_SOURCEBRANCH}"; git checkout "${BUILD_SOURCEVERSION}")
cd src
export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools
echo "##vso[task.setvariable variable=CHROMIUM_BUILDTOOLS_PATH]`pwd`/buildtools"
displayName: Checkout Electron
- task: DownloadBuildArtifacts@0
displayName: 'Download files needed for testing'
inputs:
artifactName: Default
downloadPath: '$(System.DefaultWorkingDirectory)/src/out'
- task: DownloadBuildArtifacts@0
displayName: 'Download ffmpeg.dylib for testing ffmpeg'
inputs:
artifactName: ffmpeg
downloadPath: '$(System.DefaultWorkingDirectory)/src/out'
- task: DownloadBuildArtifacts@0
displayName: 'Download buildtools for testing ffmpeg'
inputs:
artifactName: buildtools
downloadPath: '$(System.DefaultWorkingDirectory)/src'
- task: DownloadBuildArtifacts@0
displayName: 'Download Node.js headers'
inputs:
artifactName: node_headers
downloadPath: '$(System.DefaultWorkingDirectory)/src/out/Default/gen'
- bash: |
cd src/out/Default
unzip dist.zip
displayName: Unzip Electron app
- bash: |
if pgrep Electron; then
killall Electron
@ -199,6 +92,16 @@ jobs:
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
timeoutInMinutes: 10
- bash: |
cd src
ninja -C out/Default electron:electron_dist_zip
displayName: Build dist zip
- bash: |
cd src
ninja -C out/Default electron:electron_chromedriver_zip
displayName: Build chromedriver and zip
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
@ -206,6 +109,18 @@ jobs:
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
condition: and(always(), eq(variables['MOCHA_FILE'], 'junit/test-results.xml'))
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts (application zip)
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/dist.zip'
ArtifactName: Default
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts (chromedriver.zip)
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/chromedriver.zip'
ArtifactName: Default
- bash: |
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
export MESSAGE="Build failed for *<$BUILD_URL|$BUILD_DEFINITIONNAME>* nightly build."