Skip to content
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
63 changes: 63 additions & 0 deletions .ci-local/adcore_hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/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

# Hack the make file to allow multiple definition of `_Unwind_Resume on Linux.
# sed -i -e '/^include \$(TOP)\/ADApp\/commonLibraryMakefile/i ifeq (mingw, \$(findstring mingw, \$(T_A)))' $ADCORE/ADApp/pluginSrc/Makefile
# sed -i -e '/^include \$(TOP)\/ADApp\/commonLibraryMakefile/i \ \ USR_LDFLAGS += -Wl,-allow-multiple-definition' $ADCORE/ADApp/pluginSrc/Makefile
# sed -i -e '/^include \$(TOP)\/ADApp\/commonLibraryMakefile/i endif' $ADCORE/ADApp/pluginSrc/Makefile


if [ "$WINE" == "64" ]; then
if [ ! -f /usr/bin/x86_64-w64-mingw32-g++-win32 ]; 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++-win32
elif [ "$WINE" == "32" ]; then
if [ ! -f /usr/bin/i686-w64-mingw32-g++-win32 ]; then
apt-get install -y g++-mingw-w64-i686
fi
update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-win32
fi

33 changes: 33 additions & 0 deletions .ci-local/adsupport_hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/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

29 changes: 29 additions & 0 deletions .ci-local/adurl_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/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 BGFC="default"
export SET="stable"
export CLEAN_DEPS="NO"
export WINE=64
export VV=1
export CLEAN_DEPS="NO"
python .ci/cue.py prepare > /tmp/adurl_install.log 2>&1
python .ci/cue.py build >> /tmp/adurl_install.log 2>&1

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
23 changes: 23 additions & 0 deletions .ci-local/stable.set
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
MODULES=sncseq sscan calc asyn autosave busy area_Detector ADSupport ADCore

BASE=R7.0.6.1
SNCSEQ=R2-2-9
SSCAN=R2-11-5
CALC=R3-7-4
ASYN=R4-41
BUSY=R1-7-1
AUTOSAVE=R5-7-1

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

107 changes: 107 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# .gitlab-ci.yml for testing EPICS Base ci-scripts
# (see: https://github.com/epics-base/ci-scripts)

# This is YAML - indentation levels are crucial

# GitLab runner can use any Docker container, we're using this one
# to be comparable with the other CI services
image: ubuntu:focal

cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .cache/

variables:
DEBIAN_FRONTEND: noninteractive
GIT_SUBMODULE_STRATEGY: "recursive"
SETUP_PATH: ".ci-local:.ci"
BASE_RECURSIVE: "YES"
# Additional packages needed for
# | EPICS |clang| Windows cross builds |RTEMS testing |sequencer
APT: "libreadline6-dev libncurses5-dev perl clang g++-mingw-w64-i686 g++-mingw-w64-x86-64 qemu-system-x86 re2c"
CMP: "gcc"
BGFC: "default"
SET: stable
CLEAN_DEPS: "NO"

# Template for build jobs (hidden)
.build:
stage: build
before_script:
- apt-get update -qq && apt-get install -y -qq build-essential git python curl p7zip-full libgtest-dev libxml2-dev
- python .ci/cue.py prepare
script:
- python .ci/cue.py build
- python .ci/cue.py test
- python .ci/cue.py test-results

# If you need to do more during install and build,
# add a local directory to your module and do e.g.
# - ./.ci-local/travis/install-extras.sh

# Define build jobs

# Well-known variables to use
# SET source setup file
# ADD_MODULES extra modules (for a specific job)
# BCFG build configuration (static/debug/static-debug;
# default: shared-optimized)
# TEST set to NO to skip running the tests (default: YES)
# VV set to make build scripts verbose (default: unset)
# EXTRA content will be added to make command line
# EXTRA1..5 more additional arguments for the make command
# (one argument per variable)

# Usually from setup files, but may be specified or overridden
# on a job line
# MODULES list of dependency modules
# BASE branch or release tag name of the EPICS Base to use
# <MODULE> branch or release tag for a specific module
# ... see README for setup file syntax description

# Different configurations of gcc and clang
gcc_default:
extends: .build
variables:

gcc_static:
extends: .build
variables:
BCFG: "static"

clang_default:
extends: .build
variables:
CMP: "clang"

clang_static_c++11:
extends: .build
variables:
CMP: "clang"
BCFG: "static"
EXTRA: "CMD_CXXFLAGS=-std=c++11"

# Cross-compilations to Windows using gcc/MinGW and WINE
wine32_default:
extends: .build
variables:
WINE: "32"

wine64_default:
extends: .build
variables:
WINE: "64"

wine64_debug:
extends: .build
variables:
WINE: "64"
BCFG: "debug"

wine64_static:
extends: .build
variables:
WINE: "64"
BCFG: "static"

2 changes: 1 addition & 1 deletion iocs/urlIOC/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ADURL=$(TOP)/../..

-include $(TOP)/../../../configure/RELEASE_PRODS_INCLUDE
-include $(TOP)/RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(ADURL)/configure/RELEASE.local
5 changes: 5 additions & 0 deletions urlApp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ ifeq ($(WITH_GRAPHICSMAGICK), YES)
USR_CXXFLAGS_WIN32 += -DWIN32
endif

ifeq (mingw, $(findstring mingw, $(T_A)))
# multiple definition of `_Unwind_Resume on Linux. I don't know how to fix it.
USR_LDFLAGS += -Wl,-allow-multiple-definition
endif

ifeq ($(SHARED_LIBRARIES),YES)
USR_CXXFLAGS_WIN32 += -D_DLL
else
Expand Down