forked from McStasMcXtrace/McCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testbuild_mac_mcstas
executable file
·77 lines (69 loc) · 3.45 KB
/
testbuild_mac_mcstas
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
#!/bin/sh
# Ensure our 3rd party modules are in place and updated
git submodule init
git submodule update
WORK=`pwd`
export MCINSTALL_PREFIX=$WORK/testbuilds/
rm -rf $MCINSTALL_PREFIX/mcstas/2.x-test/
rm -rf dist/*
mkdir -p buildlogs
# Install a miniconda3 if it is not in place already
if [ ! -d $WORK/testbuilds/miniconda3 ]; then
if [ ! -f Miniconda3-latest-MacOSX-x86_64.sh ]; then
# Download and embed a miniconda
echo
echo "*********************************************************"
echo "* Downloading a miniconda3 for testing *"
echo "*********************************************************"
echo
sleep 3 https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
fi
echo "*********************************************************"
echo "* Embedding miniconda3 in test environment *"
echo "*********************************************************"
chmod a+x Miniconda3-latest-MacOSX-x86_64.sh
./Miniconda3-latest-MacOSX-x86_64.sh -b -p $MCINSTALL_PREFIX/miniconda3/
# Run conda to install the dependencies
echo
echo "*********************************************************"
echo "* Downloading python dependencies to embedded miniconda *"
echo "*********************************************************"
echo
export PATH=$MCINSTALL_PREFIX/miniconda3/bin:$PATH
$MCINSTALL_PREFIX/miniconda3/bin/conda install openmpi gsl matplotlib -y
$MCINSTALL_PREFIX/miniconda3/bin/pip install PyQt5 Qscintilla pyqtgraph pyaml ply numpy scipy pillow tornado jinja2 mpld3
echo "*********************************************************"
echo "* Done setting up miniconda for the test environment *"
echo "*********************************************************"
echo
fi
echo "*********************************************************"
echo "* Building mcstas *"
echo "*********************************************************"
./mkdist mcstas 2.x-test "" "" mac "" -- justinst &> buildlogs/mcstas_mac.log
echo "- Done! Build log available in buildlogs/mcstas_mac.log"
echo
echo "*********************************************************"
echo "* Building mcstas-comps *"
echo "*********************************************************"
./mkdist mcstas-comps 2.x-test "" "" mac "" -- justinst &> buildlogs/mcstas-comps_mac.log
echo "- Done! Build log available in buildlogs/mcstas-comps_mac.log"
echo
echo "*********************************************************"
echo "* Building Perl-based commandline tools *"
echo "*********************************************************"
./mkdist mcstas-tools-perl-cmdline 2.x-test tools/Legacy-Perl-cmdline/ "" mac "" -- justinst &> buildlogs/mcstas-tools_mac.log
echo "- Done! Build log available in buildlogs/mcstas-tools_mac.log"
echo
export MCSTAS=$MCINSTALL_PREFIX/mcstas/2.x-test
export MCSTAS_TOOLS=$MCSTAS/tools/Perl/
export PATH=$MCSTAS/miniconda3/bin:$MCSTAS/bin:$PATH
ln -s $$MCINSTALL_PREFIX/miniconda3 $MCINSTALL_PREFIX/mcstas/2.x-test/miniconda3
cd buildlogs
echo "*********************************************************"
echo "* Running integration test *"
echo "*********************************************************"
mcrun.pl --test &> mcstas-test_mac.log
echo "- Done! Test log available in buildlogs/mcstas-test_mac.log"
echo