Skip to content

Commit a27b728

Browse files
committed
trying out azure-pipelines with jobs
1 parent d2f366b commit a27b728

File tree

4 files changed

+40
-56
lines changed

4 files changed

+40
-56
lines changed

.azure-pipelines/azure-pipelines.yml

Lines changed: 20 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,20 @@
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
5-
6-
# trigger:
7-
# - master
8-
9-
# strategy:
10-
# matrix:
11-
# macos:
12-
# python.version: "3.7"
13-
# image.name: "macOS-10.14"
14-
# miniconda.url: https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
15-
# linux:
16-
# python.version: "3.7"
17-
# image.name: "ubuntu-16.04"
18-
# miniconda.url: https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
19-
# # windows:
20-
# # python.version: "3.7"
21-
# # image.name: "windows-2019"
22-
# # miniconda.url:
23-
24-
# pool:
25-
# vmImage: $(image.name)
26-
27-
# steps:
28-
# - task: UsePythonVersion@0
29-
# inputs:
30-
# versionSpec: '$(python.version)'
31-
# displayName: 'Use Python $(python.version)'
32-
33-
# - script: |
34-
# wget $(miniconda.url) -O miniconda.sh
35-
# bash miniconda.sh -b -p $HOME/anaconda
36-
# export PATH="$HOME/anaconda/bin:$PATH"
37-
# conda config --set always_yes yes --set changeps1 no
38-
# conda update -q conda
39-
# conda config --add channels conda-forge
40-
41-
# # Install Python, py.test, and required packages.
42-
# conda env create -f environment.yml
43-
# source activate bayesian-modelling-tutorial
44-
45-
# which conda
46-
# conda install python=$(python.version) jupyter pandoc
47-
# python -m ipykernel install --user --name bayesian-modelling-tutorial
48-
# displayName: 'Install dependencies'
49-
50-
# # Q: Does second script not recognize environment context from 1st script?
51-
# - script: |
52-
# source activate bayesian-modelling-tutorial
53-
# mkdir -p docs/notebooks
54-
# jupyter nbconvert --config nbconvert_config.py --execute --template full
55-
# pandoc README.md -o docs/index.html -c static/pandoc.css -s
56-
# displayName: 'Build docs pages'
1+
jobs:
2+
- job: macOS
3+
strategy: templates/python-matrix.yml
4+
variables:
5+
miniconda.url: https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
6+
pool:
7+
vmImage: macOS-10.14
8+
steps:
9+
- template: templates/setup-script.yml
10+
- template: templates/nb-docs.yml
11+
12+
- job: linux
13+
strategy: templates/python-matrix.yml
14+
variables:
15+
miniconda.url: https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
16+
pool:
17+
vmImage: ubuntu-16.04
18+
steps:
19+
- template: templats/setup-script.yml
20+
- template: templates/nb-docs.yml
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
- script: |
3+
source activate bayesian-modelling-tutorial
4+
mkdir -p docs/notebooks
5+
jupyter nbconvert --config nbconvert_config.py --execute --template full
6+
pandoc README.md -o docs/index.html -c static/pandoc.css -s
7+
displayName: 'Build docs pages'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
strategy:
2+
matrix:
3+
py37:
4+
python.version: "3.7"
5+
py36:
6+
python.version: "3.6"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
- script: |
3+
conda env create -f environment.yml
4+
source activate bayesian-modelling-tutorial
5+
conda install -y python=$(python.version)
6+
python -m ipykernel install --user --name bayesian-modelling-tutorial
7+
displayName: 'Create environment, install correct Python, and activate kernel.'

0 commit comments

Comments
 (0)