mirror of
https://github.com/actions/python-versions.git
synced 2025-12-15 15:32:11 +00:00
Compare commits
20 Commits
3.12.4-944
...
buildtesti
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00ec8cc1f2 | ||
|
|
1f0d27f0b5 | ||
|
|
dd0cf131ab | ||
|
|
a77c9e10d6 | ||
|
|
fc1f552d8d | ||
|
|
cd751e6cc2 | ||
|
|
fd01c577f2 | ||
|
|
f54bc21e32 | ||
|
|
a81c68e746 | ||
|
|
c2a676ee84 | ||
|
|
0e0d4ed87f | ||
|
|
011826ebf7 | ||
|
|
d443e40f97 | ||
|
|
dd61f119eb | ||
|
|
cb2aecd6d9 | ||
|
|
1c85886f9c | ||
|
|
f14b797a5d | ||
|
|
cc396a6be6 | ||
|
|
1693c7defb | ||
|
|
8108f421b7 |
70
.github/workflows/build-python-packages.yml
vendored
70
.github/workflows/build-python-packages.yml
vendored
@@ -15,7 +15,7 @@ on:
|
||||
PLATFORMS:
|
||||
description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
|
||||
required: true
|
||||
default: 'ubuntu-20.04,ubuntu-22.04,ubuntu-24.04,macos-11_x64,macos-11_arm64,windows-2019_x64,windows-2019_x86'
|
||||
default: 'ubuntu-20.04,ubuntu-20.04_arm64,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-11_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'versions-manifest.json'
|
||||
@@ -39,26 +39,33 @@ jobs:
|
||||
- name: Generate execution matrix
|
||||
id: generate-matrix
|
||||
run: |
|
||||
[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()
|
||||
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-20.04_arm64,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-11,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64' }}".Split(",").Trim()
|
||||
$matrix = @()
|
||||
|
||||
foreach ($configuration in $configurations) {
|
||||
$parts = $configuration.Split("_")
|
||||
$os = $parts[0]
|
||||
$arch = if ($parts[1]) {$parts[1]} else {"x64"}
|
||||
|
||||
switch -wildcard ($os) {
|
||||
"*ubuntu*" { $platform = $os.Replace("ubuntu","linux")}
|
||||
"*macos*" { $platform = 'darwin' }
|
||||
"*windows*" { $platform = 'win32' }
|
||||
}
|
||||
|
||||
if ($configuration -eq "windows-2019_arm64") {
|
||||
$os = "setup-actions-windows-arm64-4-core"
|
||||
}
|
||||
$matrix += @{
|
||||
'platform' = $platform
|
||||
'os' = $os
|
||||
'arch' = $arch
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
|
||||
|
||||
|
||||
build_python:
|
||||
needs: generate_matrix
|
||||
strategy:
|
||||
@@ -70,16 +77,38 @@ jobs:
|
||||
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
|
||||
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
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
|
||||
- name: Build Python ${{ env.VERSION }}
|
||||
run: |
|
||||
./builders/build-python.ps1 -Version $env:VERSION `
|
||||
-Platform ${{ matrix.platform }} -Architecture ${{ matrix.arch }}
|
||||
|
||||
- name: Publish artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -97,7 +126,30 @@ jobs:
|
||||
env:
|
||||
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
|
||||
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
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -117,6 +169,7 @@ jobs:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
||||
|
||||
|
||||
- name: Extract files
|
||||
run: |
|
||||
if ('${{ matrix.platform }}' -eq 'win32') {
|
||||
@@ -155,9 +208,9 @@ jobs:
|
||||
run: |
|
||||
$pythonLocation = which python
|
||||
if ('${{ matrix.platform }}' -eq 'darwin') { otool -L $pythonLocation } else { ldd $pythonLocation }
|
||||
|
||||
- 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 }}";
|
||||
@@ -178,9 +231,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: python-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Publish Release ${{ env.VERSION }}
|
||||
id: create_release
|
||||
@@ -192,7 +242,6 @@ jobs:
|
||||
release_name: ${{ env.VERSION }}
|
||||
body: |
|
||||
Python ${{ env.VERSION }}
|
||||
|
||||
- name: Generate hash for packages
|
||||
run: |
|
||||
$childItems = Get-Childitem -Path '.'
|
||||
@@ -240,4 +289,3 @@ jobs:
|
||||
workflow_id: 'create-pr.yml',
|
||||
ref: 'main'
|
||||
});
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ class NixPythonBuilder : PythonBuilder {
|
||||
|
||||
$variablesToReplace = @{
|
||||
"{{__VERSION_FULL__}}" = $this.Version;
|
||||
"{{__ARCH__}}" = $this.Architecture;
|
||||
}
|
||||
$variablesToReplace.keys | ForEach-Object { $installationTemplateContent = $installationTemplateContent.Replace($_, $variablesToReplace[$_]) }
|
||||
|
||||
|
||||
@@ -60,8 +60,11 @@ class WinPythonBuilder : PythonBuilder {
|
||||
} else {
|
||||
$ArchitectureExtension = ".amd64"
|
||||
}
|
||||
}elseif ($this.Architecture -eq "arm64") {
|
||||
$ArchitectureExtension = "-arm64"
|
||||
}
|
||||
|
||||
|
||||
return $ArchitectureExtension
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
set -e
|
||||
|
||||
PYTHON_FULL_VERSION="{{__VERSION_FULL__}}"
|
||||
ARCH="{{__ARCH__}}"
|
||||
MAJOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 1)
|
||||
MINOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 2)
|
||||
|
||||
@@ -17,7 +18,7 @@ fi
|
||||
|
||||
PYTHON_TOOLCACHE_PATH=$TOOLCACHE_ROOT/Python
|
||||
PYTHON_TOOLCACHE_VERSION_PATH=$PYTHON_TOOLCACHE_PATH/$PYTHON_FULL_VERSION
|
||||
PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/x64
|
||||
PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/$ARCH
|
||||
|
||||
echo "Check if Python hostedtoolcache folder exist..."
|
||||
if [ ! -d $PYTHON_TOOLCACHE_PATH ]; then
|
||||
@@ -54,4 +55,4 @@ export PIP_ROOT_USER_ACTION=ignore
|
||||
./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location
|
||||
|
||||
echo "Create complete file"
|
||||
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
|
||||
touch $PYTHON_TOOLCACHE_VERSION_PATH/$ARCH.complete
|
||||
|
||||
@@ -28,7 +28,7 @@ if os_type == 'Darwin': expected_ld_library_extension = 'dylib'
|
||||
if pkg_installer:
|
||||
expected_lib_dir_path = f'/Library/Frameworks/Python.framework/Versions/{version_major}.{version_minor}/lib'
|
||||
else:
|
||||
expected_lib_dir_path = f'{os.getenv("AGENT_TOOLSDIRECTORY")}/Python/{version}/x64/lib'
|
||||
expected_lib_dir_path = f'{os.getenv("AGENT_TOOLSDIRECTORY")}/Python/{version}/{architecture}/lib'
|
||||
|
||||
# Check modules
|
||||
### Validate libraries path
|
||||
|
||||
@@ -1,4 +1,56 @@
|
||||
[
|
||||
{
|
||||
"version": "3.13.0-beta.2",
|
||||
"stable": false,
|
||||
"release_url": "https://github.com/actions/python-versions/releases/tag/3.13.0-beta.2-9470028175",
|
||||
"files": [
|
||||
{
|
||||
"filename": "python-3.13.0-beta.2-darwin-arm64.tar.gz",
|
||||
"arch": "arm64",
|
||||
"platform": "darwin",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.13.0-beta.2-9470028175/python-3.13.0-beta.2-darwin-arm64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.13.0-beta.2-darwin-x64.tar.gz",
|
||||
"arch": "x64",
|
||||
"platform": "darwin",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.13.0-beta.2-9470028175/python-3.13.0-beta.2-darwin-x64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.13.0-beta.2-linux-20.04-x64.tar.gz",
|
||||
"arch": "x64",
|
||||
"platform": "linux",
|
||||
"platform_version": "20.04",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.13.0-beta.2-9470028175/python-3.13.0-beta.2-linux-20.04-x64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.13.0-beta.2-linux-22.04-x64.tar.gz",
|
||||
"arch": "x64",
|
||||
"platform": "linux",
|
||||
"platform_version": "22.04",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.13.0-beta.2-9470028175/python-3.13.0-beta.2-linux-22.04-x64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.13.0-beta.2-linux-24.04-x64.tar.gz",
|
||||
"arch": "x64",
|
||||
"platform": "linux",
|
||||
"platform_version": "24.04",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.13.0-beta.2-9470028175/python-3.13.0-beta.2-linux-24.04-x64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.13.0-beta.2-win32-x64.zip",
|
||||
"arch": "x64",
|
||||
"platform": "win32",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.13.0-beta.2-9470028175/python-3.13.0-beta.2-win32-x64.zip"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.13.0-beta.2-win32-x86.zip",
|
||||
"arch": "x86",
|
||||
"platform": "win32",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.13.0-beta.2-9470028175/python-3.13.0-beta.2-win32-x86.zip"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "3.13.0-beta.1",
|
||||
"stable": false,
|
||||
@@ -321,6 +373,58 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "3.12.4",
|
||||
"stable": true,
|
||||
"release_url": "https://github.com/actions/python-versions/releases/tag/3.12.4-9469551593",
|
||||
"files": [
|
||||
{
|
||||
"filename": "python-3.12.4-darwin-arm64.tar.gz",
|
||||
"arch": "arm64",
|
||||
"platform": "darwin",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.12.4-9469551593/python-3.12.4-darwin-arm64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.12.4-darwin-x64.tar.gz",
|
||||
"arch": "x64",
|
||||
"platform": "darwin",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.12.4-9469551593/python-3.12.4-darwin-x64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.12.4-linux-20.04-x64.tar.gz",
|
||||
"arch": "x64",
|
||||
"platform": "linux",
|
||||
"platform_version": "20.04",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.12.4-9469551593/python-3.12.4-linux-20.04-x64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.12.4-linux-22.04-x64.tar.gz",
|
||||
"arch": "x64",
|
||||
"platform": "linux",
|
||||
"platform_version": "22.04",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.12.4-9469551593/python-3.12.4-linux-22.04-x64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.12.4-linux-24.04-x64.tar.gz",
|
||||
"arch": "x64",
|
||||
"platform": "linux",
|
||||
"platform_version": "24.04",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.12.4-9469551593/python-3.12.4-linux-24.04-x64.tar.gz"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.12.4-win32-x64.zip",
|
||||
"arch": "x64",
|
||||
"platform": "win32",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.12.4-9469551593/python-3.12.4-win32-x64.zip"
|
||||
},
|
||||
{
|
||||
"filename": "python-3.12.4-win32-x86.zip",
|
||||
"arch": "x86",
|
||||
"platform": "win32",
|
||||
"download_url": "https://github.com/actions/python-versions/releases/download/3.12.4-9469551593/python-3.12.4-win32-x86.zip"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "3.12.3",
|
||||
"stable": true,
|
||||
|
||||
Reference in New Issue
Block a user