Skip to content

Commit

Permalink
make pmac support up to date with new style framework (#7)
Browse files Browse the repository at this point in the history
* ioc-pmac building under new framework

* fix CI

* allow write to venv for docker users

* allow the venv to be writeable for docker users

* remove redundant vscode interpreter path

* remove redundant vscode interpreter path

* update to latest ioc-template

* update to latest ioc-template

* update to latest dependencies

* update to epics-base 7.0.7ec3

* update to UPSTREAM motor

* update to latest pmac / ibek-support

* upgrade to ibek 1.5.3

* update to ibek-support

* update to latest ioc-template (#1)

* update to latest ioc-template

* ioc-pmac building under new framework

* fix CI

* allow the venv to be writeable for docker users

* remove redundant vscode interpreter path

* update to latest ioc-template

* update to latest ioc-template

* update to latest dependencies

* update to epics-base 7.0.7ec3

* update to UPSTREAM motor

* update to latest pmac / ibek-support

* upgrade to ibek 1.5.3

* update to latest ioc-template (#1)

* update to latest ioc-template
  • Loading branch information
gilesknap authored Dec 15, 2023
1 parent 4e729a7 commit 7f103ad
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 20 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ if [[ "${PUSH}" == 'true' ]] ; then EC_PUSH='--push' ; fi

THIS=$(dirname ${0})
set -xe
mkdir -p ${CACHE}
mkdir -p ${EC_CACHE}

# get the current version of ec CLI
pip install -r ${THIS}/../../requirements.txt
pip install -r ${THIS}/../../requirements_ec.txt

# add cache arguments - local file cache passed by github seems to be most reliable
export EC_CARGS="
Expand All @@ -37,8 +37,7 @@ export EC_CARGS="
ec -v dev build ${EC_TAG} ${EC_PLATFORM} ${EC_PUSH} ${EC_CARGS}

# extract the ioc schema from the runtime image
ec dev launch-local ${EC_TAG} --execute \
'ibek ioc generate-schema /epics/ibek/*.ibek.support.yaml' > ibek.ioc.schema.json
ec dev launch-local ${EC_TAG} --execute 'ibek ioc generate-schema' > ibek.ioc.schema.json

# run acceptance tests
shopt -s nullglob # expand to nothing if no tests are found
Expand Down
22 changes: 15 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
##### build stage ##############################################################

ARG TARGET_ARCHITECTURE
ARG BASE=7.0.7ec2
ARG BASE=7.0.7ec3
ARG REGISTRY=ghcr.io/epics-containers

FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer

# get latest ibek while under dev. In future the epics-base version will be used
RUN pip install --upgrade ibek==1.4.2
# Get latest ibek while in development. Will come from epics-base when stable
COPY requirements.txt requirements.txt
RUN pip install --upgrade -r requirements.txt

# the devcontainer mounts the project root to /epics/ioc-template
WORKDIR /epics/ioc-template/ibek-support
# The devcontainer mounts the project root to /epics/ioc-adsimdetector. Using
# the same location here makes devcontainer/runtime differences transparent.
WORKDIR /epics/ioc-pmac/ibek-support

# copy the global ibek files
COPY ibek-support/_global/ _global
Expand All @@ -22,7 +24,7 @@ COPY ibek-support/asyn/ asyn/
RUN asyn/install.sh R4-42

COPY ibek-support/autosave/ autosave/
RUN autosave/install.sh R5-10-2
RUN autosave/install.sh R5-11

COPY ibek-support/busy/ busy/
RUN busy/install.sh R1-7-3
Expand All @@ -39,7 +41,13 @@ RUN motor/install.sh R7-2-3b1
COPY ibek-support/pmac/ pmac/
RUN pmac/install.sh 2-4-10

# Generate template IOC source tree / generate Makefile / compile
COPY ibek-support/motor/ motor/
RUN motor/install.sh R7-3-1

COPY ibek-support/pmac/ pmac/
RUN pmac/install.sh 2-6-2b1

# create IOC source tree, generate Makefile and compile IOC Instance
RUN ibek ioc build

##### runtime preparation stage ################################################
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
A container image for a generic IOC to support delta tau motion controllers.
An epics-containers generic IOC source file for Delta Tau pmac motion controllers.

Generates a Generic IOC for running in a container and
creating IOC instances to control pmac motion controllers.

See the https://epics-containers.github.io

7 changes: 2 additions & 5 deletions build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

################################################################################
# generic local build script for epics-containers ioc repositories #
# generic local build script for epics-containers ioc repositories #
################################################################################

# pass rtems as first argument to build RTEMS on cross-compiler
Expand All @@ -18,7 +18,4 @@ git submodule update --init
ec dev build --arch ${TARGET_ARCHITECTURE}

# get the schema file from the developer container and save it locally
ec dev launch-local --execute \
'ibek ioc generate-schema /epics/ibek/*.ibek.support.yaml' \
> ibek.ioc.schema.json

ec dev launch-local --execute 'ibek ioc generate-schema' > ibek.ioc.schema.json
2 changes: 1 addition & 1 deletion ibek-support
Submodule ibek-support updated 50 files
+30 −16 ADAravis/ADAravis.ibek.support.yaml
+99 −0 ADAravis/arvFeature.pvi.device.yaml
+4 −5 ADAravis/install.sh
+441 −264 ADCore/ADCore.ibek.support.yaml
+300 −0 ADCore/ADDriver.pvi.device.yaml
+787 −0 ADCore/NDFileHDF5.pvi.device.yaml
+176 −0 ADCore/NDPluginDriver.pvi.device.yaml
+4 −0 ADCore/NDPluginFile.pvi.device.yaml
+336 −0 ADCore/NDPluginProcess.pvi.device.yaml
+14 −0 ADCore/NDPluginPva.pvi.device.yaml
+270 −0 ADCore/NDPluginROI.pvi.device.yaml
+579 −0 ADCore/NDPluginStats.pvi.device.yaml
+468 −0 ADCore/asynNDArrayDriver.pvi.device.yaml
+4 −1 ADCore/install.sh
+5,205 −0 ADGenICam/ADGenICam.pvi.device.yaml
+1,347 −0 ADGenICam/GenICamFeature.pvi.device.yaml
+26 −0 ADGenICam/install.sh
+5 −1 ADSimDetector/ADSimDetector.ibek.support.yaml
+1 −1 ADSimDetector/install.sh
+297 −0 ADSimDetector/simDetector.pvi.device.yaml
+2 −2 _global/epics.ibek.support.yaml
+450 −456 asyn/asyn.ibek.support.yaml
+1 −1 asyn/install.sh
+84 −86 autosave/autosave.ibek.support.yaml
+1 −1 autosave/install.sh
+22 −4 build_support.sh
+1 −1 busy/install.sh
+1 −1 calc/install.sh
+1 −1 iocStats/install.sh
+1 −1 iocStats/iocStats.ibek.support.yaml
+1 −1 make_global_schemas.sh
+2 −3 motor/install.sh
+469 −487 motor/motor.ibek.support.yaml
+27 −0 motorMotorSim/install.sh
+123 −0 motorMotorSim/motorMotorSim.ibek.support.yaml
+1 −1 pmac/install.sh
+2,243 −0 pmac/pmac.ibek.support.todo
+1,107 −3,748 pmac/pmac.ibek.support.yaml
+83 −0 pvi-generate.sh
+1 −1 sscan/install.sh
+2 −2 tests/Dockerfile.adsimdetector
+2 −2 tests/Dockerfile.asyn
+2 −2 tests/Dockerfile.busy
+9 −14 tests/_test_support_build.sh
+1 −9 tests/ioc.yaml
+0 −27 tests/ioc_instance/ioc.db
+0 −20 tests/ioc_instance/st.cmd
+5 −3 tests/test_ioc_generate.sh
+0 −23 tests/test_ioc_instance.sh
+247 −250 zebra/zebra.ibek.support.yaml
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
epics-containers-cli==2.6.3
#git+https://github.com/epics-containers/epics-containers-cli.git@dev
ibek==1.5.3
# to install direct from github during development in the dev branch:
#git+https://github.com/epics-containers/ibek.git@dev
3 changes: 3 additions & 0 deletions requirements_ec.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
epics-containers-cli==2.6.4
# to install direct from github during development in the dev branch:
#git+https://github.com/epics-containers/epics-containers-cli.git@dev

0 comments on commit 7f103ad

Please sign in to comment.