Skip to content

Commit 549e0d8

Browse files
author
John Kleinschmidt
committed
ci: speed up woa testing
Instead of copying the checkout to src\electron, just use the checkout step with the proper path. This should save around 9 minutes on the WOA jobs (eg see https://github.visualstudio.com/electron/_build/results?buildId=65027&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=944b7e9c-00d2-5ab3-4f94-8de8fe321ef4&l=1)
1 parent 3e8d77d commit 549e0d8

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

azure-pipelines-woa.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
steps:
2-
- task: CopyFiles@2
3-
displayName: 'Copy Files to: src\electron'
4-
inputs:
5-
TargetFolder: src\electron
2+
- checkout: self
3+
path: src\electron
64

75
- script: |
8-
cd src\electron
6+
cd electron
97
node script/yarn.js install --frozen-lockfile
108
displayName: 'Yarn install'
119

1210
- powershell: |
1311
$localArtifactPath = "$pwd\dist.zip"
1412
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/dist.zip"
1513
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
16-
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath
14+
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -oout\Default -y $localArtifactPath
1715
displayName: 'Download and extract dist.zip for test'
1816
env:
1917
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
2018

2119
- powershell: |
22-
$localArtifactPath = "$pwd\src\out\Default\shell_browser_ui_unittests.exe"
20+
$localArtifactPath = "$pwd\out\Default\shell_browser_ui_unittests.exe"
2321
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/shell_browser_ui_unittests.exe"
2422
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
2523
displayName: 'Download and extract native test executables for test'
@@ -30,36 +28,34 @@ steps:
3028
$localArtifactPath = "$pwd\ffmpeg.zip"
3129
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/ffmpeg.zip"
3230
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
33-
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath
31+
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -oout\ffmpeg $localArtifactPath
3432
displayName: 'Download and extract ffmpeg.zip for test'
3533
env:
3634
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
3735

3836
- powershell: |
39-
$localArtifactPath = "$pwd\src\node_headers.zip"
37+
$localArtifactPath = "$pwd\node_headers.zip"
4038
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/node_headers.zip"
4139
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
42-
cd src
4340
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip
4441
displayName: 'Download node headers for test'
4542
env:
4643
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
4744

4845
- powershell: |
49-
$localArtifactPath = "$pwd\src\out\Default\electron.lib"
46+
$localArtifactPath = "$pwd\out\Default\electron.lib"
5047
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/electron.lib"
5148
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
5249
displayName: 'Download electron.lib for test'
5350
env:
5451
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
5552

5653
- powershell: |
57-
New-Item src\out\Default\gen\node_headers\Release -Type directory
58-
Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib
54+
New-Item out\Default\gen\node_headers\Release -Type directory
55+
Copy-Item -path out\Default\electron.lib -destination out\Default\gen\node_headers\Release\node.lib
5956
displayName: 'Setup node headers'
6057

6158
- script: |
62-
cd src
6359
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
6460
set npm_config_arch=arm64
6561
cd electron
@@ -76,11 +72,10 @@ steps:
7672
displayName: 'Publish Test Results'
7773
inputs:
7874
testResultsFiles: '*.xml'
79-
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
75+
searchFolder: '$(System.DefaultWorkingDirectory)/junit/'
8076
condition: always()
8177

8278
- script: |
83-
cd src
8479
echo "Verifying non proprietary ffmpeg"
8580
python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
8681
displayName: 'Verify ffmpeg'

0 commit comments

Comments
 (0)