Compare commits

..

8 Commits

Author SHA1 Message Date
Matthieu Darbois
d55f04f8e6 build ubuntu-22.04_arm64 on setup-actions-ubuntu-arm64-2-core (#280) 2024-06-20 08:10:34 -05:00
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
github-actions[bot]
8108f421b7 Update versions-manifest (#281)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-06-09 23:48:30 -05:00
Priya Gupta
8bbb5413e0 Update build-python-packages.yml (#279) 2024-06-09 23:03:19 -05:00
5 changed files with 129 additions and 37 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: 'setup-actions-windows-arm64-4-core'
default: 'ubuntu-20.04,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,macos-11_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86'
pull_request:
paths-ignore:
- 'versions-manifest.json'
@@ -28,34 +28,18 @@ env:
VERSION: ${{ inputs.VERSION || '3.12.3' }}
defaults:
run:
shell: 'C:\Program Files\PowerShell\7\pwsh.exe -Command {0}'
shell: pwsh
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:
needs: [install_Pwsh_git]
generate_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
steps:
- 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()
- name: Generate execution matrix
id: generate-matrix
run: |
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,macos-11,macos-14_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
$matrix = @()
foreach ($configuration in $configurations) {
@@ -67,6 +51,9 @@ jobs:
"*macos*" { $platform = 'darwin' }
"*windows*" { $platform = 'win32' }
}
if ($configuration -eq "ubuntu-22.04_arm64") {
$os = "setup-actions-ubuntu-arm64-2-core"
}
$matrix += @{
'platform' = $platform
'os' = $os
@@ -75,9 +62,8 @@ jobs:
}
echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
build_python:
needs: [install_Pwsh_git, generate_matrix]
build_python:
needs: generate_matrix
strategy:
fail-fast: false
matrix:
@@ -86,10 +72,11 @@ jobs:
env:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: false
submodules: true
- name: Build Python ${{ env.VERSION }}
run: |
@@ -103,8 +90,8 @@ jobs:
path: ${{ runner.temp }}/artifact
if-no-files-found: error
test_python:
needs: [install_Pwsh_git, generate_matrix, build_python]
test_python:
needs: [generate_matrix, build_python]
strategy:
fail-fast: false
matrix:
@@ -117,7 +104,7 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: false
submodules: true
- name: Fully cleanup the toolcache directory before testing
run: ./helpers/clean-toolcache.ps1 -ToolName "Python"
@@ -174,7 +161,7 @@ jobs:
- name: Run tests
run: |
Install-Module Pester -Force -Scope CurrentUser
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
Import-Module Pester
$pesterContainer = New-PesterContainer -Path './python-tests.ps1' -Data @{
Version="${{ env.VERSION }}";
@@ -188,14 +175,13 @@ jobs:
}
working-directory: ${{ github.workspace }}/tests
publish_release:
publish_release:
name: Publish release
if: github.event_name == 'workflow_dispatch' && inputs.PUBLISH_RELEASES
needs: test_python
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: Publish Release ${{ env.VERSION }}
id: create_release
@@ -239,7 +225,7 @@ jobs:
});
}
trigger_pr:
trigger_pr:
name: Trigger "Create Pull Request" workflow
needs: publish_release
runs-on: ubuntu-latest

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

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