83 lines
2.1 KiB
Plaintext
83 lines
2.1 KiB
Plaintext
# pvaClient C++ implementation
|
|
# Jenkins @ Cloudbees build script
|
|
#
|
|
# Jenkins invokes scripts with the "-ex" option. So the build is considered a failure
|
|
# if any of the commands exits with a non-zero exit code.
|
|
#
|
|
# Author: Ralph Lange <ralph.lange@gmx.de>
|
|
# Copyright (C) 2013 Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
|
|
# Copyright (C) 2014-2016 ITER Organization.
|
|
# All rights reserved. Use is subject to license terms.
|
|
|
|
installTool () {
|
|
local module=$1
|
|
local version=$2
|
|
|
|
wget -nv https://openepics.ci.cloudbees.com/job/${module}-${version}_Build/lastSuccessfulBuild/artifact/${module,,}-${version}.CB-dist.tar.gz
|
|
tar -xzf ${module,,}-${version}.CB-dist.tar.gz
|
|
}
|
|
|
|
installE4 () {
|
|
local module=$1
|
|
local branch=$2
|
|
|
|
wget -nv https://openepics.ci.cloudbees.com/job/e4-cpp-${module}-${branch}-build/BASE=${BASE}/lastSuccessfulBuild/artifact/${module}.CB-dist.tar.gz
|
|
tar -xzf ${module}.CB-dist.tar.gz
|
|
}
|
|
|
|
###########################################
|
|
# Defaults for EPICS Base
|
|
|
|
DEFAULT_BASE=3.15.4
|
|
BASE=${BASE:-${DEFAULT_BASE}}
|
|
|
|
###########################################
|
|
# Dependent module branches
|
|
|
|
PVDATA_BRANCH="master"
|
|
PVACCESS_BRANCH="master"
|
|
NORMATIVETYPES_BRANCH="master"
|
|
|
|
###########################################
|
|
# Fetch and unpack dependencies
|
|
|
|
export STUFF=/tmp/stuff
|
|
|
|
rm -fr ${STUFF}
|
|
mkdir -p ${STUFF}
|
|
cd ${STUFF}
|
|
|
|
installTool Boost 1.61.0
|
|
installTool Base ${BASE}
|
|
|
|
installE4 pvData ${PVDATA_BRANCH}
|
|
installE4 pvAccess ${PVACCESS_BRANCH}
|
|
installE4 normativeTypes ${NORMATIVETYPES_BRANCH}
|
|
|
|
###########################################
|
|
# Build
|
|
|
|
cd ${WORKSPACE}
|
|
|
|
export EPICS_BASE=${STUFF}
|
|
export EPICS_HOST_ARCH=$(${EPICS_BASE}/startup/EpicsHostArch)
|
|
export LD_LIBRARY_PATH=${EPICS_BASE}/lib/${EPICS_HOST_ARCH}
|
|
export PATH=${STUFF}/bin:${PATH}
|
|
|
|
cat > configure/RELEASE.local << EOF
|
|
EPICS_BASE=${EPICS_BASE}
|
|
EOF
|
|
|
|
make distclean all
|
|
|
|
###########################################
|
|
# Test
|
|
|
|
# no regression tests
|
|
#make runtests
|
|
|
|
###########################################
|
|
# Create distribution
|
|
|
|
tar --exclude=test* -czf pvaClient.CB-dist.tar.gz lib include
|