From 7f103ad195aecd1f483434edf16fda7971621210 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Fri, 15 Dec 2023 14:16:39 +0000 Subject: [PATCH] make pmac support up to date with new style framework (#7) * 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 --- .github/workflows/build.sh | 7 +++---- Dockerfile | 22 +++++++++++++++------- README.md | 8 +++++++- build | 7 ++----- ibek-support | 2 +- requirements.txt | 5 +++-- requirements_ec.txt | 3 +++ 7 files changed, 34 insertions(+), 20 deletions(-) create mode 100644 requirements_ec.txt diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 090e4d8..412a0e9 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -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=" @@ -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 diff --git a/Dockerfile b/Dockerfile index 80c289f..aca70cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 @@ -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 ################################################ diff --git a/README.md b/README.md index 79220df..3530e3c 100644 --- a/README.md +++ b/README.md @@ -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 + diff --git a/build b/build index b96d509..ca9d319 100755 --- a/build +++ b/build @@ -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 @@ -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 diff --git a/ibek-support b/ibek-support index 9272b54..cbdcca5 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit 9272b54090ce883719654460891be0fcb1091113 +Subproject commit cbdcca543517c9b70701d1d9fe42a3d345cfe79f diff --git a/requirements.txt b/requirements.txt index 6343875..a34e873 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/requirements_ec.txt b/requirements_ec.txt new file mode 100644 index 0000000..ac3632c --- /dev/null +++ b/requirements_ec.txt @@ -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