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

Set up CI with Azure Pipelines #96

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a0914a7
Set up CI with Azure Pipelines
jbrockmendel Oct 4, 2018
7acd03e
port files from azure branch
jbrockmendel Oct 4, 2018
6e12b0d
add missing file
jbrockmendel Oct 4, 2018
e0a154e
fixup permissions
jbrockmendel Oct 4, 2018
bc28c9c
add missing scipy dependency
jbrockmendel Oct 4, 2018
cf90d1d
Add missing setup_conda_environment.cmd file
jbrockmendel Oct 4, 2018
b36a0aa
try to actually run tests on macos
jbrockmendel Oct 5, 2018
3b68b19
port script_single, script_multi
jbrockmendel Oct 5, 2018
91405d0
disable non-existent show_versions
jbrockmendel Oct 5, 2018
f57812c
Fix env name
jbrockmendel Oct 5, 2018
10c9535
missing env file
jbrockmendel Oct 5, 2018
79b9f63
fix permissions
jbrockmendel Oct 5, 2018
f68448c
remove skip-network
jbrockmendel Oct 5, 2018
340c72b
Try putting CONDA_ENV in quotes
jbrockmendel Oct 5, 2018
713dceb
remove a skip-network
jbrockmendel Oct 5, 2018
1c456d2
hopefully fix yaml-->yml
jbrockmendel Oct 5, 2018
e6280f2
Try to fix fact that failing test didnt cause azure failure
jbrockmendel Oct 5, 2018
f45d836
re-enable a thing to see if it fixes stuff
jbrockmendel Oct 5, 2018
d93d880
Try putting back quotes
jbrockmendel Oct 5, 2018
9bdee56
See if adding single marker helps
jbrockmendel Oct 5, 2018
1bb6e7e
flail blindly
jbrockmendel Oct 5, 2018
fa3c4e0
try bashtage suggestion to troubleshoot
jbrockmendel Oct 9, 2018
5f6c10a
check return code
jbrockmendel Oct 10, 2018
007fc93
set pipefail
jbrockmendel Oct 12, 2018
e2ff099
un-comment-out, alignment
jbrockmendel Nov 9, 2018
cd75e7d
adapt pandas GH#23454
jbrockmendel Nov 9, 2018
90d7676
update minversion
jbrockmendel Nov 9, 2018
492dfa4
Merge branch 'master' of github.com:jbrockmendel/sm2 into azure-pipel…
jbrockmendel Nov 10, 2018
35db2c6
typo fixup
jbrockmendel May 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ With luck, fixes made here will eventually be ported upstream.
</a>
</td>
</tr>
<tr>
<td></td>
<td>
<a href="https://dev.azure.com/jbrockmendel/sm2/_build/latest?definitionId=1&branch=master">
<img src="https://dev.azure.com/jbrockmendel/sm2/_apis/build/status/jbrockmendel.sm2?branch=master" alt="Azure Pipelines build status" />
</a>
</td>
</tr>

<tr>
<td>Coverage</td>
<td>
Expand Down
26 changes: 26 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Adapted from pandas version, which is in turn
# adapted from https://github.com/numba/numba/blob/master/azure-pipelines.yml
jobs:
# Mac and Linux could potentially use the same template
# except it isn't clear how to use a different build matrix
# for each, so for now they are separate
- template: ci/azure/macos.yml
parameters:
name: macOS
vmImage: xcode9-macos10.13
- template: ci/azure/linux.yml
parameters:
name: Linux
vmImage: ubuntu-16.04

# Windows Python 2.7 needs VC 9.0 installed, and not sure
# how to make that a conditional task, so for now these are
# separate templates as well
- template: ci/azure/windows.yml
parameters:
name: Windows
vmImage: vs2017-win2016
- template: ci/azure/windows-py27.yml
parameters:
name: WindowsPy27
vmImage: vs2017-win2016
84 changes: 84 additions & 0 deletions ci/azure/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# adapted from pandas' version

parameters:
name: ''
vmImage: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 11
matrix:
py27_np_19:
ENV_FILE: ci/deps/azure-27-compat.yaml
CONDA_PY: "27"
CONDA_ENV: sm2
TEST_ARGS: "--skip-slow --skip-network"

py36_locale:
ENV_FILE: ci/deps/azure-37-locale.yaml
CONDA_PY: "37"
CONDA_ENV: sm2
TEST_ARGS: "--skip-slow --skip-network"
LOCALE_OVERRIDE: "zh_CN.UTF-8"

py36_locale_slow:
ENV_FILE: ci/deps/azure-36-locale_slow.yaml
CONDA_PY: "36"
CONDA_ENV: sm2
TEST_ARGS: "--only-slow --skip-network"

steps:
- script: |
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386; fi
echo "Installing Miniconda"{
ci/incremental/install_miniconda.sh
export PATH=$HOME/miniconda3/bin:$PATH
echo "Setting up Conda environment"
ci/incremental/setup_conda_environment.sh
displayName: 'Before Install'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
ci/incremental/build.sh
displayName: 'Build'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
ci/script_single.sh
ci/script_multi.sh
echo "[Test done]"
displayName: 'Test'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate sm2 && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- task: PublishTestResults@2
inputs:
testResultsFiles: 'test-data-*.xml'
testRunTitle: 'Linux'

- powershell: |
$junitXml = "test-data-single.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data-single"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}

$junitXmlMulti = "test-data-multiple.xml"
$(Get-Content $junitXmlMulti | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data-multi"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
71 changes: 71 additions & 0 deletions ci/azure/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# adapted from pandas' version

parameters:
name: ''
vmImage: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 11
matrix:
py35_np_113:
ENV_FILE: ci/deps/azure-macos-35.yaml
CONDA_PY: "35"
CONDA_ENV: sm2
TEST_ARGS: "--skip-slow"

steps:
- script: |
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386; fi
echo "Installing Miniconda"
ci/incremental/install_miniconda.sh
export PATH=$HOME/miniconda3/bin:$PATH
echo "Setting up Conda environment"
ci/incremental/setup_conda_environment.sh
displayName: 'Before Install'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
ci/incremental/build.sh
displayName: 'Build'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
ci/script_single.sh
ci/script_multi.sh
echo "[Test done]"
displayName: 'Test'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate sm2 && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- task: PublishTestResults@2
inputs:
testResultsFiles: 'test-data-*.xml'
testRunTitle: 'MacOS-35'

- powershell: |
$junitXml = "test-data-single.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data-single"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}

$junitXmlMulti = "test-data-multiple.xml"
$(Get-Content $junitXmlMulti | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data-multi"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
61 changes: 61 additions & 0 deletions ci/azure/windows-py27.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Adapted from pandas' version

parameters:
name: ''
vmImage: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 11
matrix:
py36_np14:
ENV_FILE: ci/deps/azure-windows-27.yaml
CONDA_PY: "27"
CONDA_ENV: sm2

steps:
- task: CondaEnvironment@1
inputs:
updateConda: no
packageSpecs: ''

# Need to install VC 9.0 only for Python 2.7
# Once we understand how to do tasks conditional on build matrix variables
# we could merge this into azure-windows.yml
- powershell: |
$wc = New-Object net.webclient
$wc.Downloadfile("https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi", "VCForPython27.msi")
Start-Process "VCForPython27.msi" /qn -Wait
displayName: 'Install VC 9.0'

- script: |
ci\\incremental\\setup_conda_environment.cmd
displayName: 'Before Install'
- script: |
ci\\incremental\\build.cmd
displayName: 'Build'
- script: |
call activate %CONDA_ENV%
pytest --junitxml=test-data.xml --skip-slow sm2 -n 2 -r sxX --strict --durations=10 %*
displayName: 'Test'
- task: PublishTestResults@2
inputs:
testResultsFiles: 'test-data.xml'
testRunTitle: 'Windows 27'

- powershell: |
$junitXml = "test-data.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
52 changes: 52 additions & 0 deletions ci/azure/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# adapted from pandas' version

parameters:
name: ''
vmImage: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 11
matrix:
py36_np14:
ENV_FILE: ci/deps/azure-windows-36.yaml
CONDA_PY: "36"
CONDA_ENV: sm2

steps:
- task: CondaEnvironment@1
inputs:
updateConda: no
packageSpecs: ''

- script: |
ci\\incremental\\setup_conda_environment.cmd
displayName: 'Before Install'
- script: |
ci\\incremental\\build.cmd
displayName: 'Build'
- script: |
call activate %CONDA_ENV%
pytest --junitxml=test-data.xml --skip-slow sm2 -n 2 -r sxX --strict --durations=10 %*
displayName: 'Test'
- task: PublishTestResults@2
inputs:
testResultsFiles: 'test-data.xml'
testRunTitle: 'Windows 36'

- powershell: |
$junitXml = "test-data.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
19 changes: 19 additions & 0 deletions ci/deps/azure-27-compat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pandas
channels:
- defaults
- conda-forge
dependencies:
- bottleneck=1.2.0
- numexpr=2.6.1
- numpy=1.12.0
- python-dateutil=2.5.0
- python=2.7*
- pytz=2013b
- scipy=0.18.1
# universal
- cython>=0.28.2
- pandas>=0.23.3
- pytest
- pytest-xdist
- pip:
- hypothesis>=3.58.0
20 changes: 20 additions & 0 deletions ci/deps/azure-36-locale_slow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: pandas
channels:
- defaults
- conda-forge
dependencies:
- matplotlib
- nomkl
- numexpr
- numpy
- python-dateutil
- python=3.6*
- pytz
- scipy
# universal
- cython>=0.28.2
- pandas>=0.23.3
- pytest
- pytest-xdist
- pip:
- hypothesis>=3.58.0
20 changes: 20 additions & 0 deletions ci/deps/azure-37-locale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: pandas
channels:
- defaults
- conda-forge
dependencies:
- matplotlib
- nomkl
- numexpr
- numpy
- python-dateutil
- python=3.6*
- pytz
- scipy
# universal
- cython>=0.28.2
- pandas>=0.23.3
- pytest
- pytest-xdist
- pip:
- hypothesis>=3.58.0
21 changes: 21 additions & 0 deletions ci/deps/azure-macos-35.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: sm2
channels:
- defaults
dependencies:
- python=3.5*
- cython>=0.28.2
- bottleneck
- matplotlib
- nomkl
- numexpr
- numpy=1.13
- scipy
#
- xarray
# universal
- pandas>=0.23.3
- pytest
- pytest-xdist
- pip:
- python-dateutil==2.5.3
- hypothesis>=3.58.0
Loading