-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Azure builds for Mac and Windows (#24)
Move mac builds to Azure and setup builds for GMT 6 as well. Only use sphinx=1.8.5 in the deploy build to test with the latest sphinx.
- Loading branch information
Showing
3 changed files
with
199 additions
and
23 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,187 @@ | ||
# Configuration for Azure Pipelines | ||
######################################################################################## | ||
|
||
# Only build the master branch, tags, and PRs (on by default) to avoid building random | ||
# branches in the repository until a PR is opened. | ||
trigger: | ||
branches: | ||
include: | ||
- master | ||
- refs/tags/* | ||
|
||
|
||
jobs: | ||
|
||
# Linux | ||
######################################################################################## | ||
- job: | ||
displayName: 'Style Checks' | ||
|
||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
|
||
variables: | ||
CONDA_INSTALL_EXTRA: "black pylint=2.2.2" | ||
PYTHON: '3.7' | ||
|
||
steps: | ||
|
||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '3.7' | ||
|
||
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin" | ||
displayName: Add conda to PATH | ||
|
||
# Get the Fatiando CI scripts | ||
- bash: git clone --branch=1.1.1 --depth=1 https://github.com/fatiando/continuous-integration.git | ||
displayName: Fetch the Fatiando CI scripts | ||
|
||
# Setup dependencies and build a conda environment | ||
- bash: source continuous-integration/azure/setup-miniconda.sh | ||
displayName: Setup Miniconda | ||
|
||
# Show installed pkg information for postmortem diagnostic | ||
- bash: | | ||
set -x -e | ||
source activate testing | ||
conda list | ||
displayName: List installed packages | ||
# Check that the code passes format checks | ||
- bash: | | ||
set -x -e | ||
source activate testing | ||
make check | ||
displayName: Formatting check (black and pylint) | ||
condition: succeededOrFailed() | ||
# Mac | ||
######################################################################################## | ||
- job: | ||
displayName: 'Mac' | ||
|
||
pool: | ||
vmImage: 'macOS-10.14' | ||
|
||
variables: | ||
CONDA_REQUIREMENTS: requirements.txt | ||
CONDA_INSTALL_EXTRA: "sphinx gmt sphinx_rtd_theme numpydoc" | ||
|
||
strategy: | ||
matrix: | ||
Python37: | ||
python.version: '3.7' | ||
PYTHON: '3.7' | ||
Python36: | ||
python.version: '3.6' | ||
PYTHON: '3.6' | ||
Python37-GMT6: | ||
python.version: '3.7' | ||
PYTHON: '3.7' | ||
CONDA_INSTALL_EXTRA: "sphinx gmt=6.0.0rc1 sphinx_rtd_theme numpydoc" | ||
CONDA_EXTRA_CHANNEL: "conda-forge/label/dev" | ||
|
||
steps: | ||
|
||
- bash: echo "##vso[task.prependpath]$CONDA/bin" | ||
displayName: Add conda to PATH | ||
|
||
# Get the Fatiando CI scripts | ||
- bash: git clone --branch=1.1.1 --depth=1 https://github.com/fatiando/continuous-integration.git | ||
displayName: Fetch the Fatiando CI scripts | ||
|
||
# Setup dependencies and build a conda environment | ||
- bash: source continuous-integration/azure/setup-miniconda.sh | ||
displayName: Setup Miniconda | ||
|
||
# Show installed pkg information for postmortem diagnostic | ||
- bash: | | ||
set -x -e | ||
source activate testing | ||
conda list | ||
displayName: List installed packages | ||
# Install the package | ||
- bash: | | ||
set -x -e | ||
source activate testing | ||
python setup.py bdist_wheel | ||
pip install dist/* | ||
displayName: Install the package | ||
# Build the documentation | ||
- bash: | | ||
set -x -e | ||
source activate testing | ||
make -C doc clean all | ||
displayName: Build the documentation | ||
# Windows | ||
######################################################################################## | ||
- job: | ||
displayName: 'Windows' | ||
|
||
pool: | ||
vmImage: 'vs2017-win2016' | ||
|
||
variables: | ||
CONDA_REQUIREMENTS: requirements.txt | ||
CONDA_INSTALL_EXTRA: "sphinx gmt sphinx_rtd_theme numpydoc" | ||
|
||
strategy: | ||
matrix: | ||
Python37: | ||
python.version: '3.7' | ||
PYTHON: '3.7' | ||
Python36: | ||
python.version: '3.6' | ||
PYTHON: '3.6' | ||
Python37-GMT6: | ||
python.version: '3.7' | ||
PYTHON: '3.7' | ||
CONDA_INSTALL_EXTRA: "sphinx gmt=6.0.0rc1 sphinx_rtd_theme numpydoc" | ||
CONDA_EXTRA_CHANNEL: "conda-forge/label/dev" | ||
|
||
steps: | ||
|
||
# Install ghostscript separately since there is no Windows conda-forge package for it. | ||
- bash: | | ||
set -x -e | ||
choco install ghostscript | ||
displayName: Install ghostscript via chocolatey | ||
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" | ||
displayName: Add conda to PATH | ||
|
||
# Get the Fatiando CI scripts | ||
- script: git clone --branch=1.1.1 --depth=1 https://github.com/fatiando/continuous-integration.git | ||
displayName: Fetch the Fatiando CI scripts | ||
|
||
# Setup dependencies and build a conda environment | ||
- script: continuous-integration/azure/setup-miniconda.bat | ||
displayName: Setup Miniconda | ||
|
||
# Show installed pkg information for postmortem diagnostic | ||
- bash: | | ||
set -x -e | ||
source activate testing | ||
conda list | ||
displayName: List installed packages | ||
# Install the package that we want to test | ||
- bash: | | ||
set -x -e | ||
source activate testing | ||
python setup.py sdist --formats=zip | ||
pip install dist/* | ||
displayName: Install the package | ||
# Build the documentation | ||
- bash: | | ||
set -x -e | ||
source activate testing | ||
make -C doc clean all | ||
displayName: Build the documentation |
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
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