Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCD multi-track capability for Princeton cameras #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .ci-local/adcore_hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash

# This script installs ADCore R3-11
#
# check if user has right permissions
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root. Please try again using sudo."
exit 1
fi

# terminate script after first line that fails
set -e

if [ -z "$EPICS_HOST_ARCH" ]
then
EPICS_HOST_ARCH=linux-x86_64
fi

# The directory above
SUPPORT="$(dirname "${PWD}")"

# This won't have been set yet on the ADCore pass.
ADCORE=$PWD

# This file will have been written by ci-scripts cue.py
source $SUPPORT/RELEASE.local

# Hack RELEASE_LIBS.local file
sed -i -e "/^ADCORE\s*=/ s,=.*,=$ADCORE," $AREA_DETECTOR/configure/RELEASE_LIBS.local

# Hack RELEASE_PRODS.local file
sed -i -e "/^ADCORE\s*=/ s,=.*,=$ADCORE," $AREA_DETECTOR/configure/RELEASE_PRODS.local

# These are example plugin files, but we will just use them
if [ ! -f $ADCORE/iocBoot/commonPlugins.cmd ]; then
cp $ADCORE/iocBoot/EXAMPLE_commonPlugins.cmd $ADCORE/iocBoot/commonPlugins.cmd
fi

# Hack commonPlugins.cmd - we need sseq_settings.req, which is in the calc module
sed -i "s/#set_requestfile_path(\"\$(CALC)\/calcApp\/Db\")/set_requestfile_path(\"\$(CALC)\/calcApp\/Db\")/" $ADCORE/iocBoot/commonPlugins.cmd
if [ ! -f $ADCORE/iocBoot/commonPlugin_settings.req ]; then
cp $ADCORE/iocBoot/EXAMPLE_commonPlugin_settings.req $ADCORE/iocBoot/commonPlugin_settings.req
fi

if [ "$WINE" == "64" ]; then
if [ ! -f /usr/bin/x86_64-w64-mingw32-g++-posix ]; then
apt-get install -y g++-mingw-w64-x86-64
fi
# see https://github.com/randombit/botan/issues/2039
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
elif [ "$WINE" == "32" ]; then
if [ ! -f /usr/bin/i686-w64-mingw32-g++-posix ]; then
apt-get install -y g++-mingw-w64-i686
fi
update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
fi

30 changes: 30 additions & 0 deletions .ci-local/adpicam_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# This script installs NDS and NDS-epics
#
# check if user has right permissions
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root. Please try again using sudo."
exit 1
fi

# terminate script after first line that fails
set -e

apt-get install -y libreadline6-dev libncurses5-dev perl clang g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86 re2c tar
apt-get install -y build-essential git python curl p7zip-full wget libxml2-dev

export GITLAB_CI=1
export SETUP_PATH=".ci-local:.ci"
export BASE_RECURSIVE="YES"
export CMP="gcc"
export BCFG="static"
export SET="stable"
export WINE=64
export VV=1
export CLEAN_DEPS="NO"
echo "PREPARE" > /tmp/adpicam_install.log
python .ci/cue.py prepare > /tmp/adpicam_install.log 2>&1
echo "BUILD" > /tmp/adpicam_install.log
python .ci/cue.py build > /tmp/adpicam_install.log 2>&1

34 changes: 34 additions & 0 deletions .ci-local/adsupport_hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# This script configures ADSupport R1-9
#
# check if user has right permissions
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root. Please try again using sudo."
exit 1
fi

# terminate script after first line that fails
set -e

if [ -z "$EPICS_HOST_ARCH" ]
then
EPICS_HOST_ARCH=linux-x86_64
fi
apt-get install -y libx11-dev libxext-dev

# The directory above
SUPPORT="$(dirname "${PWD}")"

# This won't have been set yet on the ADSupport pass.
ADSUPPORT=$PWD

# This file will have been written by ci-scripts cue.py
source $SUPPORT/RELEASE.local

# Hack RELEASE_LIBS.local file
sed -i -e "/^ADSUPPORT\s*=/ s,=.*,=$ADSUPPORT," $AREA_DETECTOR/configure/RELEASE_LIBS.local

# Hack RELEASE_PRODS.local file
sed -i -e "/^ADSUPPORT\s*=/ s,=.*,=$ADSUPPORT," $AREA_DETECTOR/configure/RELEASE_PRODS.local

71 changes: 71 additions & 0 deletions .ci-local/area_detector_hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/bash

# This script configures areadetector R3-11
#
# check if user has right permissions
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root. Please try again using sudo."
exit 1
fi

# terminate script after first line that fails
set -e

if [ -z "$EPICS_HOST_ARCH" ]
then
EPICS_HOST_ARCH=linux-x86_64
fi
apt-get install -y libx11-dev libxext-dev

# The directory above
SUPPORT="$(dirname "${PWD}")"

# This won't have been set yet on the areaDetector pass.
AREA_DETECTOR=$PWD

# This file will have been written by ci-scripts cue.py
source $SUPPORT/RELEASE.local

pushd $AREA_DETECTOR/configure
echo "Copying from example."
./copyFromExample
popd

#hack config_site.local
sed -i -e "/^WITH_PVA\s*=/ s,=.*,=YES," $AREA_DETECTOR/configure/CONFIG_SITE.local
sed -i -e "/^WITH_OPENCV\s*=/ s,=.*,=NO," $AREA_DETECTOR/configure/CONFIG_SITE.local
sed -i -e "/^WITH_QSRV\s*=/ s,=.*,=NO," $AREA_DETECTOR/configure/CONFIG_SITE.local
sed -i -e "/^WITH_BITSHUFFLE\s*=/ s,=.*,=NO," $AREA_DETECTOR/configure/CONFIG_SITE.local

# EXAMPLE_CONFIG_SITE.local.linux-x86_64 sets WITH_BOOST. I don't wannit.
if [ -f $AREA_DETECTOR/configure/CONFIG_SITE.local.$EPICS_HOST_ARCH ]; then
rm $AREA_DETECTOR/configure/CONFIG_SITE.local.$EPICS_HOST_ARCH
fi

# Hack RELEASE.local.linux-x86_64 file
# NB, this file currently points to ADPointGrey, ADEiger and ADAravis.
# I'm not installing these modules.
if [ -f $AREA_DETECTOR/configure/RELEASE.local.$EPICS_HOST_ARCH ]; then
rm $AREA_DETECTOR/configure/RELEASE.local.$EPICS_HOST_ARCH
fi
echo EPICS_BASE=$EPICS_BASE > $AREA_DETECTOR/configure/RELEASE.local

# Hack RELEASE_LIBS.local file
sed -i -e "/^SUPPORT\s*=/ s,=.*,=$SUPPORT," $AREA_DETECTOR/configure/RELEASE_LIBS.local
sed -i -e "/^ASYN\s*=/ s,=.*,=$ASYN," $AREA_DETECTOR/configure/RELEASE_LIBS.local
sed -i -e "/^EPICS_BASE\s*=/ s,=.*,=$EPICS_BASE," $AREA_DETECTOR/configure/RELEASE_LIBS.local
sed -i -e "/^AREA_DETECTOR\s*=/ s,=.*,=$AREA_DETECTOR," $AREA_DETECTOR/configure/RELEASE_LIBS.local

# Hack RELEASE_PRODS.local file
sed -i -e "/^SUPPORT\s*=/ s,=.*,=$SUPPORT," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^CALC\s*=/ s,=.*,=$CALC," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^BUSY\s*=/ s,=.*,=$BUSY," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^SSCAN\s*=/ s,=.*,=$SSCAN," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^AUTOSAVE\s*=/ s,=.*,=$AUTOSAVE," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^SNCSEQ\s*=/ s,=.*,=$SNCSEQ," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^EPICS_BASE\s*=/ s,=.*,=$EPICS_BASE," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^ASYN\s*=/ s,=.*,=$ASYN," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^AREA_DETECTOR\s*=/ s,=.*,=$AREA_DETECTOR," $AREA_DETECTOR/configure/RELEASE_PRODS.local

# Don't think we need this.
sed -i "s/DEVIOCSTATS/#DEVIOCSTATS/g" $AREA_DETECTOR/configure/RELEASE_PRODS.local
92 changes: 92 additions & 0 deletions .ci-local/areadetector_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/bin/bash

# This script installs areadetector R3-10
#
# check if user has right permissions
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root. Please try again using sudo."
exit 1
fi

# terminate script after first line that fails
set -e

if [ -z "$EPICS_HOST_ARCH" ]
then
EPICS_HOST_ARCH=linux-x86_64
fi

apt-get install -y libx11-dev libxext-dev

EPICS_ROOT=/builds/DATAnet/adpicam
SUPPORT=$EPICS_ROOT/.cache

# This won't have been set yet on the ADCore pass.
ADCORE=$PWD

# This file will have been written by ci-scripts cue.py
source $SUPPORT/RELEASE.local
# The file needs to be copied into the areaDetector folder for sub-module build.
cp $SUPPORT/RELEASE.local $AREA_DETECTOR/

pushd $AREA_DETECTOR/configure
echo "Copying from example."
./copyFromExample
popd

#hack config_site.local
sed -i -e "/^WITH_PVA\s*=/ s,=.*,=YES," $AREA_DETECTOR/configure/CONFIG_SITE.local
sed -i -e "/^WITH_OPENCV\s*=/ s,=.*,=NO," $AREA_DETECTOR/configure/CONFIG_SITE.local
sed -i -e "/^WITH_QSRV\s*=/ s,=.*,=NO," $AREA_DETECTOR/configure/CONFIG_SITE.local
sed -i -e "/^WITH_BITSHUFFLE\s*=/ s,=.*,=NO," $AREA_DETECTOR/configure/CONFIG_SITE.local

# EXAMPLE_CONFIG_SITE.local.linux-x86_64 sets WITH_BOOST. I don't wannit.
if [ -f $AREA_DETECTOR/configure/CONFIG_SITE.local.$EPICS_HOST_ARCH ]; then
rm $AREA_DETECTOR/configure/CONFIG_SITE.local.$EPICS_HOST_ARCH
fi

# Hack RELEASE.local file
sed -i -e "/^ADSUPPORT\s*=/ s,=.*,=$ADSUPPORT," $AREA_DETECTOR/configure/RELEASE.local

# Hack RELEASE.local.linux-x86_64 file
# NB, this file currently points to ADPointGrey, ADEiger and ADAravis.
# I'm not installing these modules.
if [ -f $AREA_DETECTOR/configure/RELEASE.local.$EPICS_HOST_ARCH ]; then
rm $AREA_DETECTOR/configure/RELEASE.local.$EPICS_HOST_ARCH
fi
echo EPICS_BASE=$EPICS_BASE > $AREA_DETECTOR/configure/RELEASE.local

# Hack RELEASE_LIBS file
sed -i -e "/^SUPPORT\s*=/ s,=.*,=$SUPPORT," $AREA_DETECTOR/configure/RELEASE_LIBS.local
sed -i -e "/^ASYN\s*=/ s,=.*,=$ASYN," $AREA_DETECTOR/configure/RELEASE_LIBS.local
sed -i -e "/^EPICS_BASE\s*=/ s,=.*,=$EPICS_BASE," $AREA_DETECTOR/configure/RELEASE_LIBS.local
sed -i -e "/^AREA_DETECTOR\s*=/ s,=.*,=$AREA_DETECTOR," $AREA_DETECTOR/configure/RELEASE_LIBS.local
sed -i -e "/^ADSUPPORT\s*=/ s,=.*,=$ADSUPPORT," $AREA_DETECTOR/configure/RELEASE_LIBS.local
sed -i -e "/^ADCORE\s*=/ s,=.*,=$ADCORE," $AREA_DETECTOR/configure/RELEASE_LIBS.local

# Hack RELEASE_PRODS file
sed -i -e "/^SUPPORT\s*=/ s,=.*,=$SUPPORT," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^CALC\s*=/ s,=.*,=$CALC," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^BUSY\s*=/ s,=.*,=$BUSY," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^SSCAN\s*=/ s,=.*,=$SSCAN," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^AUTOSAVE\s*=/ s,=.*,=$AUTOSAVE," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^SNCSEQ\s*=/ s,=.*,=$SNCSEQ," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^EPICS_BASE\s*=/ s,=.*,=$EPICS_BASE," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^ASYN\s*=/ s,=.*,=$ASYN," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^AREA_DETECTOR\s*=/ s,=.*,=$AREA_DETECTOR," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^ADSUPPORT\s*=/ s,=.*,=$ADSUPPORT," $AREA_DETECTOR/configure/RELEASE_PRODS.local
sed -i -e "/^ADCORE\s*=/ s,=.*,=$ADCORE," $AREA_DETECTOR/configure/RELEASE_PRODS.local

# Don't think we need this.
sed -i "s/DEVIOCSTATS/#DEVIOCSTATS/g" $AREA_DETECTOR/configure/RELEASE_PRODS.local

# These are example plugin files, but we will just use them
if [ ! -f $ADCORE/iocBoot/commonPlugins.cmd ]; then
cp $ADCORE/iocBoot/EXAMPLE_commonPlugins.cmd $ADCORE/iocBoot/commonPlugins.cmd
fi

# Hack commonPlugins.cmd - we need sseq_settings.req, which is in the calc module
sed -i "s/#set_requestfile_path(\"\$(CALC)\/calcApp\/Db\")/set_requestfile_path(\"\$(CALC)\/calcApp\/Db\")/" $ADCORE/iocBoot/commonPlugins.cmd
if [ ! -f $ADCORE/iocBoot/commonPlugin_settings.req ]; then
cp $ADCORE/iocBoot/EXAMPLE_commonPlugin_settings.req $ADCORE/iocBoot/commonPlugin_settings.req
fi
24 changes: 24 additions & 0 deletions .ci-local/stable.set
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MODULES=calc asyn autosave busy stream area_Detector ADSupport ADCore princetonspectro

BASE=R7.0.6.1
CALC=R3-7-4
ASYN=R4-41
AUTOSAVE=R5-7-1
BUSY=R1-7-1
STREAM=2.8.22

AREA_DETECTOR=R3-11
AREA_DETECTOR_REPOURL=https://github.com/areaDetector/areaDetector
AREA_DETECTOR_RECURSIVE=NO
AREA_DETECTOR_HOOK=.ci-local/area_detector_hook.sh
ADSUPPORT=master
ADSUPPORT_REPOURL=https://github.com/pheest/ADSupport
ADSUPPORT_RECURSIVE=NO
ADSUPPORT_HOOK=.ci-local/adsupport_hook.sh
ADCORE=master
ADCORE_REPOURL=https://github.com/pheest/ADCore
ADCORE_RECURSIVE=NO
ADCORE_HOOK=.ci-local/adcore_hook.sh
PRINCETONSPECTRO=master
PRINCETONSPECTRO_REPOURL=https://github.com/ukaea/PrincetonSpectro
PRINCETONSPECTRO_RECURSIVE=NO
Loading