Ignore:
Timestamp:
12/08/20 08:45:53 (4 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 25834

Location:
issm/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • issm/trunk/packagers/linux/package-issm-linux-binaries.sh

    r24651 r25836  
    11#!/bin/bash
    22
     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#
    38
    49## Constants
     
    611LIBGFORTRAN="/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0" # Important that this is the library itself
    712LIBGFORTRAN_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 restart
     13MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota')]"
    914MATLAB_PATH="/usr/local/MATLAB/R2019b"
    1015PACKAGE="ISSM" # Name of directory to copy distributable files to
    1116TARBALL_NAME="issm-linux"
    1217TARBALL="${TARBALL_NAME}.tar.gz"
     18
     19## Environment
     20#
     21export PATH="${ISSM_DIR}/bin:$(getconf PATH)" # Ensure that we pick up binaries from 'bin' directory rather than 'externalpackages'
     22
     23# Check if MATLAB exists
     24if ! [ -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
     27fi
    1328
    1429# Clean up from previous packaging
     
    5368# Check that MATLAB did not exit in error
    5469matlabExitCode=`echo $?`
    55 matlabExitedInError=`grep -E "Activation cannot proceed|license" matlab.log | wc -l`
     70matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
    5671
    5772if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
     
    7186if [[ ${numMatlabTestsFailed} -ne 0 ]]; then
    7287        echo "One or more MATLAB tests FAILED"
    73         exit 1;
     88        exit 1
    7489else
    7590        echo "All MATLAB tests PASSED"
     
    86101rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
    87102rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
     103rm -rf ${PACKAGE}/test/SandBox # Remove testing sandbox from package
    88104echo "Creating tarball: ${TARBALL_NAME}"
    89105tar -czf ${TARBALL} ${PACKAGE}
    90106ls -lah ${ISSM_DIR}/${TARBALL}
    91107
    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}
     108echo "Transferring binaries to ISSM Web site"
     109scp -i ~/.ssh/debian_linux-vm_to_ross ${TARBALL} jenkins@ross.ics.uci.edu:/var/www/html/${TARBALL}
    109110
    110111if [ $? -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
    114114fi
Note: See TracChangeset for help on using the changeset viewer.