Compare commits

...

36 Commits

Author SHA1 Message Date
github-actions[bot]
771cbab387 Update versions-manifest (#321)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-11-20 08:31:56 -06:00
aparnajyothi-y
7069021fff Update openssl 1.1 to 3 (#316)
* Update openssl to 3

* openssl update 3
2024-11-04 19:18:59 -06:00
priya-kinthali
d8ae6ee095 updated the latest versions and included macos-13 (#315) 2024-10-21 15:25:52 -05:00
github-actions[bot]
dd24c2e5e7 Update versions-manifest (#314)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-10-16 11:26:00 -05:00
github-actions[bot]
48bcef9764 Update versions-manifest (#312)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-10-08 09:52:56 -05:00
github-actions[bot]
5d096de548 Update versions-manifest (#310)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-10-07 22:28:59 -05:00
github-actions[bot]
b0ba1dbe1e Update versions-manifest (#309)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-10-03 11:32:43 -05:00
github-actions[bot]
8eb4ff3a92 Update versions-manifest (#308)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-10-02 23:40:17 -05:00
github-actions[bot]
98e79473eb Update versions-manifest (#307)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-09-30 14:52:11 -05:00
github-actions[bot]
16955773ac Update versions-manifest (#306)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-09-09 14:30:08 -05:00
github-actions[bot]
c41d908608 Update versions-manifest (#305)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-29 11:27:37 -05:00
aparnajyothi-y
8dd72e5592 Fix for the build failures on the self-hosted Ubuntu 24.04 arm64 runner for no restart (#304)
* Update build-python-packages.yml

* Update build-python-packages.yml

* fix for ubuntu 24.04 issue for no restart
2024-08-29 09:03:33 -05:00
github-actions[bot]
b8cfd51f65 Update versions-manifest (#303)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-13 23:24:55 -05:00
aparnajyothi-y
bb9054d05d Fix for the build failures on the ubuntu 24.04 runner (#302)
* Update build-python-packages.yml

* Update build-python-packages.yml
2024-08-13 14:11:29 -05:00
github-actions[bot]
c8a840c660 Update versions-manifest (#301)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-07 10:12:25 -05:00
github-actions[bot]
b423327e4a Update versions-manifest (#300)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-06 08:44:31 -05:00
aparnajyothi-y
2f8ab97baf Fix for the Codeql-analysis.yml workflow failure (#299)
* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml
2024-07-25 08:47:57 -05:00
github-actions[bot]
9d3be767fc Update versions-manifest (#298)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-22 08:53:23 -05:00
github-actions[bot]
80d68b2b90 Update versions-manifest (#297)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-17 17:08:23 -05:00
github-actions[bot]
2438e271b9 Update versions-manifest (#296)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-16 08:56:00 -05:00
HarithaVattikuti
3970f04eb4 Add support for Ubuntu 24 arm64 runner (#294)
* Add support for Ubuntu 24 arm64 runner

* Update macos runner
2024-07-15 16:15:55 -05:00
github-actions[bot]
57f2d897a8 Update versions-manifest (#293)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-01 08:35:03 -05:00
github-actions[bot]
0c9a1f7cd6 Update versions-manifest (#292)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-06-26 12:15:49 -05:00
aparnajyothi-y
0e5f00e5d0 Add windows arm64 support (#291)
* Update build-python-packages.yml

* windows arm64 support

* Update build-python-packages.yml

* Update build-python-packages.yml

* Update build-python-packages.yml

* Update build-python-packages.yml

* Update build-python-packages.yml
2024-06-25 13:14:08 -05:00
github-actions[bot]
1d2e861434 Update versions-manifest (#289)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-06-23 23:48:32 -05:00
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
Matthieu Darbois
c990e6da95 chore: update action versions (#267)
This removes Node.js 16 deprecation warnings
2024-05-22 08:08:47 -05:00
HarithaVattikuti
521be20d1e Updated arm64 versions (#273) 2024-05-10 12:16:17 -05:00
github-actions[bot]
064829bd03 Update versions-manifest (#272)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-05-09 21:56:46 -05:00
10 changed files with 2441 additions and 389 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-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:
paths-ignore:
- 'versions-manifest.json'
@@ -39,9 +39,9 @@ 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-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-13,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]
@@ -51,6 +51,17 @@ jobs:
"*macos*" { $platform = 'darwin' }
"*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 += @{
'platform' = $platform
'os' = $os
@@ -58,7 +69,7 @@ jobs:
}
}
echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
build_python:
needs: generate_matrix
strategy:
@@ -69,9 +80,32 @@ 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@v3
uses: actions/checkout@v4
with:
submodules: true
@@ -79,12 +113,13 @@ jobs:
run: |
./builders/build-python.ps1 -Version $env:VERSION `
-Platform ${{ matrix.platform }} -Architecture ${{ matrix.arch }}
- name: Publish artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ runner.temp }}/artifact
if-no-files-found: error
test_python:
needs: [generate_matrix, build_python]
@@ -96,9 +131,31 @@ 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@v3
uses: actions/checkout@v4
with:
submodules: true
@@ -111,9 +168,10 @@ jobs:
run: if [ -d /Library/Frameworks/Python.framework ]; then sudo rm -rf /Library/Frameworks/Python.framework; fi
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}
name: ${{ env.ARTIFACT_NAME }}
path: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Extract files
run: |
@@ -138,7 +196,7 @@ jobs:
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Setup Python ${{ env.VERSION }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.VERSION }}
architecture: ${{ matrix.arch }}
@@ -156,7 +214,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 }}";
@@ -176,7 +234,7 @@ jobs:
needs: test_python
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- name: Publish Release ${{ env.VERSION }}
id: create_release
@@ -202,7 +260,7 @@ jobs:
}
- name: Upload release assets
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
@@ -226,7 +284,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Trigger "Create Pull Request" workflow
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
@@ -236,4 +294,3 @@ jobs:
workflow_id: 'create-pr.yml',
ref: 'main'
});

View File

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

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

View File

@@ -14,11 +14,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
python: [3.9.12, 3.10.8, 3.11.8]
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
python: [3.9.13, 3.10.11, 3.11.8, 3.12.7, 3.13.0]
steps:
- name: setup-python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

View File

@@ -68,10 +68,10 @@ class macOSPythonBuilder : NixPythonBuilder {
### and then add the appropriate paths for the header and library files to configure command.
### Link to documentation (https://cpython-devguide.readthedocs.io/setup/#build-dependencies)
if ($this.Version -lt "3.7.0") {
$env:LDFLAGS = "-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/zlib/lib"
$env:CFLAGS = "-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include"
$env:LDFLAGS = "-L/usr/local/opt/openssl@3/lib -L/usr/local/opt/zlib/lib"
$env:CFLAGS = "-I/usr/local/opt/openssl@3/include -I/usr/local/opt/zlib/include"
} else {
$configureString += " --with-openssl=/usr/local/opt/openssl@1.1"
$configureString += " --with-openssl=/usr/local/opt/openssl@3"
# For Python 3.7.2 and 3.7.3 we need to provide PATH for zlib to pack it properly. Otherwise the build will fail
# with the error: zipimport.ZipImportError: can't decompress data; zlib not available

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
@@ -54,15 +54,15 @@ else:
if os_type == 'Darwin':
### Validate openssl links
if version_major == 3 and version_minor < 7:
expected_ldflags = '-L/usr/local/opt/openssl@1.1/lib'
expected_ldflags = '-L/usr/local/opt/openssl@3/lib'
ldflags = sysconfig.get_config_var('LDFLAGS')
if not expected_ldflags in ldflags:
print('Invalid ldflags: %s; Expected: %s' % (ldflags, expected_ldflags))
exit(1)
else:
expected_openssl_includes = '-I/usr/local/opt/openssl@1.1/include'
expected_openssl_ldflags ='-L/usr/local/opt/openssl@1.1/lib'
expected_openssl_includes = '-I/usr/local/opt/openssl@3/include'
expected_openssl_ldflags ='-L/usr/local/opt/openssl@3/lib'
openssl_includes = sysconfig.get_config_var('OPENSSL_INCLUDES')
openssl_ldflags = sysconfig.get_config_var('OPENSSL_LDFLAGS')

File diff suppressed because it is too large Load Diff