source: sasview/build_tools/jenkins_rhel6_build.sh @ c76bdc3

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since c76bdc3 was 3a39c2e, checked in by krzywon, 10 years ago

Next iteration of the SANS→SAS is complete.

  • Property mode set to 100755
File size: 1.8 KB
RevLine 
[3a39c2e]1#!/bin/sh
2
3# Check envorionment variables set by Jenkins #############################
4if [ -z "$WORKSPACE" ]; then
5        WORKSPACE=`pwd`
6fi
7
8if [ -z "$SVN_REVISION" ]; then
9        SVN_REVISION=''
10fi
11
12export SASVIEW_INSTALL=sasview-install
13
14if [ -z "$EASY_INSTALL" ]; then
15        EASY_INSTALL=`which easy_install`
16fi
17
18
19# Set up build environmentRun tests #######################################
20cd $WORKSPACE
21
22#  Check dependencies
23if [ ! -d "utils" ]; then
24    mkdir utils
25fi
26export PYTHONPATH=$PYTHONPATH:$WORKSPACE/utils
27"$EASY_INSTALL" -d "$WORKSPACE/utils" unittest-xml-reporting
28"$EASY_INSTALL" -d "$WORKSPACE/utils" lxml
29"$EASY_INSTALL" -d "$WORKSPACE/utils" pyparsing==1.5.5
30"$EASY_INSTALL" -d "$WORKSPACE/utils" bumps==0.7.5.4
31"$EASY_INSTALL" -d "$WORKSPACE/utils" periodictable==1.3.0
32python deps.py
33
34#  Set up working directories
35rm -rf $SASVIEW_INSTALL
36mkdir $SASVIEW_INSTALL
37
38rm -rf $WORKSPACE/dist
39mkdir $WORKSPACE/dist
40
41rm -rf build
42
43
44# Build SasView ###########################################################
45export PYTHONPATH=$PYTHONPATH:$WORKSPACE/$SASVIEW_INSTALL:$WORKSPACE/utils
46python setup.py bdist_egg
47
48
49# Run tests ###############################################################
50#  Install it locally so we can test it
51cd $WORKSPACE/dist
52easy_install -d ../$SASVIEW_INSTALL sasview*.egg
53
54#  Run tests
55cd $WORKSPACE/test
56python utest_sasview.py
57
58
59# Build RPM ###############################################################
60cd ${HOME}/rpmbuild/SOURCES
61rm -rf *.egg
62cp $WORKSPACE/dist/*.egg .
63
64rm -rf $WORKSPACE/dist/*.rpm
65
66cd ${WORKSPACE}/build_tools/rpm
67python create_rpm_spec.py ${SVN_REVISION}
68cp sasview.spec ${HOME}/rpmbuild/SPECS
69
70cd ${HOME}/rpmbuild/SPECS
71rpmbuild -bb sasview.spec --clean
72cp ${HOME}/rpmbuild/RPMS/x86_64/* ${WORKSPACE}/dist
73
Note: See TracBrowser for help on using the repository browser.