Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new pipeline using the latest webview2 from Edge Canary #36317

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ lhwnd
LIBID
licate
lindex
linkid
LINKOVERLAY
LINQTo
listview
Expand Down
42 changes: 42 additions & 0 deletions .pipelines/v2/ci-test-with-canary-webview2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
trigger: none
pr: none
schedules:
- cron: "0 0 * * *" # every day at midnight
displayName: "Daily midnight Build"
branches:
include:
- main
always: false # only run if there's code changes!

name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)

parameters:
- name: buildPlatforms
type: object
default:
- x64
- arm64
- name: enableMsBuildCaching
type: boolean
displayName: "Enable MSBuild Caching"
default: false
- name: runTests
type: boolean
displayName: "Run Tests"
default: true
- name: useVSPreview
type: boolean
displayName: "Build Using Visual Studio Preview"
default: false
- name: useLatestWebView2
type: boolean
default: false

extends:
template: templates/pipeline-ci-build.yml
parameters:
buildPlatforms: ${{ parameters.buildPlatforms }}
enableMsBuildCaching: ${{ parameters.enableMsBuildCaching }}
runTests: ${{ parameters.runTests }}
useVSPreview: ${{ parameters.useVSPreview }}
useLatestWebView2: ${{ parameters.useLatestWebView2 }}
26 changes: 26 additions & 0 deletions .pipelines/v2/templates/job-test-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ parameters:
- name: inputArtifactStem
type: string
default: ""
- name: useLatestWebView2
type: boolean
default: false

jobs:
- job: Test${{ parameters.platform }}${{ parameters.configuration }}
Expand All @@ -34,6 +37,29 @@ jobs:
fetchDepth: 1
fetchTags: false

- ${{ if eq(parameters.useLatestWebView2, true) }}:
- powershell: |
$edge_url = 'https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en'
$timeout = New-TimeSpan -Minutes 6
$timeoutSeconds = [int]$timeout.TotalSeconds
$command = {
Invoke-WebRequest -Uri $using:edge_url -OutFile $(Pipeline.Workspace)\MicrosoftEdgeSetup.exe
Write-Host "##[command]Installing Canary channel of Microsoft Edge"
Start-Process $(Pipeline.Workspace)\MicrosoftEdgeSetup.exe -ArgumentList '/silent /install' -Wait
}

$job = Start-Job -ScriptBlock $command
Wait-Job $job -Timeout $timeoutSeconds
if ($job.State -eq "Running") {
Stop-Job $job
Write-Host "##[warning]The job was stopped because it exceeded the time limit."
}
displayName: "Install the latest MSEdge Canary"

- script:
reg add "HKLM\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels" /v PowerToys.exe /t REG_SZ /d "3"
displayName: "Enable WebView2 Canary Channel"

- download: current
displayName: Download artifacts
artifact: build-${{ parameters.platform }}-${{ parameters.configuration }}${{ parameters.inputArtifactStem }}
Expand Down
4 changes: 4 additions & 0 deletions .pipelines/v2/templates/pipeline-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ parameters:
- name: useVSPreview
type: boolean
default: false
- name: useLatestWebView2
type: boolean
default: false

stages:
# Allow manual builds to skip pre-check
Expand Down Expand Up @@ -66,3 +69,4 @@ stages:
parameters:
platform: ${{ platform }}
configuration: Release
useLatestWebView2: ${{ parameters.useLatestWebView2 }}
Loading