Skip to content

Commit

Permalink
Merge pull request #95 from pllim/azure-ci
Browse files Browse the repository at this point in the history
Azure setup
  • Loading branch information
pllim authored Jun 14, 2019
2 parents d969df6 + e96e3c6 commit d8512ca
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 22 deletions.
25 changes: 3 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
if (utils.scm_checkout()) return

// Define each build configuration, copying and overriding values as necessary.
bc0 = new BuildConfig()
bc0.nodetype = "linux"
bc0.name = "egg"
bc0.build_cmds = ["python setup.py egg_info"]

bc1 = utils.copy(bc0)
bc1 = new BuildConfig()
bc1.nodetype = "linux"
bc1.name = "release"
// Would be nice if Jenkins can access /grp/hst/cdbs/xxxx directly.
bc1.env_vars = ['TEST_BIGDATA=https://bytesalad.stsci.edu/artifactory']
Expand All @@ -33,21 +29,6 @@ bc2.build_cmds = ["pip install scikit-image",
"pip install git+https://github.com/astropy/astropy.git#egg=astropy --upgrade --no-deps",
"python setup.py install"]

// Run PEP 8 check
bc3 = utils.copy(bc0)
bc3.name = "pep8"
bc3.conda_packages = ['python=3.7', 'flake8']
bc3.test_cmds = ["flake8 acstools --count"]

// Run doc build
bc4 = utils.copy(bc0)
bc4.name = "doc"
bc4.conda_channels = ['http://ssb.stsci.edu/astroconda', 'astropy']
bc4.conda_packages = ['python=3.6', 'numpydoc', 'matplotlib','sphinx-automodapi']
bc4.build_cmds = ["pip install sphinx_rtd_theme",
"python setup.py install"]
bc4.test_cmds = ["cd doc; make html"]

// Iterate over configurations that define the (distibuted) build matrix.
// Spawn a host of the given nodetype for each combination and run in parallel.
utils.run([bc0, bc1, bc2, bc3, bc4])
utils.run([bc1, bc2])
51 changes: 51 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This is the CI matrix that runs per push event
# for tests not requiring big data.

trigger:
- master

jobs:
- job: 'EggInfo'
pool:
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0

# Make sure that egg_info works without dependencies
- script: |
python -m pip install --upgrade pip setuptools
python setup.py egg_info
displayName: 'egg_info'
- job: 'PEP8'
pool:
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'

- script: |
python -m pip install --upgrade pip setuptools
pip install flake8
flake8 acstools --count
displayName: 'PEP 8 check'
- job: 'Doc'
pool:
vmImage: 'Ubuntu-16.04'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'

- script: |
python -m pip install --upgrade pip setuptools
pip install numpydoc matplotlib sphinx-automodapi sphinx_rtd_theme
python setup.py install
cd doc
make html
displayName: 'Doc build'

0 comments on commit d8512ca

Please sign in to comment.