Skip to content

Commit db7ea61

Browse files
committed
Update manifest support for ARM64
1 parent 20922fc commit db7ea61

4 files changed

Lines changed: 97 additions & 103 deletions

File tree

.github/workflows/update-manifest-arm.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/update-manifest.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,76 @@ jobs:
112112
- name: "Run if no changes have been detected"
113113
if: steps.commit.outputs.changes_detected == 'false'
114114
run: echo "No changes detected."
115+
116+
validate-arm64:
117+
runs-on: windows-11-arm
118+
needs: validate-versions
119+
120+
steps:
121+
- uses: actions/checkout@v4
122+
with:
123+
ref: development
124+
token: ${{ secrets.GITHUB_TOKEN }}
125+
126+
# Import GPG key so that we can sign the commit
127+
- name: Import GPG key
128+
id: import_gpg
129+
uses: crazy-max/ghaction-import-gpg@v6
130+
with:
131+
gpg_private_key: ${{ secrets.GPGKEY }}
132+
passphrase: ${{ secrets.GPGPASSPHRASE }}
133+
git_user_signingkey: true
134+
git_commit_gpgsign: true
135+
git_config_global: true
136+
git_tag_gpgsign: true
137+
git_push_gpgsign: false
138+
git_committer_name: ${{ secrets.COMMIT_NAME }}
139+
git_committer_email: ${{ secrets.COMMIT_EMAIL }}
140+
141+
# Uninstall existing VcRedists
142+
- name: Uninstall VcRedists
143+
shell: powershell
144+
run: |
145+
Import-Module ${{ github.workspace }}\VcRedist -Force
146+
Get-InstalledVcRedist | Uninstall-VcRedist -Confirm:$False -Verbose
147+
148+
# Validate VcRedist 2022 and update the manifest
149+
- name: Validate VcRedist 2022
150+
shell: powershell
151+
run: |
152+
$Release = "2022"
153+
$Architecture = "arm64"
154+
Import-Module "${{ github.workspace }}\VcRedist" -Force
155+
New-Item -Path "$env:RUNNER_TEMP\VcRedist" -ItemType "Directory" -ErrorAction "SilentlyContinue" | Out-Null
156+
Get-VcList -Release $Release -Architecture $Architecture | Save-VcRedist -Path "$env:RUNNER_TEMP\VcRedist" | Install-VcRedist
157+
$params = @{
158+
Release = $Release
159+
$Architecture = $Architecture
160+
Path = "$env:RUNNER_TEMP\VcRedist"
161+
VcManifest = "${{ env.MANIFEST_FILE }}"
162+
}
163+
. ${{ github.workspace }}\ci\Update-Manifest.ps1 @params
164+
165+
# Format the date number for the commit message
166+
- name: Get date
167+
id: get-date
168+
shell: powershell
169+
run: |
170+
echo "::set-output name=date::$(Get-Date -Format "yyyy-MM-dd")"
171+
172+
# Commit changes to the manifest
173+
- name: Commit changes
174+
id: commit
175+
uses: stefanzweifel/git-auto-commit-action@v5
176+
with:
177+
commit_message: "Update manifest ARM64 ${{ steps.get-date.outputs.date }}.${{ github.run_number }}"
178+
commit_user_name: ${{ secrets.COMMIT_NAME }}
179+
commit_user_email: ${{ secrets.COMMIT_EMAIL }}
180+
181+
- name: "Run if changes have been detected"
182+
if: steps.commit.outputs.changes_detected == 'true'
183+
run: echo "Changes committed."
184+
185+
- name: "Run if no changes have been detected"
186+
if: steps.commit.outputs.changes_detected == 'false'
187+
run: echo "No changes detected."

.github/workflows/validate-module.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
runs-on: ${{ matrix.os }}
5151
strategy:
5252
matrix:
53-
os: [windows-2022]
53+
os: [windows-2022, windows-2025]
5454

5555
steps:
5656
- uses: actions/checkout@v4

ci/Update-Manifest.ps1

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[CmdletBinding()]
99
param (
1010
[System.String[]] $Release,
11+
[System.String[]] $Architecture = @("x64", "x86"),
1112
[System.String] $Path,
1213
[System.String] $VcManifest
1314
)
@@ -21,31 +22,33 @@ process {
2122

2223
$Output = @()
2324
$FoundNewVersion = $false
24-
foreach ($Item in $Release) {
25+
foreach ($Arch in $Architecture) {
26+
foreach ($Rls in $Release) {
2527

26-
Write-Host "`tInstalling VcRedist $Item." -ForegroundColor "Cyan"
27-
Get-VcList -Release $Item | Save-VcRedist -Path $Path | Install-VcRedist -Silent
28-
$InstalledVcRedists = Get-InstalledVcRedist | Where-Object { $_.Name -notmatch "Debug Runtime" }
28+
Write-Host "`tInstalling VcRedist $Rls." -ForegroundColor "Cyan"
29+
Get-VcList -Release $Rls -Architecture $Arch | Save-VcRedist -Path $Path | Install-VcRedist -Silent
30+
$InstalledVcRedists = Get-InstalledVcRedist | Where-Object { $_.Name -notmatch "Debug Runtime" }
2931

30-
# Filter the VcRedists for the target version and compare against what has been installed
31-
foreach ($ManifestVcRedist in ($CurrentManifest.Supported | Where-Object { $_.Release -eq $Item })) {
32-
$InstalledItem = $InstalledVcRedists | Where-Object { ($_.Release -eq $ManifestVcRedist.Release) -and ($_.Architecture -eq $ManifestVcRedist.Architecture) }
32+
# Filter the VcRedists for the target version and compare against what has been installed
33+
foreach ($ManifestVcRedist in ($CurrentManifest.Supported | Where-Object { $_.Release -eq $Rls -and $_.Architecture -eq $Arch })) {
34+
$InstalledItem = $InstalledVcRedists | Where-Object { ($_.Release -eq $ManifestVcRedist.Release) -and ($_.Architecture -eq $ManifestVcRedist.Architecture) }
3335

34-
# If the manifest version of the VcRedist is lower than the installed version, the manifest is out of date
35-
if ([System.Version]$InstalledItem.Version -gt [System.Version]$ManifestVcRedist.Version) {
36-
Write-Host -ForegroundColor "Cyan" "`tVcRedist manifest is out of date."
37-
Write-Host -ForegroundColor "Cyan" "`tInstalled version:`t$($InstalledItem.Version)"
38-
Write-Host -ForegroundColor "Cyan" "`tManifest version:`t$($ManifestVcRedist.Version)"
36+
# If the manifest version of the VcRedist is lower than the installed version, the manifest is out of date
37+
if ([System.Version]$InstalledItem.Version -gt [System.Version]$ManifestVcRedist.Version) {
38+
Write-Host -ForegroundColor "Cyan" "`tVcRedist manifest is out of date."
39+
Write-Host -ForegroundColor "Cyan" "`tInstalled version:`t$($InstalledItem.Version)"
40+
Write-Host -ForegroundColor "Cyan" "`tManifest version:`t$($ManifestVcRedist.Version)"
3941

40-
# Find the index of the VcRedist in the manifest and update it's properties
41-
$Index = $CurrentManifest.Supported::IndexOf($CurrentManifest.Supported.ProductCode, $ManifestVcRedist.ProductCode)
42-
$CurrentManifest.Supported[$Index].ProductCode = $InstalledItem.ProductCode
43-
$CurrentManifest.Supported[$Index].Version = $InstalledItem.Version
42+
# Find the index of the VcRedist in the manifest and update it's properties
43+
$Index = $CurrentManifest.Supported::IndexOf($CurrentManifest.Supported.ProductCode, $ManifestVcRedist.ProductCode)
44+
$CurrentManifest.Supported[$Index].ProductCode = $InstalledItem.ProductCode
45+
$CurrentManifest.Supported[$Index].Version = $InstalledItem.Version
4446

45-
# Create output variable
46-
# $NewVersion = $InstalledItem.Version
47-
$FoundNewVersion = $true
48-
$Output += $Item
47+
# Create output variable
48+
# $NewVersion = $InstalledItem.Version
49+
$FoundNewVersion = $true
50+
$Output += $Rls
51+
}
4952
}
5053
}
5154
}

0 commit comments

Comments
 (0)