-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add azure pipelines wheel builder for bcrypt (#177)
* add azure pipelines wheel builder for bcrypt * fix manifest, remove jenkins
- Loading branch information
1 parent
8ce4bfa
commit 61e8336
Showing
3 changed files
with
163 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
trigger: none | ||
pr: none | ||
|
||
jobs: | ||
- job: 'macOS' | ||
pool: | ||
vmImage: 'macOS-10.14' | ||
strategy: | ||
matrix: | ||
Python27: | ||
python.version: '2.7' | ||
PYTHON_DOWNLOAD_URL: "https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.6.pkg" | ||
PYTHON_BIN_PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin/python | ||
Python3: | ||
python.version: '3.4' | ||
PYTHON_DOWNLOAD_URL: "https://www.python.org/ftp/python/3.7.3/python-3.7.3-macosx10.6.pkg" | ||
PYTHON_BIN_PATH: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 | ||
steps: | ||
- script: | | ||
set -e | ||
set -x | ||
curl "$PYTHON_DOWNLOAD_URL" -o python.pkg | ||
sudo installer -pkg python.pkg -target / | ||
displayName: Download and install Python | ||
- script: $PYTHON_BIN_PATH -m pip install -U virtualenv | ||
displayName: Install virtualenv | ||
- script: $PYTHON_BIN_PATH -m virtualenv .venv | ||
displayName: Create virtualenv | ||
- script: .venv/bin/pip install -U wheel | ||
displayName: Update wheel to the latest version | ||
- script: .venv/bin/pip install cffi six | ||
displayName: Install our Python dependencies | ||
|
||
- script: | | ||
set -e | ||
set -x | ||
REGEX="3\.([0-9])*" | ||
if [[ "$PYTHON_VERSION" =~ $REGEX ]]; then | ||
PY_LIMITED_API="--build-option --py-limited-api=cp3${BASH_REMATCH[1]}" | ||
fi | ||
.venv/bin/pip wheel bcrypt --no-use-pep517 --wheel-dir=wheelhouse --no-binary bcrypt --no-deps $PY_LIMITED_API | ||
displayName: Build the wheel | ||
- script: .venv/bin/pip install --no-index -f wheelhouse bcrypt | ||
displayName: Test installing the wheel | ||
- script: | | ||
.venv/bin/python -c "import bcrypt;password = b'super secret password';hashed = bcrypt.hashpw(password, bcrypt.gensalt());bcrypt.checkpw(password, hashed)" | ||
displayName: Test the installed wheel | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathToPublish: wheelhouse/ | ||
artifactName: bcrypt-macos-python$(python.version) | ||
|
||
- job: 'manylinux1' | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
container: 'pyca/cryptography-manylinux1:x86_64' | ||
strategy: | ||
matrix: | ||
Python27m: | ||
PYTHON_VERSION: 'cp27-cp27m' | ||
Python27mu: | ||
PYTHON_VERSION: 'cp27-cp27mu' | ||
Python3m: | ||
PYTHON_VERSION: 'cp34-cp34m' | ||
steps: | ||
- script: /opt/python/$PYTHON_VERSION/bin/python -m virtualenv .venv | ||
displayName: Create virtualenv | ||
- script: .venv/bin/pip install cffi six | ||
displayName: Install our Python dependencies | ||
- script: | | ||
set -e | ||
set -x | ||
REGEX="cp3([0-9])*" | ||
if [[ "$PYTHON_VERSION" =~ $REGEX ]]; then | ||
PY_LIMITED_API="--build-option --py-limited-api=cp3${BASH_REMATCH[1]}" | ||
fi | ||
.venv/bin/pip wheel bcrypt --no-use-pep517 --no-binary bcrypt --no-deps --wheel-dir=tmpwheelhouse $PY_LIMITED_API | ||
displayName: Build the wheel | ||
- script: auditwheel repair tmpwheelhouse/bcrypt*.whl -w wheelhouse/ | ||
displayName: Run auditwheel | ||
- script: .venv/bin/pip install bcrypt --no-index -f wheelhouse/ | ||
displayName: Test installing the wheel | ||
- script: | | ||
.venv/bin/python -c "import bcrypt;password = b'super secret password';hashed = bcrypt.hashpw(password, bcrypt.gensalt());bcrypt.checkpw(password, hashed)" | ||
displayName: Test the installed wheel | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathToPublish: wheelhouse/ | ||
artifactName: bcrypt-manylinux1-$(PYTHON_VERSION) | ||
|
||
- job: 'windows' | ||
pool: | ||
vmImage: 'windows-2019' | ||
container: $[variables.containerImage] | ||
strategy: | ||
matrix: | ||
Python27-x86: | ||
containerImage: 'pyca/cryptography-runner-windows:py27-x86' | ||
PYTHON_VERSION: '27' | ||
WINDOWS_ARCH: 'x86' | ||
Python27-x86-64: | ||
containerImage: 'pyca/cryptography-runner-windows:py27-x86_64' | ||
PYTHON_VERSION: '27' | ||
WINDOWS_ARCH: 'x86_64' | ||
Python34-x86: | ||
containerImage: 'pyca/cryptography-runner-windows:py34-x86' | ||
PYTHON_VERSION: '34' | ||
WINDOWS_ARCH: 'x86' | ||
Python34-x86-64: | ||
containerImage: 'pyca/cryptography-runner-windows:py34-x86_64' | ||
PYTHON_VERSION: '34' | ||
WINDOWS_ARCH: 'x86_64' | ||
Python35-x86: | ||
containerImage: 'pyca/cryptography-runner-windows:py35-x86' | ||
PYTHON_VERSION: '35' | ||
WINDOWS_ARCH: 'x86' | ||
Python35-x86-64: | ||
containerImage: 'pyca/cryptography-runner-windows:py35-x86_64' | ||
PYTHON_VERSION: '35' | ||
WINDOWS_ARCH: 'x86_64' | ||
Python36-x86: | ||
containerImage: 'pyca/cryptography-runner-windows:py3-x86' | ||
PYTHON_VERSION: '36' | ||
WINDOWS_ARCH: 'x86' | ||
Python36-x86-64: | ||
containerImage: 'pyca/cryptography-runner-windows:py3-x86_64' | ||
PYTHON_VERSION: '36' | ||
WINDOWS_ARCH: 'x86_64' | ||
Python37-x86: | ||
containerImage: 'pyca/cryptography-runner-windows:py3-x86' | ||
PYTHON_VERSION: '37' | ||
WINDOWS_ARCH: 'x86' | ||
Python37-x86-64: | ||
containerImage: 'pyca/cryptography-runner-windows:py3-x86_64' | ||
PYTHON_VERSION: '37' | ||
WINDOWS_ARCH: 'x86_64' | ||
steps: | ||
- script: '"C:/Python%PYTHON_VERSION%/Scripts/pip" install wheel cffi six' | ||
displayName: Install wheel and our Python dependencies | ||
- script: | | ||
C:/Python%PYTHON_VERSION%/Scripts/pip wheel bcrypt --no-use-pep517 --wheel-dir=wheelhouse --no-binary bcrypt | ||
displayName: Build the wheel | ||
- script: '"C:/Python%PYTHON_VERSION%/Scripts/pip" install -f wheelhouse bcrypt --no-index' | ||
displayName: Test installing the wheel | ||
- script: | | ||
"C:/Python%PYTHON_VERSION%/python" -c "import bcrypt;password = b'super secret password';hashed = bcrypt.hashpw(password, bcrypt.gensalt());bcrypt.checkpw(password, hashed)" | ||
displayName: Test the installed wheel | ||
- script: mkdir bcrypt-wheelhouse | ||
displayName: Create a directory for placing the final wheel in | ||
- script: move wheelhouse\bcrypt*.whl bcrypt-wheelhouse\ | ||
displayName: Move the bcrypt wheel into the final wheel house | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathToPublish: bcrypt-wheelhouse/ | ||
artifactName: bcrypt-windows-$(WINDOWS_ARCH)-python$(PYTHON_VERSION) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters