forked from openkim/kimpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
106 lines (98 loc) · 2.5 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
102
103
104
105
106
language: python
jobs:
include:
- os: linux
sudo: required
python: 3.6
- os: linux
sudo: required
python: 3.7
- os: linux
sudo: required
python: 3.8
- os: linux
sudo: required
python: 3.9
- os: osx
osx_image: xcode11.3
name: "Generic Python 3.7 on macOS"
language: generic
addons:
homebrew:
packages:
- gcc@9
env:
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9 && FC=gfortran-9"
- os: osx
osx_image: xcode12.2
name: "Generic Python 3.8 on macOS"
language: generic
addons:
homebrew:
packages:
- gcc@10
env:
- MATRIX_EVAL="CC=gcc-10 && CXX=g++-10 && FC=gfortran-10"
- os: osx
osx_image: xcode12.2
name: "Generic Python 3.8 on macOS"
language: generic
addons:
homebrew:
packages:
- gcc
env:
- MATRIX_EVAL="CC=clang && CXX=clang++ && FC=gfortran"
before_install:
# environment variable
- export KIMPY_DIR=$PWD ;
- export KIM_API_VERSION="2.2.1" ;
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
python3 --version ;
pip3 install -U pip ;
pip3 install -U pytest ;
fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get install gcc ;
sudo apt-get install gfortran ;
python --version ;
pip install -U pip ;
pip install -U pytest ;
fi
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
cd $KIMPY_DIR && cd .. ;
mkdir -p KIM_API && cd KIM_API;
export KIM_API_DIR=$PWD ;
cd ..;
wget http://s3.openkim.org/kim-api/kim-api-$KIM_API_VERSION.txz ;
tar Jxvf kim-api-$KIM_API_VERSION.txz ;
cd kim-api-$KIM_API_VERSION ;
mkdir build ;
cd build ;
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$KIM_API_DIR" ;
make -j2 ;
make install ;
source "$KIM_API_DIR/bin/kim-api-activate" ;
pip3 install ase ;
cd $KIMPY_DIR ;
pip3 install -e . ;
fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
cd $KIMPY_DIR && cd .. ;
wget http://s3.openkim.org/kim-api/kim-api-$KIM_API_VERSION.txz ;
tar Jxvf kim-api-$KIM_API_VERSION.txz ;
cd kim-api-$KIM_API_VERSION ;
mkdir build ;
cd build ;
cmake .. -DCMAKE_BUILD_TYPE=Release ;
make -j2 ;
sudo make install ;
sudo ldconfig ;
pip install ase ;
cd $KIMPY_DIR ;
pip install -e . ;
fi
script:
- cd tests
- pytest