Skip to content

Commit

Permalink
Merge pull request #36 from epics-containers/scan-seq
Browse files Browse the repository at this point in the history
Update to template 3.2.1
  • Loading branch information
gilesknap authored Mar 5, 2024
2 parents ff92dff + 94627be commit 3607728
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 3.1.0
_commit: 3.2.1
_src_path: gh:epics-containers/ioc-template
description: The simulation AreaDetector
git_platform: github.com
Expand Down
6 changes: 2 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@
]
}
},
// Make sure the files we are mapping into the container exist on the host
// You can place any other outside of the container before-launch commands here
// You can place any outside of the container before-launch commands here
"initializeCommand": "bash .devcontainer/initializeCommand ${devcontainerId}",
// Hooks the global .bashprofile_dev_container but also can add any other commands
// to run in the container at creation in here
// One time global setup commands inside the container
"postCreateCommand": "bash .devcontainer/postCreateCommand ${devcontainerId}",
"runArgs": [
// Allow the container to access the host X11 display and EPICS CA
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/postCreateCommand
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo 'source <(ibek --show-completion bash)' >> $HOME/.bashrc
echo 'source <(ibek --show-completion zsh)' >> $HOME/.zshrc

# pick a theme that does not cause completion corruption in zsh
sed -i $HOME/.zshrc -e 's/ZSH_THEME="devcontainers"/ZSH_THEME="eastwood"/'
sed -i $HOME/.zshrc -e 's/ZSH_THEME="devcontainers"/ZSH_THEME="dst"/'

# allow personalization of all devcontainers in this subdirectory
# by placing a .devcontainer_rc file in the workspace root
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
packages: write
strategy:
fail-fast: false
max-parallel: 1 # take advantage of caching
matrix:
target: [developer, runtime]
architecture: [linux]
Expand Down Expand Up @@ -53,6 +52,8 @@ jobs:
load: true

- name: Test image
# can't test rtems without some hardware to run on
if: ${{ matrix.architecture != 'rtems' }}
run: tests/run-tests.sh

- name: Push image
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##### build stage ##############################################################

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

FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer
Expand All @@ -22,7 +22,8 @@ WORKDIR ${SOURCE_FOLDER}/ibek-support
COPY ibek-support/_global/ _global

COPY ibek-support/iocStats/ iocStats
RUN iocStats/install.sh 3.1.16
RUN ibek support add-release-macro SNCSEQ && \
iocStats/install.sh 3.2.0

COPY ibek-support/asyn/ asyn/
RUN asyn/install.sh R4-42
Expand All @@ -45,10 +46,9 @@ RUN ADCore/install.sh R3-12-1
COPY ibek-support/ADSimDetector/ ADSimDetector/
RUN ADSimDetector/install.sh R2-10


# get the ioc source and build it
COPY ioc ${SOURCE_FOLDER}/ioc
RUN cd ${IOC} && make
RUN cd ${IOC} && ./install.sh && make

##### runtime preparation stage ################################################

Expand Down
5 changes: 3 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ cd $(dirname ${0})

# use docker if available else use podman
if ! docker version &>/dev/null; then docker=podman; else docker=docker; fi
if $docker buildx version &>/dev/null; then builx=buildx; load=--load; fi

# make sure new repos get their submodule ibek-support
git submodule update --init
if [ ! -d ibek-support ] ; then git submodule update --init ; fi

# build and developer images
$docker build -t ${TAG} --build-arg TARGET_ARCHITECTURE=$T_A --target $TARGET .
$docker build -t ${TAG} --build-arg TARGET_ARCHITECTURE=$T_A $load --target $TARGET .

1 change: 0 additions & 1 deletion ioc/configure/CONFIG_SITE
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# CONFIG_SITE

CROSS_COMPILER_TARGET_ARCHS =
CHECK_RELEASE = NO

12 changes: 12 additions & 0 deletions ioc/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# global install script for support all support modules to reference

x86_cfg='./configure/CONFIG_SITE.Common.linux-x86_64'

# for RTEMS builds don't build for the host architecture, target only
if [[ $TARGET_ARCHITECTURE == "rtems" ]]; then
touch ${x86_cfg}
sed -i '/VALID_BUILDS/d' ${x86_cfg}
echo "VALID_BUILDS=Host" >> ${x86_cfg}
fi
4 changes: 2 additions & 2 deletions ioc/iocApp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ ioc_DBD += $(shell cat /epics/support/configure/dbd_list)

ioc_SRCS += ioc_registerRecordDeviceDriver.cpp

# add in the libs collected by ibek during container build
ioc_LIBS += $(shell cat /epics/support/configure/lib_list)
# add in the libs collected by ibek during container build (in reverse order)
ioc_LIBS += $(shell tac /epics/support/configure/lib_list)

ioc_LIBS += $(EPICS_BASE_IOC_LIBS)
ioc_SRCS += iocMain.cpp
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ibek==1.7.0
# to install direct from github during development in a branch
# git+https://github.com/epics-containers/ibek.git@fix-extract-assets
# git+https://github.com/epics-containers/ibek.git@fix-extract-assets

0 comments on commit 3607728

Please sign in to comment.