* switch to azure pipelines

no more jenkins, do mac builds on azure

* add status badge

* fix manifest issue

* full path to tox on windows

* quotes

* indentation

* i don't understand.

* remove unneeded vars

* test on more pythons
This commit is contained in:
Paul Kehrer 2019-05-26 11:28:59 -04:00 committed by Alex Gaynor
parent bc8a55e70e
commit 6659f215bf
5 changed files with 93 additions and 66 deletions

View File

@ -39,14 +39,6 @@ matrix:
- env: TOXENV=packaging
- python: 3.5
env: TOXENV=py3pep8
- language: generic
os: osx
osx_image: xcode9.4
env: TOXENV=py27
- language: generic
os: osx
osx_image: xcode9.4
env: TOXENV=py35
install: .travis/install.sh

57
Jenkinsfile vendored
View File

@ -1,57 +0,0 @@
def configs = [
[
label: 'windows',
toxenvs: ['py27', 'py34', 'py35', 'py36', 'py37'],
],
[
label: 'windows64',
toxenvs: ['py27', 'py34', 'py35', 'py36', 'py37'],
],
]
def build(label, toxenv) {
try {
timeout(time: 5, unit: 'MINUTES') {
if (label.startsWith("windows")) {
bat """
@set PATH="C:\\Python27";"C:\\Python27\\Scripts";%PATH%
tox -r -e $toxenv
"""
} else {
ansiColor('xterm') {
sh "tox -r -e $toxenv -- --color=yes"
}
}
}
} finally {
deleteDir()
}
}
def builders = [:]
for (config in configs) {
def label = config["label"]
def toxenvs = config["toxenvs"]
// We need to use a temporary variable here and then
// bind it in the for loop so that it is properly captured
// by the closure
for (_toxenv in toxenvs) {
def toxenv = _toxenv
def combinedName = "${label}-${toxenv}"
builders[combinedName] = {
node(label) {
stage("Checkout") {
checkout scm
}
stage(combinedName) {
build(label, toxenv)
}
}
}
}
}
parallel builders

View File

@ -8,7 +8,7 @@ include src/build_bcrypt.py
recursive-include src/_csrc *
recursive-include tests *.py
exclude requirements.txt tasks.py .travis.yml wheel-scripts Jenkinsfile
exclude requirements.txt tasks.py .travis.yml wheel-scripts Jenkinsfile azure-pipelines.yml
exclude .jenkins
recursive-exclude .jenkins *

View File

@ -8,6 +8,9 @@ bcrypt
.. image:: https://travis-ci.org/pyca/bcrypt.svg?branch=master
:target: https://travis-ci.org/pyca/bcrypt
.. image:: https://dev.azure.com/pyca/bcrypt/_apis/build/status/bcrypt-CI?branchName=master
:target: https://dev.azure.com/pyca/bcrypt/_build/latest?definitionId=8&branchName=master
Good password hashing for your software and your servers

89
azure-pipelines.yml Normal file
View File

@ -0,0 +1,89 @@
trigger:
branches:
include:
- "master"
tags:
include:
- "*"
jobs:
- job: 'mac'
pool:
vmImage: 'macOS-10.14'
strategy:
matrix:
Python27:
python.version: '2.7'
TOXENV: py27
Python34:
python.version: '3.4'
TOXENV: py34
Python35:
python.version: '3.5'
TOXENV: py35
Python36:
python.version: '3.6'
TOXENV: py36
Python37:
python.version: '3.7'
TOXENV: py37
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: pip install tox
displayName: 'Install tox'
- script: tox
displayName: 'Run tests'
- job: 'win'
pool:
vmImage: 'windows-2019'
container: $[variables.containerImage]
strategy:
matrix:
Python27-x86:
TOXENV: py27
containerImage: 'pyca/cryptography-runner-windows:py27-x86'
PYTHON_DIR: 'Python27'
Python27-x86-64:
TOXENV: py27
containerImage: 'pyca/cryptography-runner-windows:py27-x86_64'
PYTHON_DIR: 'Python27'
Python34-x86:
TOXENV: py34
containerImage: 'pyca/cryptography-runner-windows:py34-x86'
PYTHON_DIR: 'Python34'
Python34-x86-64:
TOXENV: py34
containerImage: 'pyca/cryptography-runner-windows:py34-x86_64'
PYTHON_DIR: 'Python34'
Python35-x86:
TOXENV: py35
containerImage: 'pyca/cryptography-runner-windows:py35-x86'
PYTHON_DIR: 'Python35'
Python35-x86-64:
TOXENV: py35
containerImage: 'pyca/cryptography-runner-windows:py35-x86_64'
PYTHON_DIR: 'Python35'
Python36-x86:
TOXENV: py36
containerImage: 'pyca/cryptography-runner-windows:py3-x86'
PYTHON_DIR: 'Python36'
Python36-x86-64:
TOXENV: py36
containerImage: 'pyca/cryptography-runner-windows:py3-x86_64'
PYTHON_DIR: 'Python36'
Python37-x86:
TOXENV: py37
containerImage: 'pyca/cryptography-runner-windows:py3-x86'
PYTHON_DIR: 'Python37'
Python37-x86-64:
TOXENV: py37
containerImage: 'pyca/cryptography-runner-windows:py3-x86_64'
PYTHON_DIR: 'Python37'
steps:
- script: "C:/%PYTHON_DIR%/Scripts/tox"
displayName: 'Run tests'