source: sasview/build_tools/jenkins_rhel6_build.sh @ 431896cf

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 431896cf was 5709051, checked in by Mathieu Doucet <doucetm@…>, 12 years ago

Improved version handling

  • Property mode set to 100755
File size: 1.5 KB
Line 
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
14
15# Set up build environmentRun tests #######################################
16cd $WORKSPACE
17
18#  Check dependencies
19if [ ! -d "utils" ]; then
20    mkdir utils
21fi
22export PYTHONPATH=$PYTHONPATH:$WORKSPACE/utils
23easy_install -d $WORKSPACE/utils unittest-xml-reporting
24easy_install -d $WORKSPACE/utils lxml
25easy_install -d $WORKSPACE/utils pyparsing==1.5.5
26python deps.py
27
28#  Set up working directories
29rm -rf $SASVIEW_INSTALL
30mkdir $SASVIEW_INSTALL
31
32rm -rf $WORKSPACE/dist
33mkdir $WORKSPACE/dist
34
35rm -rf build
36
37
38# Build SasView ###########################################################
39export PYTHONPATH=$PYTHONPATH:$WORKSPACE/$SASVIEW_INSTALL:$WORKSPACE/utils
40python setup.py bdist_egg
41
42
43# Run tests ###############################################################
44#  Install it locally so we can test it
45cd $WORKSPACE/dist
46easy_install -d ../$SASVIEW_INSTALL sasview*.egg
47
48#  Run tests
49cd $WORKSPACE/test
50python utest_sansview.py
51
52
53# Build RPM ###############################################################
54cd ${HOME}/rpmbuild/SOURCES
55rm -rf *.egg
56cp $WORKSPACE/dist/*.egg .
57
58rm -rf $WORKSPACE/dist/*.rpm
59
60cd ${WORKSPACE}/build_tools/rpm
61python create_rpm_spec.py ${SVN_REVISION}
62cp sansview.spec ${HOME}/rpmbuild/SPECS
63
64cd ${HOME}/rpmbuild/SPECS
65rpmbuild -bb sansview.spec --clean
66cp ${HOME}/rpmbuild/RPMS/x86_64/* ${WORKSPACE}/dist
67
Note: See TracBrowser for help on using the repository browser.