Skip to content

Commit

Permalink
adding new azure pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Jan 14, 2020
1 parent 09cb647 commit 65c4540
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .ci/azure/activate_conda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -x

set -e

. $CONDA/etc/profile.d/conda.sh
conda activate ./env
9 changes: 9 additions & 0 deletions .ci/azure/setup_conda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -x

set -e

sudo chown -R $USER $CONDA
. $CONDA/etc/profile.d/conda.sh
conda env create -q --prefix ./env -f environment.yml
conda activate ./env
env/bin/python -m pip install -e .
Empty file added .ci/build-docs.yml
Empty file.
47 changes: 47 additions & 0 deletions .ci/build-paper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
pr: none
trigger:
- master
variables:
- group: exoplanet-variables
pool:
vmImage: Ubuntu-16.04

steps:
- script: |
git submodule update --init
displayName: 'Fetch submodules'

- script: |
source .ci/azure/setup_conda.sh
displayName: 'Setup conda'

- script: |
source .ci/azure/activate_conda.sh
env/bin/python -m pip install -U -r paper/requirements.txt
conda install -y -q -c conda-forge tectonic
displayName: 'Install dependencies'

- script: |
source .ci/azure/activate_conda.sh
cd $(Build.SourcesDirectory)/paper/figures
python run_notebooks.py
displayName: 'Generate the figures'

- script: |
source .ci/azure/activate_conda.sh
cd $(Build.SourcesDirectory)/paper
make
displayName: 'Build the paper'

- script: |
cd $(Build.SourcesDirectory)
git checkout --orphan $(Build.SourceBranchName)-pdf
git rm -rf --cached .
git add -f paper/exoplanet.pdf
git add -f paper/figures/*.pdf
git add -f paper/figures/*_exec.ipynb
git add -f paper/figures/notebook_errors.log
git -c user.name='azure' -c user.email='azure' commit -m "building the paper"
git push -q -f https://$(GITHUB_USER):$(GITHUB_API_KEY)@github.com/dfm/exoplanet $(Build.SourceBranchName)-pdf >/dev/null 2>&1
displayName: 'Upload the paper'
condition: always()
Empty file added .ci/run-tutorials.yml
Empty file.

0 comments on commit 65c4540

Please sign in to comment.