forked from mctools/ncrystal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
102 lines (92 loc) · 3.64 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
language: cpp
os:
- linux
- osx
#ubuntu 20 "focal":
dist: focal
osx_image: xcode12.2
env:
global:
- SHELL_SESSION_HISTORY=0
matrix:
- BUILD=Release
- BUILD=Debug
addons:
apt:
packages:
- cmake
- cmake-data
- python3-numpy
- python3-matplotlib
compiler:
- gcc
- clang
before_install:
- python3 -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then (sleep 2;gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB||true); fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then (sleep 2;command curl -sSL https://rvm.io/mpapis.asc | gpg --import -)||(sleep 2;command curl -sSL https://rvm.io/mpapis.asc | gpg --import -)||(sleep 2;command curl -sSL https://rvm.io/mpapis.asc | gpg --import -)||true ; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then (sleep 2;rvm get stable --auto-dotfiles; sleep 2)||true; fi
before_script:
- set -e
- cmake --version
- which python3
- python3 --version
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update || true; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade || true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python || true; fi
- which python3 || echo "python3 not found"
- python3 --version
- python3 -c 'import numpy; print (numpy.__version__)' 2>/dev/null || python3 -mpip install --verbose numpy
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then python3 -mpip install numpy --user; fi
- python3 -c 'import numpy; print (numpy.__version__)'
- ls -l
- mkdir build installdir rundir
- ls -l
- set +e
- cd ./build/
- ls -l
- set -e
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD} -DCMAKE_INSTALL_PREFIX=../installdir/
- set +e
- ls -l
script:
- set -e
- make VERBOSE=1 install
- set +e
- cd ../rundir/
- ls -l
- set -e
- find ../installdir/
- ../installdir/bin/ncrystal_example_c
- ../installdir/bin/ncrystal_example_cpp
- python3 ../installdir/bin/ncrystal_inspectfile --test
- ../installdir/bin/ncrystal_inspectfile --help
- ../installdir/bin/ncrystal_inspectfile --test
- ../installdir/bin/ncrystal_inspectfile --dump Al_sg225.ncmat
- ../installdir/bin/ncrystal_inspectfile --dump Al_sg225.nxs
- python3 -c 'import matplotlib' 2>/dev/null || python3 -mpip install matplotlib
- ../installdir/bin/ncrystal_inspectfile --pdf Al_sg225.ncmat
- . ../installdir/setup.sh
- ../installdir/bin/ncrystal_example_py
- python3 -c 'import NCrystal; NCrystal.test()'
- ../installdir/bin/ncrystal_inspectfile --help
- ../installdir/bin/ncrystal_inspectfile --test
- ../installdir/bin/ncrystal_inspectfile --dump Al_sg225.ncmat
- ../installdir/bin/ncrystal_inspectfile --pdf Al_sg225.ncmat
- . ../installdir/setup.sh
- ../installdir/bin/ncrystal_example_py
- python3 -c 'import NCrystal; NCrystal.test()'
#do not run vdos2ncmat/endf2ncmat with 3.5, (uses f-strings from py3.6):
- python3 --version
- python3 -c "import sys;sys.exit(1 if sys.version_info[0:2]>=(3,6) else 0)" || ../installdir/bin/ncrystal_vdos2ncmat --help
#requires pyne! - python3 -c "import sys;sys.exit(1 if sys.version_info[0:2]>=(3,6) else 0)" || ../installdir/bin/ncrystal_endf2ncmat --help
- ../installdir/bin/ncrystal_ncmat2cpp --help
- ../installdir/bin/ncrystal_ncmat2cpp $(../installdir/bin/ncrystal-config --show=datadir)/Al_sg225.ncmat -o test.cpp
- cat test.cpp
- set +e
notifications:
email:
recipients:
on_success: change
on_failure: always