resources: - repo: self trigger: batch: true branches: include: - '*' pr: branches: include: - '*' jobs: - job: TestInstall timeoutInMinutes: 10 pool: vmImage: 'ubuntu-latest' strategy: matrix: Python37: python.version: '3.7' Python38: python.version: '3.8' Python310: python.version: '3.10' steps: - task: UsePythonVersion@0 displayName: 'Use Python $(python.version)' inputs: versionSpec: '$(python.version)' - bash: | set -ev pip install -e . displayName: Install from Source - job: BuildPythonWheel condition: succeeded() pool: vmImage: 'ubuntu-latest' steps: - task: UsePythonVersion@0 displayName: Use Python 3.7 inputs: versionSpec: 3.7 - bash: | set -ev : "${BUILD_STAGINGDIRECTORY:?BUILD_STAGINGDIRECTORY environment variable not set}" echo "Build knack" pip install -U pip setuptools wheel python setup.py bdist_wheel -d "${BUILD_STAGINGDIRECTORY}" python setup.py sdist -d "${BUILD_STAGINGDIRECTORY}" displayName: Build Wheel - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: pypi' inputs: TargetPath: $(Build.ArtifactStagingDirectory) ArtifactName: pypi - task: DownloadPipelineArtifact@1 displayName: 'Download PyPI Packages' inputs: TargetPath: '$(Build.ArtifactStagingDirectory)/pypi' artifactName: pypi - bash: | set -ev cd $BUILD_ARTIFACTSTAGINGDIRECTORY/pypi pwd ls -la displayName: Test Build Wheel