Skip to content

Commit

Permalink
Merge pull request #3 from epics-containers/ibek-j20-changes
Browse files Browse the repository at this point in the history
Ibek j20 changes
  • Loading branch information
gilesknap authored Sep 22, 2023
2 parents 8772cc3 + 6d885bd commit 41f79af
Show file tree
Hide file tree
Showing 34 changed files with 868 additions and 2,757 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
64 changes: 64 additions & 0 deletions .github/workflows/buiild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Check that ibek-support support modules will build in a container

on:
push:
pull_request:

jobs:
check-docker-build:
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
permissions:
contents: read
packages: write
env:
CACHE: /tmp/.buildx-cache
strategy:
fail-fast: false
matrix:
include:
# rtems is cross compiled on ubuntu-latest
# linux is natively compiled on ubuntu-latest and macos-latest

# enable below for RTEMS
# - architecture: rtems
# os: ubuntu-latest
# platform: linux/amd64

- architecture: linux
os: ubuntu-latest
platform: linux/amd64

# enable below for MACOS native build on M1 macs
# M1 Macs are coming!: https://github.com/github/roadmap/issues/528
# - architecture: linux
# os: macos-latest-x1
# platform: linux/arm64

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
uses: docker-practice/actions-setup-docker@fd7ecdac7caf8e2c541a48c9bcc280aae59a8461

- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Test Build Script
env:
ARCH: ${{ matrix.architecture }}
PLATFORM: ${{ matrix.platform }}
CACHE: ${{ env.CACHE }}
run: |
# ioc folder is found in the super module usually so for testing
# on github we need to copy it above the root of the repo
cp -r ioc ..
tests/_test_support_build.sh
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

80 changes: 67 additions & 13 deletions ADAravis/ADAravis.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,77 @@
echo '
BUILD_IOCS=NO
#!/bin/bash

CROSS_COMPILER_TARGET_ARCHS =
##########################################################################
##### install script for ADAravis support module##########################
##########################################################################

GLIBPREFIX=/usr
# ARGUMENTS:
# $1 VERSION to install (must match repo tag)
VERSION=${1}
NAME=ADAravis

# log output and abort on failure
set -xe

# install required system dependencies
ibek support apt-install --only=dev \
libboost-all-dev \
libxext-dev \
libglib2.0-dev \
libusb-1.0 \
libxml2-dev \
libx11-dev \
meson \
intltool \
pkg-config \
xz-utils

# declare packages for installation in the Dockerfile's runtime stage
ibek support apt-install --only=run libglib2.0-bin libusb-1.0 libxml2

# build aravis library
(
cd /usr/local &&
git clone -b ARAVIS_0_8_1 --depth 1 https://github.com/AravisProject/aravis &&
cd aravis &&
meson build &&
cd build &&
ninja &&
ninja install &&
rm -fr /usr/local/aravis
echo /usr/local/lib64 > /etc/ld.so.conf.d/usr.conf &&
ldconfig
# is this necessary?
pip install telnetlib3
)

# get the source and fix up the configure/RELEASE files
ibek support git-clone ${NAME} ${VERSION}
ibek support register ${NAME}

# declare the libs and DBDs that are required in ioc/iocApp/src/Makefile
ibek support add-libs ADAravis
ibek support add-dbds ADAravisSupport.dbd

# add any required changes to CONFIG_SITE
CONFIG='
AREA_DETECTOR=$(SUPPORT)
CROSS_COMPILER_TARGET_ARCHS =
GLIBPREFIX=/usr
USR_INCLUDES += -I$(GLIBPREFIX)/include/glib-2.0
USR_INCLUDES += -I$(GLIBPREFIX)/lib/x86_64-linux-gnu/glib-2.0/include/
glib-2.0_DIR = $(GLIBPREFIX)/lib/x86_64-linux-gnu
ARAVIS_INCLUDE = /usr/local/include/aravis-0.8/
'

' > configure/CONFIG_SITE.linux-x86_64.Common
ibek support add-to-config-site ${NAME} "${CONFIG}"

echo '
# Generic RELEASE.local file for areadetector modules
# TODO may need
# ioc_SYS_LIBS += aravis-0.8
# in the Makefile

# compile the support module
ibek support compile ${NAME}

# prepare *.bob, *.pvi, *.ibek.support.yaml for access outside the container.
ibek support generate-links ${NAME}

SUPPORT=NotYetSet
AREA_DETECTOR=$(SUPPORT)
include $(SUPPORT)/configure/RELEASE
' > configure/RELEASE.local
42 changes: 0 additions & 42 deletions ADCore/ADCore.sh

This file was deleted.

79 changes: 79 additions & 0 deletions ADCore/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/bin/bash
##########################################################################
##### install script for ADCore support module ###########################
##########################################################################

# ARGUMENTS:
# $1 VERSION to install (must match repo tag)
VERSION=${1}
NAME=ADCore

# log output and abort on failure
set -xe

# install required system dependencies
HDF=http://ftp.de.debian.org/debian/pool/main/h/hdf5
ibek support apt-install --only=dev \
libaec-dev \
libblosc-dev \
libglib2.0-dev \
libjpeg-dev \
libtiff5-dev \
libusb-1.0 \
libxml2-dev \
libx11-dev \
libxext-dev \
libz-dev \
$HDF/libhdf5-103_1.10.4+repack-10_amd64.deb \
$HDF/libhdf5-cpp-103_1.10.4+repack-10_amd64.deb \
$HDF/libhdf5-dev_1.10.4+repack-10_amd64.deb

# declare packages for installation in the Dockerfile's runtime stage
ibek support apt-install --only=run libtiff5 libsz2 libblosc1 libxml2 libhdf5-103-1

# get the source and fix up the configure/RELEASE files
ibek support git-clone ${NAME} ${VERSION} --org http://github.com/areaDetector/
ibek support register ${NAME}

# declare the libs and DBDs that are required in ioc/iocApp/src/Makefile
ibek support add-libs ntndArrayConverter ADBase NDPlugin pvAccessCA \
pvAccessIOC pvAccess
ibek support add-dbds NDPluginPva.dbd ADSupport.dbd NDPluginSupport.dbd \
NDFileNull.dbd NDPosPlugin.dbd NDFileHDF5.dbd NDFileJPEG.dbd NDFileTIFF.dbd \
PVAServerRegister.dbd

# add any required changes to CONFIG_SITE
CONFIG='
AREA_DETECTOR=$(SUPPORT)
CROSS_COMPILER_TARGET_ARCHS =
WITH_GRAPHICSMAGICK = NO
WITH_HDF5 = YES
HDF5_EXTERNAL = YES
HDF5_LIB = /usr/lib/x86_64-linux-gnu/hdf5/serial/
HDF5_INCLUDE = /usr/include/hdf5/serial/
WITH_SZIP = YES
SZIP_EXTERNAL = YES
WITH_JPEG = YES
JPEG_EXTERNAL = YES
WITH_TIFF = YES
TIFF_EXTERNAL = YES
XML2_EXTERNAL = YES
XML2_INCLUDE = /usr/include/libxml2/
WITH_ZLIB = YES
ZLIB_EXTERNAL = YES
WITH_BLOSC = YES
BLOSC_EXTERNAL= YES
WITH_CBF = YES
CBF_EXTERNAL = YES
WITH_PVA = YES
WITH_BOOST = NO
'
ibek support add-to-config-site ${NAME} "${CONFIG}"

# compile the support module
ibek support compile ${NAME}

# prepare *.bob, *.pvi, *.ibek.support.yaml for access outside the container.
ibek support generate-links ${NAME}


27 changes: 27 additions & 0 deletions ADSimDetector/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
##########################################################################
###### install script for ADSimDetector Module ###########################
##########################################################################

# ARGUMENTS:
# $1 VERSION to install (must match repo tag)
VERSION=${1}
NAME=ADSimDetector

# log output and abort on failure
set -xe

# get the source and fix up the configure/RELEASE files
ibek support git-clone ${NAME} ${VERSION} --org http://github.com/areaDetector/
ibek support register ${NAME}

# declare the libs and DBDs that are required in ioc/iocApp/src/Makefile
ibek support add-libs simDetector
ibek support add-dbds simDetectorSupport.dbd

# compile the support module
ibek support compile ${NAME}
# prepare *.bob, *.pvi, *.ibek.support.yaml for access outside the container.
ibek support generate-links ${NAME}


43 changes: 0 additions & 43 deletions ADSimdetector/ADSimdetector.sh

This file was deleted.

Loading

0 comments on commit 41f79af

Please sign in to comment.