Compare commits

..

20 Commits

Author SHA1 Message Date
priya-kinthali
06dc095b4e Update build-python-packages.yml with 7z 2024-06-14 14:11:25 +05:30
priya-kinthali
e30e34e23e Update build-python-packages.yml update test step 2024-06-14 13:55:58 +05:30
priya-kinthali
73291940e4 Update build-python-packages.yml with 7-zip 2024-06-14 13:47:26 +05:30
priya-kinthali
34b290bd68 Update build-python-packages.yml with git 2024-06-14 13:40:41 +05:30
priya-kinthali
1283f694e2 Update build-python-packages.yml with git install 2024-06-14 13:35:55 +05:30
priya-kinthali
2c36fe8085 Update build-python-packages.yml added path 2024-06-14 12:39:08 +05:30
priya-kinthali
d23614881d Update build-python-packages.yml with choc 2024-06-14 12:33:18 +05:30
priya-kinthali
0f8c345fbf Update build-python-packages.yml 2024-06-14 12:24:41 +05:30
priya-kinthali
173dacbc09 Update build-python-packages.yml install powershell 2024-06-14 12:20:55 +05:30
priya-kinthali
4605ddf7b1 Update build-python-packages.yml add path 2024-06-14 12:14:16 +05:30
priya-kinthali
2cdf3ee87d Update build-python-packages.yml to check git version 2024-06-14 12:08:54 +05:30
priya-kinthali
29399f642a Update build-python-packages.yml 2024-06-14 12:03:33 +05:30
priya-kinthali
14816f3ddf Update build-python-packages.yml with submodule 2024-06-14 11:59:18 +05:30
priya-kinthali
140f416786 Update build-python-packages.yml with setup git 2024-06-14 11:47:21 +05:30
priya-kinthali
e229f1522b Update win-python-builder.psm1 2024-06-14 11:33:43 +05:30
Priya Gupta
cb2aecd6d9 Add Support for Linux arm64 Builds (#274)
* Included ubuntu-arm64 in  Build Python package yml

* Updated builder and installer scripts

* Updated test scripts

* Modified test file

* Replaced macos-11 with macos-13

* Update build-python-packages.yml
2024-06-13 09:17:40 -05:00
github-actions[bot]
1c85886f9c Update versions-manifest (#284)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-06-11 21:40:26 -05:00
HarithaVattikuti
f14b797a5d Fix for corrupted published artifacts (#286)
* Add skippublishercheck

* Update download-artifact

* Remove skipcheck
2024-06-11 11:36:42 -05:00
HarithaVattikuti
cc396a6be6 Add skippublishercheck (#283) 2024-06-10 09:35:28 -05:00
HarithaVattikuti
1693c7defb Revert "Update versions-manifest (#281)" (#282)
This reverts commit 8108f421b7.
2024-06-10 08:28:48 -05:00
6 changed files with 190 additions and 8 deletions

View File

@@ -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'
pull_request:
paths-ignore:
- 'versions-manifest.json'
@@ -39,7 +39,7 @@ 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' }}".Split(",").Trim()
$matrix = @()
foreach ($configuration in $configurations) {
@@ -70,11 +70,50 @@ jobs:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:
- name: Install Chocolatey
shell: powershell
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'))
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install PowerShell
shell: cmd
run: |
choco install powershell-core -y
- name: Add PowerShell to PATH
shell: powershell
run: |
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install Git
shell: cmd
run: |
choco install git -y
- name: Add Git to PATH
shell: powershell
run: |
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Check git version
run: |
git --version
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: true
- name: Install 7-Zip
shell: cmd
run: |
choco install 7zip -y
- name: Add 7-Zip to PATH
shell: powershell
run: |
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Build Python ${{ env.VERSION }}
run: |
./builders/build-python.ps1 -Version $env:VERSION `
@@ -98,6 +137,34 @@ jobs:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:
- name: Install Chocolatey
shell: powershell
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'))
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install PowerShell
shell: cmd
run: |
choco install powershell-core -y
- name: Add PowerShell to PATH
shell: powershell
run: |
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install Git
shell: cmd
run: |
choco install git -y
- name: Add Git to PATH
shell: powershell
run: |
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Check git version
run: |
git --version
- name: Check out repository code
uses: actions/checkout@v4
with:
@@ -117,6 +184,15 @@ jobs:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Install 7-Zip
shell: cmd
run: |
choco install 7zip -y
- name: Add 7-Zip to PATH
shell: powershell
run: |
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Extract files
run: |
if ('${{ matrix.platform }}' -eq 'win32') {
@@ -158,6 +234,7 @@ 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 }}";
@@ -178,9 +255,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

View File

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

View File

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

View File

@@ -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

View File

@@ -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

View File

@@ -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,