From e96e3c6efb3d4f0830edb3890341c860072a70c0 Mon Sep 17 00:00:00 2001 From: Pey Lian Lim <2090236+pllim@users.noreply.github.com> Date: Fri, 14 Jun 2019 15:48:03 -0400 Subject: [PATCH] Initial setup [ci skip] --- Jenkinsfile | 25 +++------------------- azure-pipelines.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 22 deletions(-) create mode 100644 azure-pipelines.yml diff --git a/Jenkinsfile b/Jenkinsfile index 70f09489..9218bdc9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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'] @@ -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]) diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..346eea72 --- /dev/null +++ b/azure-pipelines.yml @@ -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'