Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions pipelines/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ parameters:
- name: publish
type: boolean
default: false
- name: artifactFeed
type: string
- name: cibuildwheelPythonUrl
type: string

jobs:
- job: BuildWindows
Expand All @@ -17,12 +21,10 @@ jobs:
- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Azure Artifacts/Azure-Artifacts'
artifactFeeds: ${{ parameters.artifactFeed}}

- script: |
python -m pip install --upgrade pip
pip install setuptools
pip install wheel
pip install cibuildwheel
displayName: 'Install build dependencies'

Expand All @@ -32,6 +34,8 @@ jobs:
env:
CIBW_ARCHS_WINDOWS: "AMD64"
CIBW_ENVIRONMENT: "ARTIFACTS_CREDENTIAL_PROVIDER_RID=win-x64"
CIBW_CPYTHON_STANDALONE_URL: ${{ parameters.cibuildwheelPythonUrl }}
CIBW_PYPY_STANDALONE_URL: ${{ parameters.cibuildwheelPythonUrl }}

- ${{ if eq(parameters.publish, true) }}:
- task: PublishBuildArtifacts@1
Expand All @@ -53,13 +57,12 @@ jobs:
- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Azure Artifacts/Azure-Artifacts'
artifactFeeds: ${{ parameters.artifactFeed}}

- script: |
python -m pip install --upgrade pip
pip install setuptools
pip install wheel
pip install cibuildwheel
python3 -m pip install --upgrade pip
# Work around for https://github.com/pypa/cibuildwheel/issues/2649
pip install cibuildwheel --only-binary patchelf
displayName: 'Install build dependencies'

- script: |
Expand All @@ -68,15 +71,19 @@ jobs:
env:
CIBW_ARCHS_MACOS: "x86_64"
CIBW_ENVIRONMENT: "ARTIFACTS_CREDENTIAL_PROVIDER_RID=osx-x64"
MACOSX_DEPLOYMENT_TARGET: "10.15"
MACOSX_DEPLOYMENT_TARGET: "11.0"
CIBW_CPYTHON_STANDALONE_URL: ${{ parameters.cibuildwheelPythonUrl }}
CIBW_PYPY_STANDALONE_URL: ${{ parameters.cibuildwheelPythonUrl }}

- script: |
cibuildwheel --output-dir wheel-osx-arm64
displayName: 'Build osx-arm64 wheels'
env:
CIBW_ARCHS_MACOS: "arm64"
CIBW_ENVIRONMENT: "ARTIFACTS_CREDENTIAL_PROVIDER_RID=osx-arm64"
MACOSX_DEPLOYMENT_TARGET: "10.15"
MACOSX_DEPLOYMENT_TARGET: "11.0"
CIBW_CPYTHON_STANDALONE_URL: ${{ parameters.cibuildwheelPythonUrl }}}}
CIBW_PYPY_STANDALONE_URL: ${{ parameters.cibuildwheelPythonUrl }}

- ${{ if eq(parameters.publish, true) }}:
- task: PublishBuildArtifacts@1
Expand Down Expand Up @@ -104,12 +111,10 @@ jobs:
- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Azure Artifacts/Azure-Artifacts'
artifactFeeds: ${{ parameters.artifactFeed}}

- script: |
python3 -m pip install --upgrade pip
pip install setuptools
pip install wheel
pip install cibuildwheel
displayName: 'Install build dependencies'

Expand All @@ -119,6 +124,8 @@ jobs:
env:
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ENVIRONMENT: "ARTIFACTS_CREDENTIAL_PROVIDER_RID=linux-x64"
CIBW_CPYTHON_STANDALONE_URL: ${{ parameters.cibuildwheelPythonUrl }}
CIBW_PYPY_STANDALONE_URL: ${{ parameters.cibuildwheelPythonUrl }}

- ${{ if eq(parameters.publish, true) }}:
- task: PublishBuildArtifacts@1
Expand All @@ -140,7 +147,7 @@ jobs:
- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'Azure Artifacts/Azure-Artifacts'
artifactFeeds: ${{ parameters.artifactFeed}}

- script: |
python -m pip install --upgrade pip build
Expand Down
4 changes: 4 additions & 0 deletions pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ stages:
- template: build-wheels.yml
parameters:
publish: true
artifactFeed: 'Azure Artifacts/Azure-Artifacts'
cibuildwheelPythonUrl: 'https://user:$(System.AccessToken)@pkgs.dev.azure.com/mseng/Azure-Artifacts/_packaging/Azure-Artifacts/pypi/simple/'

- stage: Validate
displayName: 'Validate Setup Binary Selection'
dependsOn: []
jobs:
- template: validate-setup.yml
parameters:
artifactFeed: 'Azure Artifacts/Azure-Artifacts'
11 changes: 11 additions & 0 deletions pipelines/pr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
schedules:
- cron: "0 0 * * SAT"
displayName: Saturday midnight (UTC) run
always: true
branches:
include:
- master

resources:
- repo: self
Expand All @@ -16,9 +23,13 @@ stages:
- template: build-wheels.yml
parameters:
publish: false # Enable this to publish wheels to the build artifacts for validation
artifactFeed: 'PipelineTools/artifacts-credprovider'
cibuildwheelPythonUrl: 'https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/artifacts-credprovider/pypi/simple/'

- stage: Validate
displayName: 'Validate Setup Binary Selection'
dependsOn: []
jobs:
- template: validate-setup.yml
parameters:
artifactFeed: 'PipelineTools/artifacts-credprovider'
4 changes: 3 additions & 1 deletion pipelines/validate-setup-bash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ parameters:
- name: validateKeyringBinary
type: boolean
default: true
- name: artifactFeed
type: string

steps:
- checkout: ${{ parameters.repo }}
- task: PipAuthenticate@1
displayName: 'Pip authenticate'
inputs:
artifactFeeds: 'Azure Artifacts/Azure-Artifacts'
artifactFeed: ${{ parameters.artifactFeed}}
- script: pip install build
displayName: 'Install dependencies'
- bash: |
Expand Down
4 changes: 3 additions & 1 deletion pipelines/validate-setup-ps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ parameters:
- name: validateKeyringBinary
type: boolean
default: true
- name: artifactFeed
type: string

steps:
- checkout: ${{ parameters.repo }}
- task: PipAuthenticate@1
displayName: 'Pip authenticate'
inputs:
artifactFeeds: 'Azure Artifacts/Azure-Artifacts'
artifactFeed: ${{ parameters.artifactFeed}}
- script: pip install build
displayName: 'Install dependencies'
- task: PowerShell@2
Expand Down
33 changes: 24 additions & 9 deletions pipelines/validate-setup.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
parameters:
- name: artifactFeed
type: string

jobs:
- job: WindowsInstallDefault
pool:
Expand All @@ -6,15 +10,17 @@ jobs:
- template: validate-setup-ps.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: ''
expectedCredentialProviderVersion: 'Microsoft.Net8.win-x64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.win-x64.NuGet.CredentialProvider'
- job: WindowsInstallNet8Fallback
pool:
vmImage: windows-latest
steps:
- template: validate-setup-ps.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: |
Write-Host "##vso[task.setvariable variable=ARTIFACTS_CREDENTIAL_PROVIDER_NON_SC;]true"
expectedCredentialProviderVersion: 'Microsoft.Net8.NuGet.CredentialProvider'
Expand All @@ -25,9 +31,10 @@ jobs:
- template: validate-setup-ps.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: |
Write-Host "##vso[task.setvariable variable=ARTIFACTS_CREDENTIAL_PROVIDER_RID;]linux-x64"
expectedCredentialProviderVersion: 'Microsoft.Net8.linux-x64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.linux-x64.NuGet.CredentialProvider'
validateKeyringBinary: false
- job: LinuxInstalllNet8Fallback
pool:
Expand All @@ -36,6 +43,7 @@ jobs:
- template: validate-setup-bash.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: |
export ARTIFACTS_CREDENTIAL_PROVIDER_NON_SC=true
expectedCredentialProviderVersion: 'Microsoft.Net8.NuGet.CredentialProvider'
Expand All @@ -46,28 +54,31 @@ jobs:
- template: validate-setup-bash.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: ''
expectedCredentialProviderVersion: 'Microsoft.Net8.linux-x64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.linux-x64.NuGet.CredentialProvider'
- job: LinuxInstallNet8linuxx64
pool:
vmImage: ubuntu-latest
steps:
- template: validate-setup-bash.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: |
export ARTIFACTS_CREDENTIAL_PROVIDER_RID=linux-x64
expectedCredentialProviderVersion: 'Microsoft.Net8.linux-x64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.linux-x64.NuGet.CredentialProvider'
- job: LinuxInstallNet8linuxarm64
pool:
vmImage: ubuntu-latest
steps:
- template: validate-setup-bash.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: |
export ARTIFACTS_CREDENTIAL_PROVIDER_RID=linux-arm64
expectedCredentialProviderVersion: 'Microsoft.Net8.linux-arm64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.linux-arm64.NuGet.CredentialProvider'
validateKeyringBinary: false
- job: LinuxInstallNet8osxarm64
pool:
Expand All @@ -76,9 +87,10 @@ jobs:
- template: validate-setup-bash.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: |
export ARTIFACTS_CREDENTIAL_PROVIDER_RID=osx-arm64
expectedCredentialProviderVersion: 'Microsoft.Net8.osx-arm64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.osx-arm64.NuGet.CredentialProvider'
validateKeyringBinary: false
- job: LinuxInstallNet8osxx64
pool:
Expand All @@ -87,9 +99,10 @@ jobs:
- template: validate-setup-bash.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: |
export ARTIFACTS_CREDENTIAL_PROVIDER_RID=osx-x64
expectedCredentialProviderVersion: 'Microsoft.Net8.osx-x64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.osx-x64.NuGet.CredentialProvider'
validateKeyringBinary: false
- job: MacOSNet8Install
pool:
Expand All @@ -98,17 +111,19 @@ jobs:
- template: validate-setup-ps.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: ''
expectedCredentialProviderVersion: 'Microsoft.Net8.osx-x64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.osx-x64.NuGet.CredentialProvider'
- job: MacOSArm64Net8Install
pool:
vmImage: macos-latest
steps:
- template: validate-setup-ps.yml@self
parameters:
repo: self
artifactFeed: ${{ parameters.artifactFeed}}
scriptEnvVariables: |
Write-Host "##vso[task.setvariable variable=ARTIFACTS_CREDENTIAL_PROVIDER_RID;]osx-arm64"
expectedCredentialProviderVersion: 'Microsoft.Net8.osx-arm64.NuGet.CredentialProvider'
expectedCredentialProviderVersion: 'Microsoft.osx-arm64.NuGet.CredentialProvider'
validateKeyringBinary: false

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[tool.cibuildwheel]
# Build binaries for everything supported by cibuildwheel, Python >= 3.7
# For local cibuildwheel debugging, you can build only a single version
# build = ["cp312-*"]
# build = ["cp313-*"]

# For each platform below, don't build 32bit binaries, they aren't supported
# by the .NET credential provider plugin
Expand All @@ -24,5 +24,5 @@ skip = ["*-macosx_i386", "*-macosx_x86"]
archs = ["x86_64", "aarch64"]
# musllinux will also be skipped as most distros are manylinux compatible
skip = ["*-manylinux_i686", "*-manylinux2014_i686", "*-musllinux*"]
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
manylinux-x86_64-image = "manylinux_2_34"
manylinux-aarch64-image = "manylinux_2_34"
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from setuptools.command.build_py import build_py
from setuptools.command.bdist_wheel import bdist_wheel

CREDENTIAL_PROVIDER_BASE = "https://github.com/Microsoft/artifacts-credprovider/releases/download/v1.4.1/"
CREDENTIAL_PROVIDER_BASE = "https://github.com/Microsoft/artifacts-credprovider/releases/download/v2.0.0/"
CREDENTIAL_PROVIDER_NET8 = CREDENTIAL_PROVIDER_BASE + "Microsoft.Net8.NuGet.CredentialProvider.tar.gz"
CREDENTIAL_PROVIDER_NET8_ZIP = CREDENTIAL_PROVIDER_BASE + "Microsoft.Net8.NuGet.CredentialProvider.zip"
CREDENTIAL_PROVIDER_NON_SC_VAR_NAME = "ARTIFACTS_CREDENTIAL_PROVIDER_NON_SC"
Expand Down Expand Up @@ -67,9 +67,9 @@ def get_os_runtime_url(runtime_var):
return CREDENTIAL_PROVIDER_NET8

if "osx" in runtime_var:
return CREDENTIAL_PROVIDER_NET8_ZIP.replace(".Net8", f".Net8.{runtime_var}")
return CREDENTIAL_PROVIDER_NET8_ZIP.replace(".Net8", f".{runtime_var}")

return CREDENTIAL_PROVIDER_NET8.replace(".Net8", f".Net8.{runtime_var}")
return CREDENTIAL_PROVIDER_NET8.replace(".Net8", f".{runtime_var}")

def get_download_url():
# When building the platform wheels in CI, use the self-contained version of the credential provider.
Expand Down
Loading