Compare commits

..

9 Commits

Author SHA1 Message Date
aparnajyothi-y
fa79cd14e2 Update python-modules.py 2024-07-03 18:59:46 +05:30
aparnajyothi-y
6a2449a067 Update build-python-packages.yml 2024-07-03 18:30:58 +05:30
aparnajyothi-y
68a23eab06 Update python-modules.py 2024-07-03 11:15:51 +05:30
aparnajyothi-y
002e3ccf57 Update python-modules.py 2024-07-02 18:52:13 +05:30
aparnajyothi-y
21085835da Update python-modules.py 2024-07-02 17:59:19 +05:30
aparnajyothi-y
28e5e01695 Update python-modules.py 2024-07-02 17:34:50 +05:30
aparnajyothi-y
06ed60ac23 Update python-tests.ps1 2024-07-02 16:00:52 +05:30
aparnajyothi-y
fc3460f33a Update python-tests.ps1 2024-07-02 11:08:19 +05:30
aparnajyothi-y
d9340e97e0 add ubuntu 24.04_arm64 2024-07-02 11:06:27 +05:30
4 changed files with 355 additions and 1759 deletions

View File

@@ -15,7 +15,7 @@ on:
PLATFORMS: PLATFORMS:
description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)' description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
required: true required: true
default: 'ubuntu-20.04,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-12_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64' default: 'ubuntu-20.04,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-13_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64'
pull_request: pull_request:
paths-ignore: paths-ignore:
- 'versions-manifest.json' - 'versions-manifest.json'
@@ -39,9 +39,9 @@ jobs:
- name: Generate execution matrix - name: Generate execution matrix
id: generate-matrix id: generate-matrix
run: | run: |
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-12,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64' }}".Split(",").Trim() [String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,macos-13,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64' }}".Split(",").Trim()
$matrix = @() $matrix = @()
foreach ($configuration in $configurations) { foreach ($configuration in $configurations) {
$parts = $configuration.Split("_") $parts = $configuration.Split("_")
$os = $parts[0] $os = $parts[0]
@@ -52,13 +52,11 @@ jobs:
"*windows*" { $platform = 'win32' } "*windows*" { $platform = 'win32' }
} }
if ($configuration -eq "ubuntu-22.04_arm64") { if ($configuration -eq "ubuntu-22.04_arm64") {
$os = "setup-actions-ubuntu-arm64-2-core" $os = "setup-actions-ubuntu-arm64-2-core"
} }elseif($configuration -eq "ubuntu-24.04_arm64"){
elseif ($configuration -eq "ubuntu-24.04_arm64") {
$os = "setup-actions-ubuntu24-arm64-2-core" $os = "setup-actions-ubuntu24-arm64-2-core"
} }elseif ($configuration -eq "windows-2019_arm64") {
elseif ($configuration -eq "windows-2019_arm64") {
$os = "setup-actions-windows-arm64-4-core" $os = "setup-actions-windows-arm64-4-core"
} }
@@ -69,7 +67,7 @@ jobs:
} }
} }
echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
build_python: build_python:
needs: generate_matrix needs: generate_matrix
strategy: strategy:
@@ -102,7 +100,7 @@ jobs:
# Install 7-Zip # Install 7-Zip
choco install 7zip -y choco install 7zip -y
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -113,7 +111,7 @@ jobs:
run: | run: |
./builders/build-python.ps1 -Version $env:VERSION ` ./builders/build-python.ps1 -Version $env:VERSION `
-Platform ${{ matrix.platform }} -Architecture ${{ matrix.arch }} -Platform ${{ matrix.platform }} -Architecture ${{ matrix.arch }}
- name: Publish artifact - name: Publish artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@@ -214,7 +212,7 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck Install-Module Pester -Force -Scope CurrentUser
Import-Module Pester Import-Module Pester
$pesterContainer = New-PesterContainer -Path './python-tests.ps1' -Data @{ $pesterContainer = New-PesterContainer -Path './python-tests.ps1' -Data @{
Version="${{ env.VERSION }}"; Version="${{ env.VERSION }}";

View File

@@ -13,5 +13,4 @@ jobs:
name: CodeQL analysis name: CodeQL analysis
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
with: with:
languages: '["python"]' languages: "['python']"

View File

@@ -13,35 +13,29 @@ Import-Module (Join-Path $PSScriptRoot "../builders/python-version.psm1")
BeforeAll { BeforeAll {
function Analyze-MissingModules([string] $buildOutputLocation) { function Analyze-MissingModules([string] $buildOutputLocation) {
$searchStringStart = "Failed to build these modules:" $searchStringStart = "Failed to build these modules:"
$searchStringEnd = "running build_scripts" $searchStringEnd = "running build_scripts"
$pattern = "$searchStringStart(.*?)$searchStringEnd" $pattern = "$searchStringStart(.*?)$searchStringEnd"
$buildContent = Get-Content -Path $buildOutputLocation $buildContent = Get-Content -Path $buildOutputLocation
$splitBuiltOutput = $buildContent -split "\n" $splitBuiltOutput = $buildContent -split "\n";
### Search for missing modules that are displayed between the search strings ### Search for missing modules that are displayed between the search strings
$regexMatch = [regex]::match($splitBuiltOutput, $pattern) $regexMatch = [regex]::match($SplitBuiltOutput, $Pattern)
if ($regexMatch.Success) { if ($regexMatch.Success)
$module = $regexMatch.Groups[1].Value.Trim() {
Write-Host "Failed missing modules:" $module = $regexMatch.Groups[1].Value.Trim()
Write-Host $module Write-Host "Failed missing modules:"
try { Write-Host $module
$semver = [semver]"$($Version.Major).$($Version.Minor)" if ( ($module -eq "_tkinter") -and ( [semver]"$($Version.Major).$($Version.Minor)" -ge [semver]"3.8" ) ) {
} catch { Write-Host "$module $Version ignored"
Write-Error "Invalid Semantic Version format: $Version" } else {
return 1 return 1
}
} }
if (($module -eq "_tkinter") -and ($semver -ge [semver]"3.8")) { return 0
Write-Host "$module $Version ignored"
} else {
return 1
}
} }
return 0
}
} }
Describe "Tests" { Describe "Tests" {
@@ -60,7 +54,7 @@ Describe "Tests" {
# linux has no display name and no $DISPLAY environment variable - skip tk test # linux has no display name and no $DISPLAY environment variable - skip tk test
# if (-not (($Platform -match "ubuntu") -or ($Platform -match "linux"))) { # if (-not (($Platform -match "ubuntu") -or ($Platform -match "linux"))) {
# It "Check if tcl/tk has the same headed and library versions" { # It "Check if tcl/tk has the same headed and library versions" {
# "python ./sources/tcltk.py" | Should -ReturnZeroExitCode # "python ./sources/tcltk.py" | Should -ReturnZeroExitCode
# } # }
# } # }

File diff suppressed because it is too large Load Diff