Skip to content

Commit 4c953d5

Browse files
authored
Merge pull request #73 from ericmjl/azure-macos
Azure multi-OS
2 parents 6d3cef0 + ea12c66 commit 4c953d5

File tree

6 files changed

+123
-56
lines changed

6 files changed

+123
-56
lines changed

.azure-pipelines/azure-pipelines.yml

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,55 @@
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:
4+
matrix:
5+
py37:
6+
python.version: "3.7"
7+
py36:
8+
python.version: "3.6"
9+
pool:
10+
vmImage: macOS-10.14
11+
steps:
12+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/anaconda?view=azure-devops&tabs=macos
13+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
14+
displayName: Add conda to PATH
15+
16+
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
17+
# We need to take ownership if we want to update conda or install packages globally
18+
- bash: sudo chown -R $USER $CONDA
19+
displayName: Take ownership of conda installation
20+
- template: templates/setup-script-nix.yml
21+
- template: templates/nb-docs-nix.yml
22+
23+
- job: linux
24+
strategy:
25+
matrix:
26+
py37:
27+
python.version: "3.7"
28+
py36:
29+
python.version: "3.6"
30+
pool:
31+
vmImage: ubuntu-16.04
32+
steps:
33+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/anaconda?view=azure-devops&tabs=ubuntu-16-04
34+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
35+
displayName: Add conda to PATH
36+
37+
- template: templates/setup-script-nix.yml
38+
- template: templates/nb-docs-nix.yml
39+
40+
- job: windows
41+
strategy:
42+
matrix:
43+
py37:
44+
python.version: "3.7"
45+
py36:
46+
python.version: "3.6"
47+
pool:
48+
vmImage: vs2017-win2016
49+
steps:
50+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/anaconda?view=azure-devops&tabs=vs2017
51+
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
52+
displayName: Add conda to PATH
53+
54+
- template: templates/setup-script-win.yml
55+
- template: templates/nb-docs-win.yml

.azure-pipelines/macos.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
trigger:
2+
- master
3+
4+
variables:
5+
miniconda.url: https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
6+
7+
pool:
8+
vmImage: macOS-10.14
9+
10+
steps:
11+
# Add conda to PATH.
12+
13+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
14+
displayName: Add conda to PATH
15+
16+
# - script: |
17+
# # Install Python, py.test, and required packages.
18+
# conda env create -f environment.yml
19+
# source activate bayesian-modelling-tutorial
20+
# conda install -y python=$(python.version)
21+
# python -m ipykernel install --user --name bayesian-modelling-tutorial
22+
# displayName: 'Create environment, install correct Python, and activate kernel.'
23+
24+
# # Q: Does second script not recognize environment context from 1st script?
25+
# - script: |
26+
# source activate bayesian-modelling-tutorial
27+
# mkdir -p docs/notebooks
28+
# jupyter nbconvert --config nbconvert_config.py --execute --template full
29+
# pandoc README.md -o docs/index.html -c static/pandoc.css -s
30+
# displayName: 'Build docs pages'
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
- script: |
3+
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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.'
8+
9+
- script: |
10+
source activate bayesian-modelling-tutorial
11+
conda list
12+
displayName: 'Display all packages, for diagnostic purposes.'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
steps:
2+
- script: |
3+
conda env create -f environment.yml
4+
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.'
8+
9+
- script: |
10+
activate bayesian-modelling-tutorial
11+
conda list
12+
displayName: 'Display all packages, for diagnostic purposes.'

0 commit comments

Comments
 (0)