Skip to content

Commit

Permalink
[CI] Add azure-pipelines.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Herklos committed May 11, 2020
1 parent 8eb5c3b commit c9e6437
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 67 deletions.
28 changes: 0 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,48 +50,20 @@ jobs:
repo: $GH_REPO
branch: $DEPLOY_BRANCH
tags: true
condition: $TRAVIS_OS_NAME = 'linux'
- provider: script
script: docker run -it -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -v $(pwd):/project drakkarsoftware/octobot-pypi-deploy:i686 "i686" "cp37-cp37m" "cp37"
cleanup: true
on:
repo: "$GH_REPO"
branch: "$DEPLOY_BRANCH"
tags: true
condition: "$TRAVIS_OS_NAME = 'linux'"
- provider: script
script: docker run -it -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -v $(pwd):/project drakkarsoftware/octobot-pypi-deploy:x86_64 "x86_64" "cp37-cp37m" "cp37"
cleanup: true
on:
repo: "$GH_REPO"
branch: "$DEPLOY_BRANCH"
tags: true
condition: "$TRAVIS_OS_NAME = 'linux'"

- name: "OSX - Python 3.7 - Deploy"
stage: deploy
os: osx
osx_image: xcode11 # Python 3.7.2 running on macOS 10.14.3
language: shell # 'language: python' is an error on Travis CI macOS
# python: 3.7 # 'python:' is ignored on Travis CI macOS
before_install: python3 --version ; pip3 --version ; sw_vers
before_cache:
- rm -f "$HOME/Library/Caches/pip/log/debug.log"
cache:
directories:
- "$HOME/Library/Caches/pip"
script:
- python3 setup.py build_ext --inplace
- pytest tests
deploy:
- provider: script
script: python3 setup.py bdist_wheel && python3 -m twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD --skip-existing
cleanup: true
on:
repo: "$GH_REPO"
branch: "$DEPLOY_BRANCH"
tags: true
condition: "$TRAVIS_OS_NAME = 'osx'"

after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
Expand Down
39 changes: 0 additions & 39 deletions appveyor.yml

This file was deleted.

92 changes: 92 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
trigger:
branches:
include:
- master
tags:
include:
- '*'
paths:
include:
- '*'

pr:
autoCancel: true
branches:
include:
- '*'

jobs:
- job: Windows
pool:
vmImage: 'windows-latest'
strategy:
maxParallel: 2
matrix:
Python36-32bit-full:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x86'
Python36-64bit-full:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x64'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: $(PYTHON_ARCH)
- script: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --prefer-binary -r requirements.txt -r dev_requirements.txt
displayName: 'Install dependencies'
- script: |
python setup.py build_ext --inplace
python setup.py install
displayName: 'Install OctoBot-Backtesting'
- script: python -m pytest tests
displayName: 'Run OctoBot-Backtesting tests'
- script: python setup.py bdist_wheel
displayName: 'Building wheel'
- task: TwineAuthenticate@1
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
displayName: 'Official Twine Authenticate'
inputs:
pythonUploadServiceConnection: pypi-official
- script: python -m twine upload -r "pypi-official" --config-file $(PYPIRC_PATH) --skip-existing dist/*
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
displayName: 'Uploading wheel'

- job: macOS
pool:
vmImage: 'macOS-latest'
strategy:
maxParallel: 2
matrix:
Python36-64bit-full:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x64'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: $(PYTHON_ARCH)
- script: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --prefer-binary -r requirements.txt -r dev_requirements.txt
displayName: 'Install dependencies'
- script: |
python setup.py build_ext --inplace
python setup.py install
displayName: 'Install OctoBot-Backtesting'
- script: python -m pytest tests
displayName: 'Run OctoBot-Backtesting tests'
- script: python setup.py bdist_wheel
displayName: 'Building wheel'
- task: TwineAuthenticate@1
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
displayName: 'Official Twine Authenticate'
inputs:
pythonUploadServiceConnection: pypi-official
- script: python -m twine upload -r "pypi-official" --config-file $(PYPIRC_PATH) --skip-existing dist/*
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
displayName: 'Uploading wheel'

0 comments on commit c9e6437

Please sign in to comment.