Skip to content

Commit dfd1d96

Browse files
committed
AzP setup
1 parent 2bad46e commit dfd1d96

File tree

4 files changed

+116
-35
lines changed

4 files changed

+116
-35
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,5 @@
1-
# Python package
2-
# Create and test a Python package on multiple Python versions.
3-
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
4-
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
1+
jobs:
2+
- template: ./scripts/azp/linux.yml
3+
- template: ./scripts/azp/win.yml
4+
- template: ./scripts/azp/osx.yml
55

6-
trigger:
7-
- master
8-
9-
pool:
10-
vmImage: 'ubuntu-latest'
11-
strategy:
12-
matrix:
13-
Python27:
14-
python.version: '2.7'
15-
Python35:
16-
python.version: '3.5'
17-
Python36:
18-
python.version: '3.6'
19-
Python37:
20-
python.version: '3.7'
21-
22-
steps:
23-
- task: UsePythonVersion@0
24-
inputs:
25-
versionSpec: '$(python.version)'
26-
displayName: 'Use Python $(python.version)'
27-
28-
- script: |
29-
python -m pip install --upgrade pip
30-
pip install -r requirements.txt
31-
displayName: 'Install dependencies'
32-
33-
- script: |
34-
pip install pytest pytest-azurepipelines
35-
pytest
36-
displayName: 'pytest'

scripts/azp/linux.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -*- mode: yaml -*-
2+
3+
jobs:
4+
- job: linux
5+
pool:
6+
vmImage: ubuntu-16.04
7+
container:
8+
image: pdal/pdal:latest
9+
options: --privileged
10+
timeoutInMinutes: 60
11+
steps:
12+
- script: |
13+
displayName: 'Dependencies'
14+
apt-get update -y; apt-get install python3-pip -y
15+
pip3 install numpy packaging cython
16+
- script: |
17+
python3 setup.py build
18+
displayName: 'Build'
19+
- script: |
20+
python3 setup.py test
21+
displayName: 'Test'

scripts/azp/osx.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# -*- mode: yaml -*-
2+
3+
jobs:
4+
- job: osx
5+
pool:
6+
vmImage: macOS-10.13
7+
timeoutInMinutes: 360
8+
steps:
9+
- script: |
10+
echo "Removing homebrew from Azure to avoid conflicts."
11+
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew
12+
chmod +x ~/uninstall_homebrew
13+
~/uninstall_homebrew -fq
14+
rm ~/uninstall_homebrew
15+
displayName: Remove homebrew
16+
- bash: |
17+
echo "##vso[task.prependpath]$CONDA/bin"
18+
sudo chown -R $USER $CONDA
19+
displayName: Add conda to PATH
20+
21+
- script: |
22+
ECHO ON
23+
source activate base
24+
conda create --yes --quiet --name pdal
25+
displayName: Create conda environment
26+
27+
- script: |
28+
ECHO ON
29+
source activate pdal
30+
conda config --set always_yes True --set show_channel_urls True
31+
conda install --yes --quiet --name pdal -c conda-forge cython packaging pdal conda-forge-ci-setup=2 -y
32+
displayName: Install PDAL
33+
- script: |
34+
source activate pdal
35+
export CI=azure
36+
source run_conda_forge_build_setup
37+
env: {
38+
OSX_FORCE_SDK_DOWNLOAD: "1"
39+
}
40+
displayName: Configure OSX SDK
41+
- script: |
42+
source activate pdal
43+
pip install numpy packaging cython
44+
displayName: 'Dependencies'
45+
- script: |
46+
python setup.py build
47+
displayName: 'Build'
48+
- script: |
49+
python setup.py test
50+
displayName: 'Test'
51+

scripts/azp/win.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
jobs:
3+
- job: win
4+
5+
pool:
6+
vmImage: vs2017-win2016
7+
timeoutInMinutes: 360
8+
steps:
9+
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
10+
displayName: Add conda to PATH
11+
12+
- script: |
13+
ECHO ON
14+
call conda create --yes --quiet --name pdal
15+
displayName: Create conda environment
16+
17+
- script: |
18+
ECHO ON
19+
call activate pdal
20+
call conda config --set always_yes True --set show_channel_urls True
21+
call conda install --yes --quiet --name pdal -c conda-forge pdal numpy packaging cython -y
22+
displayName: Install PDAL
23+
- script: |
24+
ECHO ON
25+
call activate pdal
26+
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
27+
echo %PATH%
28+
set CC=cl.exe
29+
set CXX=cl.exe
30+
python setup.py build
31+
displayName: 'Build'
32+
- script: |
33+
ECHO ON
34+
call activate pdal
35+
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
36+
set PYTHONHOME=%CONDA_PREFIX%
37+
python setup.py test
38+
displayName: 'Test'
39+
40+

0 commit comments

Comments
 (0)