Skip to content

Commit

Permalink
first working version of motorSim Generic IOC
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Nov 29, 2023
1 parent 177fd59 commit 932a8fb
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 23 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
20 changes: 9 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
##### 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

# 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-motorsim/ibek-support

# copy the global ibek files
COPY ibek-support/_global/ _global
Expand All @@ -22,7 +20,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 @@ -34,12 +32,12 @@ COPY ibek-support/calc/ calc/
RUN calc/install.sh R3-7-5

COPY ibek-support/motor/ motor/
RUN motor/install.sh R7-2-3b1
RUN motor/install.sh R7-3-1

COPY ibek-support/pmac/ pmac/
RUN pmac/install.sh 2-4-10
COPY ibek-support/motorMotorSim/ motorMotorSim/
RUN motorMotorSim/install.sh R1-2

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

##### runtime preparation stage ################################################
Expand Down
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
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

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 932a8fb

Please sign in to comment.