-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
55 lines (55 loc) · 1.87 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
jobs:
- job: Default
timeoutInMinutes: 300
pool:
vmImage: Ubuntu-16.04
steps:
- script: |
nproc
lscpu
displayName: 'Machine info'
- script: |
sudo chown -R $USER $CONDA
. $CONDA/etc/profile.d/conda.sh
conda create --yes --quiet --name volcano_nmf python=3.7.3 pip
displayName: 'Setup conda'
- script: |
. $CONDA/etc/profile.d/conda.sh
conda activate volcano_nmf
conda install -y -q numpy scipy mkl openblas=0.3.6 theano
theano-cache purge
pip install -U pip
pip install -U setuptools
pip install -U pytest
pip install -U tqdm
pip install -U -r requirements.txt
pip install https://github.com/astropy/astroquery/archive/master.zip
conda install -y -q -c conda-forge tectonic pybind11
git clone https://github.com/rodluger/starry
cd starry && STARRY_DEBUG=1 python setup.py develop
cd .. && git clone https://github.com/fbartolic/volcano
cd volcano && python setup.py develop
cd .. && python setup.py develop
displayName: 'Install dependencies'
- script: |
. $CONDA/etc/profile.d/conda.sh
conda activate volcano_nmf
pytest -v -s volcano_nmf
displayName: 'Run tests'
- script: |
. $CONDA/etc/profile.d/conda.sh
conda activate volcano_nmf
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/paper.pdf
git add -f paper/figures/*.pdf
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/fbartolic/volcano_nmf $(Build.SourceBranchName)-pdf
displayName: 'Upload the paper'
env:
GITHUB_API_KEY: $(GITHUB_API_KEY)