Compare commits

..

33 Commits

Author SHA1 Message Date
aparnajyothi-y
9ad4c1fcaa Update build-python-packages.yml 2024-06-14 10:31:10 +05:30
aparnajyothi-y
3f1c6125df Update build-python-packages.yml 2024-06-14 10:19:44 +05:30
aparnajyothi-y
b1d12fe818 Update build-python-packages.yml 2024-06-14 10:14:34 +05:30
aparnajyothi-y
d464ee3cc6 Update build-python-packages.yml 2024-06-14 10:12:44 +05:30
aparnajyothi-y
61e93b288d Update build-python-packages.yml 2024-06-14 10:11:48 +05:30
aparnajyothi-y
8d965711ba Update build-python-packages.yml 2024-06-14 10:05:34 +05:30
aparnajyothi-y
b228cba84e Update build-python-packages.yml 2024-06-14 09:52:27 +05:30
aparnajyothi-y
fd9b186705 Update build-python-packages.yml 2024-05-29 17:40:28 +05:30
aparnajyothi-y
a15689f2ac Update build-python-packages.yml 2024-05-29 17:18:57 +05:30
aparnajyothi-y
be0e5a895c Update build-python-packages.yml 2024-05-29 17:12:40 +05:30
aparnajyothi-y
04c0db46b5 Update build-python-packages.yml 2024-05-29 17:07:23 +05:30
aparnajyothi-y
cb822fbaf1 Update build-python-packages.yml 2024-05-29 17:04:16 +05:30
aparnajyothi-y
1d262fc400 Update build-python-packages.yml 2024-05-29 17:00:46 +05:30
aparnajyothi-y
06ec0e912f Update build-python-packages.yml 2024-05-29 16:54:45 +05:30
aparnajyothi-y
30c053652b Update build-python-packages.yml 2024-05-29 16:43:41 +05:30
aparnajyothi-y
411060a14d Update build-python-packages.yml 2024-05-29 16:41:10 +05:30
aparnajyothi-y
45c77b2a3a Update build-python-packages.yml 2024-05-29 16:39:08 +05:30
aparnajyothi-y
3af71f81fb Update build-python-packages.yml 2024-05-29 16:36:07 +05:30
aparnajyothi-y
2031f98157 Update build-python-packages.yml 2024-05-29 16:32:36 +05:30
aparnajyothi-y
ac6f4c6a01 Update build-python-packages.yml 2024-05-29 16:27:56 +05:30
aparnajyothi-y
a185c39c53 Update build-python-packages.yml 2024-05-29 16:22:49 +05:30
aparnajyothi-y
9c2e25fa64 Update build-python-packages.yml 2024-05-29 16:11:31 +05:30
aparnajyothi-y
c87f998dfb Update build-python-packages.yml 2024-05-29 16:09:05 +05:30
aparnajyothi-y
a18ca9186b Update build-python-packages.yml 2024-05-29 15:54:06 +05:30
aparnajyothi-y
12f1ddaf19 Update build-python-packages.yml 2024-05-29 15:47:10 +05:30
aparnajyothi-y
22bd58f5ab Update build-python-packages.yml 2024-05-29 15:30:12 +05:30
aparnajyothi-y
91d36e5783 Update build-python-packages.yml 2024-05-29 15:28:53 +05:30
aparnajyothi-y
567e9060f4 Update build-python-packages.yml 2024-05-29 15:19:31 +05:30
aparnajyothi-y
10da5bd845 Update build-python-packages.yml 2024-05-29 15:15:29 +05:30
aparnajyothi-y
b6f9ad0531 Update build-python-packages.yml 2024-05-29 15:13:15 +05:30
aparnajyothi-y
0d0f3060e3 Update build-python-packages.yml 2024-05-29 15:03:12 +05:30
aparnajyothi-y
948f51aaf0 Update build-python-packages.yml 2024-05-29 14:58:10 +05:30
aparnajyothi-y
43b4fed22f Update build-python-packages.yml 2024-05-29 14:52:21 +05:30
7 changed files with 281 additions and 1830 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: 'setup-actions-windows-arm64-4-core'
pull_request: pull_request:
paths-ignore: paths-ignore:
- 'versions-manifest.json' - 'versions-manifest.json'
@@ -28,10 +28,26 @@ env:
VERSION: ${{ inputs.VERSION || '3.12.3' }} VERSION: ${{ inputs.VERSION || '3.12.3' }}
defaults: defaults:
run: run:
shell: pwsh shell: 'C:\Program Files\PowerShell\7\pwsh.exe -Command {0}'
jobs: jobs:
install_Pwsh_git:
runs-on: setup-actions-windows-arm64-4-core
steps:
- run: |
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y pwsh
choco install -y git --version=2.18.0
'C:\Program Files\PowerShell\7\' | Out-File $env:GITHUB_PATH -Append
'C:\Program Files\Git\bin' | Out-File $env:GITHUB_PATH -Append
shell: powershell
generate_matrix: generate_matrix:
needs: [install_Pwsh_git]
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }} matrix: ${{ steps.generate-matrix.outputs.matrix }}
@@ -39,7 +55,7 @@ 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-24.04,macos-11,macos-11_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
$matrix = @() $matrix = @()
foreach ($configuration in $configurations) { foreach ($configuration in $configurations) {
@@ -51,17 +67,6 @@ jobs:
"*macos*" { $platform = 'darwin' } "*macos*" { $platform = 'darwin' }
"*windows*" { $platform = 'win32' } "*windows*" { $platform = 'win32' }
} }
if ($configuration -eq "ubuntu-22.04_arm64") {
$os = "setup-actions-ubuntu-arm64-2-core"
}
elseif ($configuration -eq "ubuntu-24.04_arm64") {
$os = "setup-actions-ubuntu24-arm64-2-core"
}
elseif ($configuration -eq "windows-2019_arm64") {
$os = "setup-actions-windows-arm64-4-core"
}
$matrix += @{ $matrix += @{
'platform' = $platform 'platform' = $platform
'os' = $os 'os' = $os
@@ -71,7 +76,8 @@ 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: [install_Pwsh_git, generate_matrix]
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -80,34 +86,10 @@ jobs:
env: env:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }} ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps: steps:
- name: Setup Environment on Windows ARM64 Runner
if: matrix.os == 'setup-actions-windows-arm64-4-core'
shell: powershell
run: |
# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install PowerShell
choco install powershell-core -y
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install Git
choco install git -y
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install 7-Zip
choco install 7zip -y
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
with: with:
submodules: true submodules: false
- name: Build Python ${{ env.VERSION }} - name: Build Python ${{ env.VERSION }}
run: | run: |
@@ -122,7 +104,7 @@ jobs:
if-no-files-found: error if-no-files-found: error
test_python: test_python:
needs: [generate_matrix, build_python] needs: [install_Pwsh_git, generate_matrix, build_python]
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -131,33 +113,11 @@ jobs:
env: env:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }} ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps: steps:
- name: Setup Environment on Windows ARM64 Runner
if: matrix.os == 'setup-actions-windows-arm64-4-core'
shell: powershell
run: |
# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install PowerShell
choco install powershell-core -y
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install Git
choco install git -y
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install 7-Zip
choco install 7zip -y
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
with: with:
submodules: true submodules: false
- name: Fully cleanup the toolcache directory before testing - name: Fully cleanup the toolcache directory before testing
run: ./helpers/clean-toolcache.ps1 -ToolName "Python" run: ./helpers/clean-toolcache.ps1 -ToolName "Python"
@@ -214,7 +174,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 }}";
@@ -236,6 +196,7 @@ jobs:
steps: steps:
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
- name: Publish Release ${{ env.VERSION }} - name: Publish Release ${{ env.VERSION }}
id: create_release id: create_release
uses: actions/create-release@v1 uses: actions/create-release@v1
@@ -294,3 +255,4 @@ jobs:
workflow_id: 'create-pr.yml', workflow_id: 'create-pr.yml',
ref: 'main' ref: 'main'
}); });

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

@@ -97,7 +97,6 @@ class NixPythonBuilder : PythonBuilder {
$variablesToReplace = @{ $variablesToReplace = @{
"{{__VERSION_FULL__}}" = $this.Version; "{{__VERSION_FULL__}}" = $this.Version;
"{{__ARCH__}}" = $this.Architecture;
} }
$variablesToReplace.keys | ForEach-Object { $installationTemplateContent = $installationTemplateContent.Replace($_, $variablesToReplace[$_]) } $variablesToReplace.keys | ForEach-Object { $installationTemplateContent = $installationTemplateContent.Replace($_, $variablesToReplace[$_]) }

View File

@@ -60,8 +60,6 @@ class WinPythonBuilder : PythonBuilder {
} else { } else {
$ArchitectureExtension = ".amd64" $ArchitectureExtension = ".amd64"
} }
}elseif ($this.Architecture -eq "arm64") {
$ArchitectureExtension = "-arm64"
} }
return $ArchitectureExtension return $ArchitectureExtension

View File

@@ -1,7 +1,6 @@
set -e set -e
PYTHON_FULL_VERSION="{{__VERSION_FULL__}}" PYTHON_FULL_VERSION="{{__VERSION_FULL__}}"
ARCH="{{__ARCH__}}"
MAJOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 1) MAJOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 1)
MINOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 2) MINOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 2)
@@ -18,7 +17,7 @@ fi
PYTHON_TOOLCACHE_PATH=$TOOLCACHE_ROOT/Python PYTHON_TOOLCACHE_PATH=$TOOLCACHE_ROOT/Python
PYTHON_TOOLCACHE_VERSION_PATH=$PYTHON_TOOLCACHE_PATH/$PYTHON_FULL_VERSION PYTHON_TOOLCACHE_VERSION_PATH=$PYTHON_TOOLCACHE_PATH/$PYTHON_FULL_VERSION
PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/$ARCH PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/x64
echo "Check if Python hostedtoolcache folder exist..." echo "Check if Python hostedtoolcache folder exist..."
if [ ! -d $PYTHON_TOOLCACHE_PATH ]; then if [ ! -d $PYTHON_TOOLCACHE_PATH ]; then
@@ -55,4 +54,4 @@ export PIP_ROOT_USER_ACTION=ignore
./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location ./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location
echo "Create complete file" echo "Create complete file"
touch $PYTHON_TOOLCACHE_VERSION_PATH/$ARCH.complete touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete

View File

@@ -28,7 +28,7 @@ if os_type == 'Darwin': expected_ld_library_extension = 'dylib'
if pkg_installer: if pkg_installer:
expected_lib_dir_path = f'/Library/Frameworks/Python.framework/Versions/{version_major}.{version_minor}/lib' expected_lib_dir_path = f'/Library/Frameworks/Python.framework/Versions/{version_major}.{version_minor}/lib'
else: else:
expected_lib_dir_path = f'{os.getenv("AGENT_TOOLSDIRECTORY")}/Python/{version}/{architecture}/lib' expected_lib_dir_path = f'{os.getenv("AGENT_TOOLSDIRECTORY")}/Python/{version}/x64/lib'
# Check modules # Check modules
### Validate libraries path ### Validate libraries path

File diff suppressed because it is too large Load Diff