-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathrun_travis.sh
executable file
·55 lines (44 loc) · 1.44 KB
/
run_travis.sh
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
#!/bin/bash
OS=${1:-linux}
set -e
export LCLS_TRAVIS=1
if [[ $OS == linux ]]; then
source activate $CONDA_ENV
cd "$(dirname "${BASH_SOURCE[0]}")"
export PATH="$PWD/install/bin:$PATH"
PYVER=$(python -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))")
export PYTHONPATH="$PWD/install/lib/python$PYVER/site-packages"
export TESTRELDIR="$PWD/install"
./build_all.sh -p install
pytest psana/psana/tests
pytest psdaq/psdaq/tests
cd ..
git clone https://github.com/slac-lcls/ami.git
cd ami
./build_all.sh
xvfb-run pytest
elif [[ $OS == osx ]]; then
# add conda to the path
source "$HOME/miniconda/etc/profile.d/conda.sh"
# needed to use the conda compilers
export MACOSX_DEPLOYMENT_TARGET="10.9"
export CONDA_BUILD_SYSROOT="${HOME}/MacOSX${MACOSX_DEPLOYMENT_TARGET}.sdk"
# needed for cmake
export SDKROOT="${CONDA_BUILD_SYSROOT}"
if [ -d "${CONDA_BUILD_SYSROOT}" ]; then
echo "Found CONDA_BUILD_SYSROOT: ${CONDA_BUILD_SYSROOT}"
else
echo "Missing CONDA_BUILD_SYSROOT: ${CONDA_BUILD_SYSROOT}"
exit 1
fi
conda activate $CONDA_ENV
cd "$(dirname "${BASH_SOURCE[0]}")"
export PATH="$PWD/install/bin:$PATH"
PYVER=$(python -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))")
export PYTHONPATH="$PWD/install/lib/python$PYVER/site-packages"
./build_all.sh -d -p install
pytest psana/psana/tests
else
echo "Unknown OS type: ${OS}"
exit 1
fi