Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build sdist in CI #388

Merged
merged 19 commits into from Dec 15, 2020
5 changes: 2 additions & 3 deletions MANIFEST.in
@@ -1,11 +1,10 @@
recursive-include _cffi_build *

# Remove CFFI files
global-exclude __pycache__/*

# Include Cython code
global-include *.pyx
global-include *.pxd
include anonlink/solving/_multiparty_solving_inner.h
include _cffi_build/libpopcount.h
include anonlink/similarities/libpopcount.h
include anonlink/_entitymatcher*
include anonlink/similarities/dice.cpp
48 changes: 40 additions & 8 deletions azurePipeline.yml
@@ -1,3 +1,11 @@
trigger:
branches:
include:
- '*'
tags:
include:
- v*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a tag starting with v? Is this pipeline only for release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the release pipeline is triggered by the build pipeline. In the past, we didn't execute the build pipeline when a tag is set, thus, the release pipeline was never automatically triggered.


stages:
- stage: wheels
displayName: Build Wheel Packages
Expand All @@ -11,7 +19,7 @@ stages:
- job: linux_39
displayName: Linux + Python3.9
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
variables:
CIBW_BUILD: 'cp39-*'
steps:
Expand All @@ -20,7 +28,7 @@ stages:
- job: linux_38
displayName: Linux + Python3.8
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
variables:
CIBW_BUILD: 'cp38-*'
steps:
Expand All @@ -29,7 +37,7 @@ stages:
- job: linux_37
displayName: Linux + Python3.7
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
variables:
CIBW_BUILD: 'cp37-*'
steps:
Expand All @@ -38,7 +46,7 @@ stages:
- job: linux_36
displayName: Linux + Python3.6
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
variables:
CIBW_BUILD: 'cp36-*'
steps:
Expand Down Expand Up @@ -67,14 +75,37 @@ stages:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.9', architecture: x64}}
- template: .azurePipeline/cibuildwheel_steps.yml

- stage: sdist
displayName: Build source distribution
dependsOn: []
jobs:
- job: sdist
displayName: build source distribution
pool:
vmImage: 'ubuntu-18.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
- script: |
python setup.py sdist
displayName: 'Artifact creation'
- task: CopyFiles@2
inputs:
targetFolder: 'sdist'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'sdist/dist'
ArtifactName: 'drop'

- stage: test
displayName: Unit tests
dependsOn: ['wheels']
jobs:
- job:
displayName: Linux
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
strategy:
matrix:
Python3.6:
Expand All @@ -94,7 +125,7 @@ stages:
parameters:
artifactName: $(artifactName)
pythonVersion: $(pythonVersion)
operatingSystem: 'ubuntu-16.04'
operatingSystem: 'ubuntu-18.04'
- job:
displayName: MacOS
pool:
Expand Down Expand Up @@ -157,7 +188,7 @@ stages:
- job:
displayName: Typecheck
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
steps:
- task: UsePythonVersion@0
inputs:
Expand All @@ -183,11 +214,12 @@ stages:
- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'drop'
patterns: '**/*.whl'
patterns: '**/*.(whl|tar.gz)'
path: $(Pipeline.Workspace)
- task: TwineAuthenticate@1
inputs:
artifactFeed: $(artifactFeed)
- script: 'echo $(Build.Repository.Name)'
- script: 'echo $(Build.SourceBranchName)'
- script: 'twine upload -r $(artifactFeed) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/*.whl --skip-existing'
- script: 'twine upload -r $(artifactFeed) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/*.tar.gz --skip-existing'
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -99,6 +99,7 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Security :: Cryptography",
Expand Down