|
|
|
@@ -146,15 +146,37 @@ jobs:
|
|
|
|
|
}
|
|
|
|
|
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
|
|
|
|
|
|
|
|
|
- name: Check OS Architecture and Python Binary
|
|
|
|
|
shell: pwsh
|
|
|
|
|
run: |
|
|
|
|
|
Write-Host "OS Architecture:"
|
|
|
|
|
[System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
|
|
|
|
|
|
|
|
|
|
$pythonPath = "C:\\hostedtoolcache\\windows\\Python\\${{ env.VERSION }}\\${{ matrix.arch }}\\python.exe"
|
|
|
|
|
Write-Host "Checking python.exe path: $pythonPath"
|
|
|
|
|
if (Test-Path $pythonPath) {
|
|
|
|
|
$file = Get-Item $pythonPath
|
|
|
|
|
Write-Host "python.exe exists. Size: $($file.Length) bytes"
|
|
|
|
|
} else {
|
|
|
|
|
Write-Host "python.exe is missing at $pythonPath"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Write-Host "Listing Toolcache directory:"
|
|
|
|
|
Get-ChildItem "C:\\hostedtoolcache\\windows\\Python\\${{ env.VERSION }}\\${{ matrix.arch }}" -Recurse -Force
|
|
|
|
|
|
|
|
|
|
Write-Host "Listing extracted artifact contents:"
|
|
|
|
|
Get-ChildItem -Recurse "${{ runner.temp }}\\${{ env.ARTIFACT_NAME }}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Apply build artifact to the local machine
|
|
|
|
|
run: |
|
|
|
|
|
$PSNativeCommandUseErrorActionPreference = $true
|
|
|
|
|
if ('${{ matrix.platform }}' -eq 'win32') {
|
|
|
|
|
powershell ./setup.ps1
|
|
|
|
|
} else {
|
|
|
|
|
sh ./setup.sh
|
|
|
|
|
cp ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}/build_output.txt ${{ runner.temp }}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
sh ./setup.sh
|
|
|
|
|
cp ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}/build_output.txt ${{ runner.temp }}
|
|
|
|
|
}
|
|
|
|
|
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
|
|
|
|
|
|
|
|
|
- name: Setup Python ${{ env.VERSION }}
|
|
|
|
@@ -179,20 +201,21 @@ jobs:
|
|
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
|
run: |
|
|
|
|
|
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
|
|
|
|
|
Import-Module Pester
|
|
|
|
|
$pesterContainer = New-PesterContainer -Path './python-tests.ps1' -Data @{
|
|
|
|
|
Version="${{ env.VERSION }}";
|
|
|
|
|
Platform="${{ matrix.platform }}";
|
|
|
|
|
Architecture="${{ matrix.arch }}";
|
|
|
|
|
}
|
|
|
|
|
$Result = Invoke-Pester -Container $pesterContainer -PassThru
|
|
|
|
|
if ($Result.FailedCount -gt 0) {
|
|
|
|
|
$host.SetShouldExit($Result.FailedCount)
|
|
|
|
|
exit $Result.FailedCount
|
|
|
|
|
}
|
|
|
|
|
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
|
|
|
|
|
Import-Module Pester
|
|
|
|
|
$pesterContainer = New-PesterContainer -Path './python-tests.ps1' -Data @{
|
|
|
|
|
Version="${{ env.VERSION }}";
|
|
|
|
|
Platform="${{ matrix.platform }}";
|
|
|
|
|
Architecture="${{ matrix.arch }}";
|
|
|
|
|
}
|
|
|
|
|
$Result = Invoke-Pester -Container $pesterContainer -PassThru
|
|
|
|
|
if ($Result.FailedCount -gt 0) {
|
|
|
|
|
$host.SetShouldExit($Result.FailedCount)
|
|
|
|
|
exit $Result.FailedCount
|
|
|
|
|
}
|
|
|
|
|
working-directory: ${{ github.workspace }}/tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
publish_release:
|
|
|
|
|
name: Publish release
|
|
|
|
|
if: github.event_name == 'workflow_dispatch' && inputs.PUBLISH_RELEASES
|
|
|
|
|