- Timestamp:
- 12/08/20 08:45:53 (4 years ago)
- Location:
- issm/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
-
issm/trunk/packagers/linux/package-issm-linux-binaries.sh
r24651 r25836 1 1 #!/bin/bash 2 2 3 4 # Script to test, package, and transfer distributable to ISSM Web site. 5 # Corresponds with build generated by configuration in 6 # $ISSM_DIR/jenkins/ross-debian_linux-binaries. 7 # 3 8 4 9 ## Constants … … 6 11 LIBGFORTRAN="/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0" # Important that this is the library itself 7 12 LIBGFORTRAN_DIST="${ISSM_DIR}/lib/libgfortran.so.5" # Important the file name matches the SONAME entry in the binaries and other shared libraries which link to it 8 MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota') ,125,126]" # Exclude Dakota tests and any tests with transient solutions that require a restart13 MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota')]" 9 14 MATLAB_PATH="/usr/local/MATLAB/R2019b" 10 15 PACKAGE="ISSM" # Name of directory to copy distributable files to 11 16 TARBALL_NAME="issm-linux" 12 17 TARBALL="${TARBALL_NAME}.tar.gz" 18 19 ## Environment 20 # 21 export PATH="${ISSM_DIR}/bin:$(getconf PATH)" # Ensure that we pick up binaries from 'bin' directory rather than 'externalpackages' 22 23 # Check if MATLAB exists 24 if ! [ -d ${MATLAB_PATH} ]; then 25 echo "${MATLAB_PATH} does not point to a MATLAB installation! Please modify MATLAB_PATH variable in $(basename $0) and try again." 26 exit 1 27 fi 13 28 14 29 # Clean up from previous packaging … … 53 68 # Check that MATLAB did not exit in error 54 69 matlabExitCode=`echo $?` 55 matlabExitedInError=`grep -E "Activation cannot proceed|license " matlab.log | wc -l`70 matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l` 56 71 57 72 if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then … … 71 86 if [[ ${numMatlabTestsFailed} -ne 0 ]]; then 72 87 echo "One or more MATLAB tests FAILED" 73 exit 1 ;88 exit 1 74 89 else 75 90 echo "All MATLAB tests PASSED" … … 86 101 rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package 87 102 rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package 103 rm -rf ${PACKAGE}/test/SandBox # Remove testing sandbox from package 88 104 echo "Creating tarball: ${TARBALL_NAME}" 89 105 tar -czf ${TARBALL} ${PACKAGE} 90 106 ls -lah ${ISSM_DIR}/${TARBALL} 91 107 92 echo "Shipping binaries to website" 93 94 # We're using public key authentication method to upload the tarball The 95 # following lines check to see if the SSH Agent is running. If not, then it is 96 # started and relevant information is forwarded to a script. 97 pgrep "ssh-agent" > /dev/null 98 if [ $? -ne 0 ]; then 99 echo "SSH Agent is not running. Starting it..." 100 ssh-agent > ~/.ssh/agent.sh 101 else 102 echo "SSH Agent is running..." 103 fi 104 105 source ~/.ssh/agent.sh 106 ssh-add ~/.ssh/debian_linux-vm-to-ross 107 108 scp ${TARBALL} ross.ics.uci.edu:/var/www/html/${TARBALL} 108 echo "Transferring binaries to ISSM Web site" 109 scp -i ~/.ssh/debian_linux-vm_to_ross ${TARBALL} jenkins@ross.ics.uci.edu:/var/www/html/${TARBALL} 109 110 110 111 if [ $? -ne 0 ]; then 111 echo "The upload failed." 112 echo "Perhaps the SSH Agent was started by some other means." 113 echo "Try killing the agent and running again." 112 echo "FAILED: Manually check connection" 113 exit 1 114 114 fi
Note:
See TracChangeset
for help on using the changeset viewer.