-
Notifications
You must be signed in to change notification settings - Fork 25
Support github actions with Windows 10 SDK and VS 2022 (v142) #50
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
Merged
ader1990
merged 22 commits into
cloudbase:master
from
ader1990:add_support_for_github_actions_build_with_utilsactions
Apr 23, 2026
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
eb1c145
binaries: add UtilsActions.dll
ader1990 e85d3b2
github_workflows: add boilerplate
ader1990 5edb8d3
github_workflows: add vs code 2022 and relative path options
ader1990 65502e4
add redist msms
ader1990 8a8af53
remove utils actions project
ader1990 b9431f7
Fix wix error on VS 2022
ader1990 79c6c87
Fix relative root paths
ader1990 8df7e02
Revert "remove utils actions project"
ader1990 b29536b
UtilsActions: bump platformtoolset from 141 to 143
ader1990 1c2d500
UtilsActions: import string
ader1990 61b735f
redist: remove vc redist msms
ader1990 03f04c5
github_workflows: add functional test
ader1990 9848aef
github_workflows: add functional test fix
ader1990 8117960
github_workflows: add functional tests on 2k22 and 2k19
ader1990 16e3902
github_workflows: add os matrix
ader1990 23100a2
github_workflows: detect version matrix
ader1990 d5ddfff
use v142 in order to work on VS2019 github workers
ader1990 ce12b24
Add artifact OS suffix for no name conflicts
ader1990 1efad9d
github_workflows: use 3.13.13
ader1990 647400d
github_workflows: use only win 2022 runner
ader1990 4499a0c
Always use relative dir build path
ader1990 d9e53bd
github_workflows: rename action and steps
ader1990 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| name: Cloudbase-Init - build and functionally test MSI | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| max-parallel: 100 | ||
| matrix: | ||
| os: ['windows-2022'] | ||
| cbsinit_repo: ['https://github.com/cloudbase/cloudbase-init'] | ||
| cbsinit_branch: ['master'] | ||
| python_version: ['3.13_13'] | ||
| platform: ['x64'] | ||
| cloud: [openstack] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Add msbuild to PATH | ||
| uses: microsoft/setup-msbuild@v2 | ||
| - name: Build msi | ||
| shell: cmd | ||
| run: | ||
| powershell.exe .\BuildAutomation\BuildCloudbaseInitSetup.ps1 ^ | ||
| -ClonePullInstallerRepo:$false ^ | ||
| -PythonVersion ${{ matrix.python_version }} ^ | ||
| -Platform ${{ matrix.platform }} ^ | ||
| -VCVars "automatic" ^ | ||
| -VSRedistDir "''" ^ | ||
| -CloudbaseInitRepoUrl ${{ matrix.cbsinit_repo }} ^ | ||
| -CloudbaseInitRepoBranch ${{ matrix.cbsinit_branch }} | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: "CloudbaseInit_${{ matrix.platform }}_${{ matrix.os }}_MSI_${{ matrix.cbsinit_branch }}" | ||
| path: 'CloudbaseInitSetup/bin/release/${{ matrix.platform }}/CloudbaseInitSetup.msi' | ||
| - name: Download external dependencies | ||
| shell: powershell | ||
| run: | | ||
| try { git clone "https://github.com/ader1990/cloudbase-init-test-resources-1" -b "add_openstack_packet_check" cbs-test-res }catch{} | ||
| pushd "cbs-test-res/${{ matrix.cloud }}" | ||
| try { | ||
| & "../bin/mkisofs.exe" -o "../../cloudbase-init-config-drive.iso" -ignore-error -ldots -allow-lowercase -allow-multidot -l -publisher "cbsl" -quiet -J -r -V "config-2" "cloudbase-init-metadata" 2>&1 | %{ "$_" } | ||
| } catch {} | ||
| popd | ||
| - name: Install MSI and functionally test Cloudbase-Init | ||
| shell: powershell | ||
| run: | | ||
| $Erroractionpreference = "Continue" | ||
| $log = "install.log" | ||
| touch $log | ||
| $msiPath = (Resolve-Path "CloudbaseInitSetup/bin/release/${{ matrix.platform }}/CloudbaseInitSetup.msi").Path | ||
| Write-Output $msiPath | ||
| echo $msiPath | ||
| $procMain = Start-Process "msiexec" "/i `"$msiPath`" /qn /l*! `"$log`"" -NoNewWindow -PassThru | ||
| $procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru | ||
| $procMain.WaitForExit() | ||
| $procLog.Kill() | ||
| Mount-DiskImage -ImagePath (Resolve-Path ./cloudbase-init-config-drive.iso) | Out-Null | ||
| Get-PSDrive | Out-Null | ||
| mkdir "./metadata" | Out-Null | ||
| cp -recurse -force "$((Get-DiskImage (Resolve-Path './cloudbase-init-config-drive.iso') | Get-Volume).DriveLetter):\*" "./metadata"; | ||
| if (Test-path ".\metadata\openstack\latest\network_data.json.template") { | ||
| (Get-Content ".\metadata\openstack\latest\network_data.json.template").Replace("REPLACE_MAC_ADDRESS", ((Get-NetAdapter Ethernet).macaddress).Replace("-",":")) | Set-Content ".\metadata\openstack\latest\network_data.json" -Encoding Ascii | ||
| } | ||
| $pythonPath = "C:\\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\python.exe" | ||
| Write-Output "Python version:" | ||
| & $pythonPath --version | ||
| $cloudbaseInitPath = "C:\\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\Scripts\cloudbase-init.exe" | ||
| $pipAuditPath = "C:\\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\Scripts\pip-audit.exe" | ||
| if (!(Test-Path $pythonPath)) { | ||
| $pythonPath = "C:\\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python\python.exe" | ||
| $cloudbaseInitPath = "C:\\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python\Scripts\cloudbase-init.exe" | ||
| $pipAuditPath = "C:\\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python\Scripts\pip-audit.exe" | ||
| } | ||
| Start-Process -FilePath $pythonPath -ArgumentList "-m http.server" -NoNewWindow -WorkingDirectory (Resolve-Path("./metadata")) 2>&1 >> http_server.log | ||
| cd "cbs-test-res/${{ matrix.cloud }}/" | ||
| try { | ||
| $logs = & $cloudbaseInitPath --noreset_service_password --config-file ./cloudbase-init.conf | ||
| } catch {} | ||
| echo $logs | ||
| $errors = $($logs | Where-Object {$_ -like "*error*"}) | ||
| $pluginExecution = $($logs | Where-Object {$_ -like "*Plugins execution done*"}) | ||
| if ($errors -or !$pluginExecution) { | ||
| Write-Output $logs | ||
| Write-Output "Errors found in the execution $($errors.Length)" | ||
| Write-Output $errors | ||
| $userPass501Err = "plugin 'SetUserPasswordPlugin' failed with error '501 Server Error: Unsupported method ('POST') for url" | ||
| if ($errors.Length -gt 20 -and $errors.length -lt 34 -and $errors[0].indexOf($userPass501Err) -gt -1) { | ||
| Write-Output "Expected errors" | ||
| } else { | ||
| Write-Output $("Unexpected error lines: " + $errors.Length + " and found: " + $errors[0].indexOf($userPass501Err)) | ||
| exit 1 | ||
| } | ||
| } | ||
| & $pythonPath -m pip install pip-audit | ||
| $pipAuditLogs = & $pipAuditPath | ||
| Write-Output "$pipAuditLogs" | ||
| if ($LASTEXITCODE) { | ||
| throw "pip audit failed" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| #pragma once | ||
|
|
||
| #include <string> | ||
| #include <vector> | ||
| #include <Ntstatus.h> | ||
| #include <LsaLookup.h> | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
|
|
||
| #include <Ntsecapi.h> | ||
|
|
||
| #include <string> | ||
| #include <sstream> | ||
| #include <algorithm> | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.