forked from ReactionMechanismGenerator/RMG-Py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
101 lines (97 loc) · 4.19 KB
/
.travis.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
language: minimal
env:
global:
- secure: "L2ja+ZnV83w4qG3E8FwTjm0D6IWNOnj5wuFOjYTwbzQP4OAgLAWBzCMtxzWy5sMxFLtRgkswBH1d5f5kg8Ab7GIyAMFgQwe8UFqMJ+N05QNszE1mJkAvJtv2XN7669XXQhTt5EXfHrCcGZaODVnI2CEA8GB5DxiHO2Lcqf/xvgE="
- secure: "dkhvrkbNEHv55q3NU+lNJ0SqaNG0/vPMsG3X2eQvYjFsq/e8EliILtEtjrugSgeFohxqms0F+sSyDpw46mtn+jukYejdywLVL7w8o9pxlkHv8uEqYhNiwCD8RjNyRPQAS9jL+sAJiqdqUWR6AzjwaLproCe6rFzzGe7Io5oDLMg="
- secure: "cfosGf5hvUhIlPoGJu0d/HFddrMwIFU7FfLwd8yRrMGkYv0ePOwAW9kmhFSxUYvuXkxzgD75cIICMFY2fSm6VXBXXzfPQD7vwzoApXf7a8vi0C64XhinXhdEyUYb5/v8fswa0zheUENYhUS1tOqDXT/h8EPNZT5wKizaA3O2Wa8="
- secure: "QXuqKYuwCocqsTMePBc5OugBbQC4/t+335TYLdkletiateP/rF/eDsVRG792/BVq5gKRZgz3NH9ipTNm5pZoCbAEPt9+eDpfts8WeAbxmjdcEjfBxxwZ69wUTPAVrezTGn2k7W2UBdFrWeUNKPAVCKIkoviXqOHFitqJEC+c6JY="
- secure: "jIyBEzR10l5SWvY5ouEYzA8YzPHIZNMXMBdcXwuwte8NCU8GBYUqhHA1L67nTaBdLhWbrZ2NireVKPQWJp3ctcI0IB6xZzaYlVpgN/udGPO+1MZd9Xhp9TWuJWrGZ9EoWGB9L5H+O7RYwcDMVH5CUrCIBdsSJuyE8aDpky1/IVE="
stages:
- test
- name: documentation
if: branch = master AND type = push
- name: deploy
if: branch = stable AND type = push
before_install:
- cd ..
# Display CPU and memory information on the Linux builds
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then lscpu; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then free -m; fi
# Install miniconda
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
# Update conda
- conda update --yes conda
- conda info -a
# Set git info
- git config --global user.name "Travis Deploy"
- git config --global user.email "[email protected]"
jobs:
include:
- stage: test
install:
# Clone RMG-database
- git clone https://github.com/ReactionMechanismGenerator/RMG-database.git
- cd RMG-Py
# Create and activate environment
- conda env create -q -f environment.yml
- source activate rmg_env
# Install codecov for coverage report
- conda install -y -c conda-forge codecov
- conda list
# Setup MOPAC license key
- yes 'Yes' | $HOME/miniconda/envs/rmg_env/bin/mopac $MOPACKEY > /dev/null
# Install Q2DTor
- git clone -b arkanepy3 https://github.com/mjohnson541/Q2DTor.git external/Q2DTor
# Compile RMG
- make
script:
- make test-unittests
- make test-functional
- make test-database
after_success:
- codecov
- bash ./deploy.sh
- stage: documentation
install:
- cd RMG-Py
- conda env create -q -f environment.yml
- source activate rmg_env
# Install sphinx for building documentation
- conda install -y sphinx
- conda list
# Modify setup.py
- sed -i '/embedsignature/s/# //g' setup.py
- make
- cd documentation
- export COMMITMESSAGE="Automatic documentation rebuild"
script:
- make travis_setup clean html publish
- stage: deploy
install:
# Setup conda build
- conda install -y conda-build
- conda install -y anaconda-client
- conda config --append channels rmg
- conda config --append channels rdkit
- conda config --append channels cantera
- conda config --append channels pytorch
- conda config --append channels conda-forge
- conda config --set anaconda_upload yes
script:
- conda build --token $CONDA_TOKEN --user rmg RMG-Py/.conda
- os: osx
install:
# Setup conda build
- conda install -y conda-build
- conda install -y anaconda-client
- conda config --append channels rmg
- conda config --append channels rdkit
- conda config --append channels cantera
- conda config --append channels pytorch
- conda config --append channels conda-forge
- conda config --set anaconda_upload yes
script:
- conda build --token $CONDA_TOKEN --user rmg RMG-Py/.conda