From e5f92835eec55431d11d5c2db52c52f9887747cc Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Wed, 18 Oct 2023 16:21:19 +0100 Subject: [PATCH 01/27] ioc-pmac building under new framework --- .devcontainer/.bashrc | 84 +++++++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 75 +++++++++++++++++++++++++++++ .devcontainer/initializeCommand | 15 ++++++ .devcontainer/postCreateCommand | 30 ++++++++++++ Dockerfile | 16 +++++-- build | 3 +- ibek-support | 1 + 7 files changed, 218 insertions(+), 6 deletions(-) create mode 100644 .devcontainer/.bashrc create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/initializeCommand create mode 100644 .devcontainer/postCreateCommand create mode 160000 ibek-support diff --git a/.devcontainer/.bashrc b/.devcontainer/.bashrc new file mode 100644 index 0000000..1a3a80e --- /dev/null +++ b/.devcontainer/.bashrc @@ -0,0 +1,84 @@ +################################################################################ +# epics-containers developer shell configuration. +# This is a standard ubuntu .bashrc plus a PS1 prompt with container name +# and a call to .bashrc_dev_container in the user's home directory on the +# host machine. +################################################################################ + +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# don't put duplicate lines in the history. See bash(1) for more options +# ... or force ignoredups and ignorespace +HISTCONTROL=ignoredups:ignorespace + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +function parse_git_branch { + git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' +} + +# make a useful prompt, including current container name +EC_PROJECT=${EC_PROJECT:-container} +PS1="\[\e[32m\]\$(parse_git_branch)\[\e[m\][\[\e[34m\]\[\e[m\]\W]\$ " +export PS1="[\[\e[31m\]${EC_PROJECT#'ioc-'}\[\e[m\]]${PS1}" + +# ibek cli completion +source <(ibek --show-completion bash) + +# add user's custom .bashrc_dev_container +if [ -f ~/.bashrc_dev_container ]; then + . ~/.bashrc_dev_container +fi + + + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..54278ae --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,75 @@ +// For format details, see https://containers.dev/implementors/json_reference/ +{ + "name": "epics-containers IOC devcontainer", + "build": { + "dockerfile": "../Dockerfile", + "target": "developer", + "args": { + "TARGET_ARCHITECTURE": "linux" + } + }, + "remoteEnv": { + // allows X11 apps to run inside the container + "DISPLAY": "${localEnv:DISPLAY}", + // provides a name for epics-containers to use in bash prompt etc. + "EC_PROJECT": "${localWorkspaceFolderBasename}" + }, + "features": { + // adds standard common-utils features - see + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": false, + "installOhMyZsh": false, + "installOhMyZshConfig": false, + "upgradePackages": false + } + }, + // IMPORTANT for this devcontainer to work with docker EC_REMOTE_USER must be + // set to vscode. For podman it should be left blank. + "remoteUser": "${localEnv:EC_REMOTE_USER}", + "customizations": { + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-python.vscode-pylance", + "tamasfe.even-better-toml", + "redhat.vscode-yaml", + "ryanluker.vscode-coverage-gutters", + "epicsdeb.vscode-epics", + "ms-python.black-formatter" + ] + }, + "settings": { + // global python venv created in epics-base + "python.defaultInterpreterPath": "/venv/bin/python" + } + }, + // 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 + "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 + "postCreateCommand": "bash .devcontainer/postCreateCommand ${devcontainerId}", + "runArgs": [ + // Allow the container to access the host X11 display and EPICS CA + "--net=host", + // Make sure SELinux does not disable with access to host filesystems like tmp + "--security-opt=label=disable" + ], + "workspaceMount": "source=${localWorkspaceFolder},target=/epics/${localWorkspaceFolderBasename},type=bind", + "workspaceFolder": "/epics/${localWorkspaceFolderBasename}", + "mounts": [ + // Mount some useful local files from the user's home directory + // By mounting the parent of the workspace we can work on multiple peer projects + "source=${localWorkspaceFolder}/../,target=/repos,type=bind", + // this provides eternal bash history in and out of the container + "source=${localEnv:HOME}/.bash_eternal_history,target=/root/.bash_eternal_history,type=bind", + // this bashrc hooks up the .bashrc_dev_container in the following mount + "source=${localWorkspaceFolder}/.devcontainer/.bashrc,target=/root/.bashrc,type=bind", + // provides a place for you to put your shell customizations for all your dev containers + "source=${localEnv:HOME}/.bashrc_dev_container,target=/root/.bashrc_dev_container,type=bind", + // provides a place to install any packages you want to have across all your dev containers + "source=${localEnv:HOME}/.bashprofile_dev_container,target=/root/.bashprofile_dev_container,type=bind", + // provides the same command line editing experience as your host + "source=${localEnv:HOME}/.inputrc,target=/root/.inputrc,type=bind" + ] +} \ No newline at end of file diff --git a/.devcontainer/initializeCommand b/.devcontainer/initializeCommand new file mode 100644 index 0000000..4f32aa2 --- /dev/null +++ b/.devcontainer/initializeCommand @@ -0,0 +1,15 @@ +#!/bin/bash + +# make sure all the files we mount into the container exist +for i in \ + .bash_eternal_history \ + .bashrc_dev_container \ + .bashprofile_dev_container \ + .inputrc + do + if [ ! -f $HOME/$i ] ; then + touch $HOME/$i; + fi +done + +echo "devcontainerID ${1}" diff --git a/.devcontainer/postCreateCommand b/.devcontainer/postCreateCommand new file mode 100644 index 0000000..2beb11a --- /dev/null +++ b/.devcontainer/postCreateCommand @@ -0,0 +1,30 @@ +#!/bin/bash + +################################################################################ +# When using docker we will not be root inside the container +# the following steps are then required +################################################################################ + +if [[ $USER != "root" ]] ; then + # make sure the non-root user can build iocs and (mounted in) support modules + sudo chown -R ${USER}:${USER} /epics/links + sudo chown -h ${USER}:${USER} /epics /epics/ioc + + # also give non-root user access to the same bash config we use in podman + sudo chmod a+rx /root + for f in .inputrc .bash_eternal_history .bashrc .bashrc_dev_container; do + sudo chmod a+rw /root/$f + ln -sf /root/$f $HOME/$f + done +fi + +################################################################################ +# Custom install script for each developer to add whatever they like to +# all epics-containers devcontainers +################################################################################ + + +# add user's custom profile container creation script +if [ -f ~/.bashprofile_dev_container ]; then + . ~/.bashprofile_dev_container +fi diff --git a/Dockerfile b/Dockerfile index 1d986cc..4c60599 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN pip install --upgrade ibek==1.4.0 # The devcontainer mounts the project root to /epics/ioc-adsimdetector. Using # the same location here makes devcontainer/runtime differences transparent. -WORKDIR /epics/ioc-adsimdetector/ibek-support +WORKDIR /epics/ioc-pmac/ibek-support # copy the global ibek files COPY ibek-support/_global/ _global @@ -28,11 +28,17 @@ RUN autosave/install.sh R5-10-2 COPY ibek-support/busy/ busy/ RUN busy/install.sh R1-7-3 -COPY ibek-support/ADCore/ ADCore/ -RUN ADCore/install.sh R3-12-1 +COPY ibek-support/sscan/ sscan/ +RUN sscan/install.sh R2-11-6 -COPY ibek-support/ADSimDetector/ ADSimDetector/ -RUN ADSimDetector/install.sh R2-10 +COPY ibek-support/calc/ calc/ +RUN calc/install.sh R3-7-5 + +COPY ibek-support/motor/ motor/ +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 RUN ibek ioc build diff --git a/build b/build index 6a5e635..5a50578 100755 --- a/build +++ b/build @@ -6,6 +6,7 @@ # pass rtems as first argument to build RTEMS on cross-compiler TARGET_ARCHITECTURE=${1:-linux} +shift set -xe @@ -15,7 +16,7 @@ cd $(dirname ${0}) git submodule update --init # build runtime and developer images -ec dev build --arch ${TARGET_ARCHITECTURE} +ec dev build --arch ${TARGET_ARCHITECTURE} "${@}" # get the schema file from the developer container and save it locally ec dev launch-local --execute \ diff --git a/ibek-support b/ibek-support new file mode 160000 index 0000000..1d5bbc8 --- /dev/null +++ b/ibek-support @@ -0,0 +1 @@ +Subproject commit 1d5bbc8ae0506c7461475b0f5e8aaf322871c595 From 9f2011b1e13f6d2e2494aba4012082bcef81ca83 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Thu, 19 Oct 2023 07:25:34 +0100 Subject: [PATCH 02/27] fix CI --- .github/workflows/build.sh | 1 + .github/workflows/{buiild.yml => build.yml} | 42 +++++++++++++++------ ibek-support | 2 +- requirements.txt | 2 + 4 files changed, 34 insertions(+), 13 deletions(-) rename .github/workflows/{buiild.yml => build.yml} (60%) create mode 100644 requirements.txt diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 964fc4f..3db0354 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -43,5 +43,6 @@ ec dev launch-local ${EC_TAG} --execute \ # run acceptance tests shopt -s nullglob # expand to nothing if no tests are found +ls -l ${THIS}/../../tests for t in "${THIS}/../../tests/*.sh"; do ${t}; done diff --git a/.github/workflows/buiild.yml b/.github/workflows/build.yml similarity index 60% rename from .github/workflows/buiild.yml rename to .github/workflows/build.yml index edc4c81..4d85407 100644 --- a/.github/workflows/buiild.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,6 @@ jobs: build-push-images: # 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 - runs-on: ubuntu-latest permissions: contents: read packages: write @@ -17,9 +16,12 @@ jobs: strategy: fail-fast: false matrix: - # TODO add rtems - architecture: ["linux"] + include: + - architecture: linux + os: ubuntu-latest + platform: linux/amd64 + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 @@ -41,25 +43,41 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Docker Build Script env: - REGISTRY: ghcr.io ARCH: ${{ matrix.architecture }} - REPOSITORY: ${{ github.repository }} + PLATFORM: ${{ matrix.platform }} TAG: ${{ github.ref_name }} PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }} CACHE: ${{ env.CACHE }} run: .github/workflows/build.sh - tests: - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + - name: Upload schema as artifact + uses: actions/upload-artifact@v3 + with: + name: ioc-schema + path: ibek.ioc.schema.json + + release: + # Release on tag push - publish ioc schema + needs: [build-push-images] + if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 with: - submodules: recursive + name: ioc-schema + path: ./ - - name: System Test - run: tests/run-tests.sh + - name: Github Release + uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 + with: + files: | + ibek.ioc.schema.json + generate_release_notes: true diff --git a/ibek-support b/ibek-support index 1d5bbc8..9272b54 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit 1d5bbc8ae0506c7461475b0f5e8aaf322871c595 +Subproject commit 9272b54090ce883719654460891be0fcb1091113 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e5d1202 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# TODO using dev for the moment. Should be a pin to the current release +git+https://github.com/epics-containers/epics-containers-cli.git@dev From 8b7d2904104df81b507b0218d8694601138d9d59 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Thu, 19 Oct 2023 13:53:55 +0000 Subject: [PATCH 03/27] allow write to venv for docker users --- .devcontainer/postCreateCommand | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/postCreateCommand b/.devcontainer/postCreateCommand index 2beb11a..df4587c 100644 --- a/.devcontainer/postCreateCommand +++ b/.devcontainer/postCreateCommand @@ -7,7 +7,7 @@ if [[ $USER != "root" ]] ; then # make sure the non-root user can build iocs and (mounted in) support modules - sudo chown -R ${USER}:${USER} /epics/links + sudo chown -R ${USER}:${USER} /epics/links /venv sudo chown -h ${USER}:${USER} /epics /epics/ioc # also give non-root user access to the same bash config we use in podman From 69cd6d7c8e3c5c438988b0352b2d9944469cc560 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Sat, 21 Oct 2023 18:45:45 +0100 Subject: [PATCH 04/27] allow the venv to be writeable for docker users --- .devcontainer/postCreateCommand | 2 +- .github/workflows/build.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.devcontainer/postCreateCommand b/.devcontainer/postCreateCommand index 2beb11a..df4587c 100644 --- a/.devcontainer/postCreateCommand +++ b/.devcontainer/postCreateCommand @@ -7,7 +7,7 @@ if [[ $USER != "root" ]] ; then # make sure the non-root user can build iocs and (mounted in) support modules - sudo chown -R ${USER}:${USER} /epics/links + sudo chown -R ${USER}:${USER} /epics/links /venv sudo chown -h ${USER}:${USER} /epics /epics/ioc # also give non-root user access to the same bash config we use in podman diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 3db0354..964fc4f 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -43,6 +43,5 @@ ec dev launch-local ${EC_TAG} --execute \ # run acceptance tests shopt -s nullglob # expand to nothing if no tests are found -ls -l ${THIS}/../../tests for t in "${THIS}/../../tests/*.sh"; do ${t}; done From c07c4de59c139ff6ff1f6010a3d3f42781fc998a Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 6 Nov 2023 18:13:08 +0000 Subject: [PATCH 05/27] remove redundant vscode interpreter path --- .devcontainer/devcontainer.json | 4 ---- .gitlab-ci.yml | 20 ++++++++++---------- .vscode/settings.json | 3 --- 3 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 54278ae..e8cd576 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -37,10 +37,6 @@ "epicsdeb.vscode-epics", "ms-python.black-formatter" ] - }, - "settings": { - // global python venv created in epics-base - "python.defaultInterpreterPath": "/venv/bin/python" } }, // Make sure the files we are mapping into the container exist on the host diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 304f5e0..a1ca5a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,14 +32,14 @@ build_linux_developer: ARCH: linux TARGET: developer -build_rtems_runtime: - extends: .build - variables: - ARCH: rtems - TARGET: runtime +# build_rtems_runtime: +# extends: .build +# variables: +# ARCH: rtems +# TARGET: runtime -build_rtems_developer: - extends: .build - variables: - ARCH: rtems - TARGET: developer +# build_rtems_developer: +# extends: .build +# variables: +# ARCH: rtems +# TARGET: developer diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 4c0c5da..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "python.defaultInterpreterPath": "/venv/bin/python" -} \ No newline at end of file From 0a3113740abc04af541e17d29c5379c30bc34045 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 6 Nov 2023 18:13:08 +0000 Subject: [PATCH 06/27] remove redundant vscode interpreter path --- .devcontainer/devcontainer.json | 4 ---- .gitlab-ci.yml | 20 ++++++++++---------- .vscode/settings.json | 3 --- 3 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 54278ae..e8cd576 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -37,10 +37,6 @@ "epicsdeb.vscode-epics", "ms-python.black-formatter" ] - }, - "settings": { - // global python venv created in epics-base - "python.defaultInterpreterPath": "/venv/bin/python" } }, // Make sure the files we are mapping into the container exist on the host diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 304f5e0..a1ca5a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,14 +32,14 @@ build_linux_developer: ARCH: linux TARGET: developer -build_rtems_runtime: - extends: .build - variables: - ARCH: rtems - TARGET: runtime +# build_rtems_runtime: +# extends: .build +# variables: +# ARCH: rtems +# TARGET: runtime -build_rtems_developer: - extends: .build - variables: - ARCH: rtems - TARGET: developer +# build_rtems_developer: +# extends: .build +# variables: +# ARCH: rtems +# TARGET: developer diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 4c0c5da..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "python.defaultInterpreterPath": "/venv/bin/python" -} \ No newline at end of file From a1f625d9bcf83a2374e8ac322a52fa29579726ee Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Wed, 8 Nov 2023 13:36:45 +0000 Subject: [PATCH 07/27] update to latest ioc-template --- .devcontainer/devcontainer.json | 1 - .github/workflows/build.sh | 5 ++--- .gitlab-ci.yml | 8 +++++--- build | 5 ++--- requirements.txt | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e8cd576..d4ccac8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,6 @@ "EC_PROJECT": "${localWorkspaceFolderBasename}" }, "features": { - // adds standard common-utils features - see "ghcr.io/devcontainers/features/common-utils:2": { "installZsh": false, "installOhMyZsh": false, diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 964fc4f..090e4d8 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -15,7 +15,6 @@ export EC_TAG="--tag ${TAG:-latest}" export EC_PLATFORM="--platform ${PLATFORM:-linux/amd64}" export EC_CACHE="${CACHE:-/tmp/ec-cache}" -export EC_DEBUG=true if [[ "${PUSH}" == 'true' ]] ; then EC_PUSH='--push' ; fi THIS=$(dirname ${0}) @@ -35,11 +34,11 @@ export EC_CARGS=" # ec dev build --arch rtems ... for RTEMS cross compile # build runtime and developer images -ec dev build --buildx ${EC_TAG} ${EC_PLATFORM} ${EC_PUSH} ${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/links/ibek/*.ibek.support.yaml' > ibek.ioc.schema.json +'ibek ioc generate-schema /epics/ibek/*.ibek.support.yaml' > ibek.ioc.schema.json # run acceptance tests shopt -s nullglob # expand to nothing if no tests are found diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1ca5a6..c793e00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,9 +16,11 @@ stages: - env | grep "CI_" - /bin/sh .gitlab/kanikobuild.sh - echo "Done!" - only: - refs: - - tags + # uncomment to only publish on tags. At present untagged builds are published + # to gcr.io/diamond-privreg/controls/work/ioc + # only: + # refs: + # - tags build_linux_runtime: extends: .build diff --git a/build b/build index 5a50578..b96d509 100755 --- a/build +++ b/build @@ -6,7 +6,6 @@ # pass rtems as first argument to build RTEMS on cross-compiler TARGET_ARCHITECTURE=${1:-linux} -shift set -xe @@ -16,10 +15,10 @@ cd $(dirname ${0}) git submodule update --init # build runtime and developer images -ec dev build --arch ${TARGET_ARCHITECTURE} "${@}" +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/links/ibek/*.ibek.support.yaml' \ +'ibek ioc generate-schema /epics/ibek/*.ibek.support.yaml' \ > ibek.ioc.schema.json diff --git a/requirements.txt b/requirements.txt index e5d1202..6343875 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -# TODO using dev for the moment. Should be a pin to the current release -git+https://github.com/epics-containers/epics-containers-cli.git@dev +epics-containers-cli==2.6.3 +#git+https://github.com/epics-containers/epics-containers-cli.git@dev From f097b49fa67199ad7e975dcd232123dc9b8922e3 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Wed, 8 Nov 2023 13:38:21 +0000 Subject: [PATCH 08/27] update to latest ioc-template --- Dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c60599..80c289f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,16 @@ +##### build stage ############################################################## + ARG TARGET_ARCHITECTURE ARG BASE=7.0.7ec2 ARG REGISTRY=ghcr.io/epics-containers -##### build stage ############################################################## - FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer -# Get latest ibek while in development. Will come from epics-base in future. -RUN pip install --upgrade ibek==1.4.0 +# 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-adsimdetector. Using -# the same location here makes devcontainer/runtime differences transparent. -WORKDIR /epics/ioc-pmac/ibek-support +# the devcontainer mounts the project root to /epics/ioc-template +WORKDIR /epics/ioc-template/ibek-support # copy the global ibek files COPY ibek-support/_global/ _global @@ -62,4 +61,4 @@ RUN ibek support apt-install --runtime ENV TARGET_ARCHITECTURE ${TARGET_ARCHITECTURE} -ENTRYPOINT ["/bin/bash", "-c", "${IOC}/start.sh"] \ No newline at end of file +ENTRYPOINT ["/bin/bash", "-c", "${IOC}/start.sh"] From 0733cb22ba517866c1a4e2811f1ce2a6c41f9d4a Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 20 Nov 2023 07:57:30 +0000 Subject: [PATCH 09/27] update to latest dependencies --- .github/workflows/build.sh | 7 +++---- Dockerfile | 17 +++++++++++------ README.md | 8 +++++++- build | 7 ++----- ibek-support | 2 +- requirements.txt | 5 +++-- requirements_ec.txt | 3 +++ 7 files changed, 30 insertions(+), 19 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..57475f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,13 @@ 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,10 @@ 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/ADAravis/ ADAravis/ +RUN ADAravis/install.sh R2-3 + +# 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..cf52a39 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit 9272b54090ce883719654460891be0fcb1091113 +Subproject commit cf52a39c8a0f6d3b5d590ea911b8e7870306834d diff --git a/requirements.txt b/requirements.txt index 6343875..cea131a 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.0 +# 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 From f3f67dfc9aa8e4a62d12a64d51b40ac508e3da7f Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 27 Nov 2023 09:57:39 +0000 Subject: [PATCH 10/27] update to epics-base 7.0.7ec3 --- Dockerfile | 9 +-------- ibek-support | 2 +- requirements.txt | 3 --- 3 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index 57475f4..4a481ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ ##### 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 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-adsimdetector. Using # the same location here makes devcontainer/runtime differences transparent. WORKDIR /epics/ioc-pmac/ibek-support @@ -41,9 +37,6 @@ RUN motor/install.sh R7-2-3b1 COPY ibek-support/pmac/ pmac/ RUN pmac/install.sh 2-4-10 -COPY ibek-support/ADAravis/ ADAravis/ -RUN ADAravis/install.sh R2-3 - # create IOC source tree, generate Makefile and compile IOC Instance RUN ibek ioc build diff --git a/ibek-support b/ibek-support index cf52a39..eb79846 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit cf52a39c8a0f6d3b5d590ea911b8e7870306834d +Subproject commit eb79846664378c9c2382a90952b8b16b43818d17 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index cea131a..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -ibek==1.5.0 -# to install direct from github during development in the dev branch: -#git+https://github.com/epics-containers/ibek.git@dev From 86a02a1eb74cb975210dd6c28a1f5c9560099bbd Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Tue, 28 Nov 2023 14:42:33 +0000 Subject: [PATCH 11/27] update to UPSTREAM motor --- Dockerfile | 2 +- ibek-support | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a481ac..5c87054 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ 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 diff --git a/ibek-support b/ibek-support index eb79846..c39e3bd 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit eb79846664378c9c2382a90952b8b16b43818d17 +Subproject commit c39e3bd3ddb9f13910f50e86480ffc5ce7ef127c From 7f42d812d42ba5e1891d90af2b874223a830eecc Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Fri, 1 Dec 2023 12:19:34 +0000 Subject: [PATCH 12/27] update to latest pmac / ibek-support --- Dockerfile | 2 +- ibek-support | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5c87054..9166f1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ COPY ibek-support/motor/ motor/ RUN motor/install.sh R7-3-1 COPY ibek-support/pmac/ pmac/ -RUN pmac/install.sh 2-4-10 +RUN pmac/install.sh 2-6-2b1 # create IOC source tree, generate Makefile and compile IOC Instance RUN ibek ioc build diff --git a/ibek-support b/ibek-support index c39e3bd..12c19bb 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit c39e3bd3ddb9f13910f50e86480ffc5ce7ef127c +Subproject commit 12c19bb3b34fa858bf8781a72cfb78ae1455ec94 From a3500765fd7313057b976dd4e07e314c76b8e156 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Fri, 1 Dec 2023 13:36:43 +0000 Subject: [PATCH 13/27] upgrade to ibek 1.5.3 --- Dockerfile | 4 ++++ requirements.txt | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index 9166f1a..e9ed9d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ ARG REGISTRY=ghcr.io/epics-containers FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer +# 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-adsimdetector. Using # the same location here makes devcontainer/runtime differences transparent. WORKDIR /epics/ioc-pmac/ibek-support diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a34e873 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +ibek==1.5.3 +# to install direct from github during development in the dev branch: +#git+https://github.com/epics-containers/ibek.git@dev From f1528dbac338b6f0132ede50ffd83eba705809c6 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Fri, 1 Dec 2023 15:41:06 +0000 Subject: [PATCH 14/27] update to ibek-support --- ibek-support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibek-support b/ibek-support index 12c19bb..93063ed 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit 12c19bb3b34fa858bf8781a72cfb78ae1455ec94 +Subproject commit 93063edf3635ad344ea05fe09214eb3512726e7a From e584d07d055b80a886b50ead76a5dd52abcc08e3 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Wed, 8 Nov 2023 14:15:00 +0000 Subject: [PATCH 15/27] update to latest ioc-template (#1) * update to latest ioc-template --- Dockerfile | 6 ++++++ ibek-support | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e9ed9d2..aca70cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,12 @@ RUN sscan/install.sh R2-11-6 COPY ibek-support/calc/ calc/ RUN calc/install.sh R3-7-5 +COPY ibek-support/motor/ motor/ +RUN motor/install.sh R7-2-3b1 + +COPY ibek-support/pmac/ pmac/ +RUN pmac/install.sh 2-4-10 + COPY ibek-support/motor/ motor/ RUN motor/install.sh R7-3-1 diff --git a/ibek-support b/ibek-support index 93063ed..cbdcca5 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit 93063edf3635ad344ea05fe09214eb3512726e7a +Subproject commit cbdcca543517c9b70701d1d9fe42a3d345cfe79f From e7559903de83854f69f9ce3111fcfaad653441b6 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Wed, 18 Oct 2023 16:21:19 +0100 Subject: [PATCH 16/27] ioc-pmac building under new framework --- .devcontainer/devcontainer.json | 5 +++++ Dockerfile | 5 +++-- build | 3 ++- ibek-support | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d4ccac8..54278ae 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,6 +15,7 @@ "EC_PROJECT": "${localWorkspaceFolderBasename}" }, "features": { + // adds standard common-utils features - see "ghcr.io/devcontainers/features/common-utils:2": { "installZsh": false, "installOhMyZsh": false, @@ -36,6 +37,10 @@ "epicsdeb.vscode-epics", "ms-python.black-formatter" ] + }, + "settings": { + // global python venv created in epics-base + "python.defaultInterpreterPath": "/venv/bin/python" } }, // Make sure the files we are mapping into the container exist on the host diff --git a/Dockerfile b/Dockerfile index 80c289f..3ad4801 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,9 @@ FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS develop # 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-pmac/ibek-support # copy the global ibek files COPY ibek-support/_global/ _global diff --git a/build b/build index b96d509..89f1581 100755 --- a/build +++ b/build @@ -6,6 +6,7 @@ # pass rtems as first argument to build RTEMS on cross-compiler TARGET_ARCHITECTURE=${1:-linux} +shift set -xe @@ -15,7 +16,7 @@ cd $(dirname ${0}) git submodule update --init # build runtime and developer images -ec dev build --arch ${TARGET_ARCHITECTURE} +ec dev build --arch ${TARGET_ARCHITECTURE} "${@}" # get the schema file from the developer container and save it locally ec dev launch-local --execute \ 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 From 17bc8094f7b73f94595cb4bdcbaed6d914ce2316 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Thu, 19 Oct 2023 07:25:34 +0100 Subject: [PATCH 17/27] fix CI --- .github/workflows/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 090e4d8..eb6661e 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -42,5 +42,6 @@ ec dev launch-local ${EC_TAG} --execute \ # run acceptance tests shopt -s nullglob # expand to nothing if no tests are found +ls -l ${THIS}/../../tests for t in "${THIS}/../../tests/*.sh"; do ${t}; done From 7aab40fc02e617ffccd46d9679570821a8ab423b Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Sat, 21 Oct 2023 18:45:45 +0100 Subject: [PATCH 18/27] allow the venv to be writeable for docker users --- .github/workflows/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index eb6661e..090e4d8 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -42,6 +42,5 @@ ec dev launch-local ${EC_TAG} --execute \ # run acceptance tests shopt -s nullglob # expand to nothing if no tests are found -ls -l ${THIS}/../../tests for t in "${THIS}/../../tests/*.sh"; do ${t}; done From 835d85969cfa8ec54996a7e2d531d56e1c4f1747 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 6 Nov 2023 18:13:08 +0000 Subject: [PATCH 19/27] remove redundant vscode interpreter path --- .devcontainer/devcontainer.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 54278ae..e8cd576 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -37,10 +37,6 @@ "epicsdeb.vscode-epics", "ms-python.black-formatter" ] - }, - "settings": { - // global python venv created in epics-base - "python.defaultInterpreterPath": "/venv/bin/python" } }, // Make sure the files we are mapping into the container exist on the host From 870073232a7f089a3883210cd10b27881d1ac855 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Wed, 8 Nov 2023 13:36:45 +0000 Subject: [PATCH 20/27] update to latest ioc-template --- .devcontainer/devcontainer.json | 1 - build | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e8cd576..d4ccac8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,6 @@ "EC_PROJECT": "${localWorkspaceFolderBasename}" }, "features": { - // adds standard common-utils features - see "ghcr.io/devcontainers/features/common-utils:2": { "installZsh": false, "installOhMyZsh": false, diff --git a/build b/build index 89f1581..b96d509 100755 --- a/build +++ b/build @@ -6,7 +6,6 @@ # pass rtems as first argument to build RTEMS on cross-compiler TARGET_ARCHITECTURE=${1:-linux} -shift set -xe @@ -16,7 +15,7 @@ cd $(dirname ${0}) git submodule update --init # build runtime and developer images -ec dev build --arch ${TARGET_ARCHITECTURE} "${@}" +ec dev build --arch ${TARGET_ARCHITECTURE} # get the schema file from the developer container and save it locally ec dev launch-local --execute \ From f1079815f7082881d93fe027f034432f674fb9f4 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Wed, 8 Nov 2023 13:38:21 +0000 Subject: [PATCH 21/27] update to latest ioc-template --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ad4801..80c289f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,8 @@ FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS develop # 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-adsimdetector. Using -# the same location here makes devcontainer/runtime differences transparent. -WORKDIR /epics/ioc-pmac/ibek-support +# the devcontainer mounts the project root to /epics/ioc-template +WORKDIR /epics/ioc-template/ibek-support # copy the global ibek files COPY ibek-support/_global/ _global From c901ed0f33412cd90dceb19334fbddeb612f9a46 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 20 Nov 2023 07:57:30 +0000 Subject: [PATCH 22/27] update to latest dependencies --- .github/workflows/build.sh | 7 +++---- Dockerfile | 17 +++++++++++------ README.md | 8 +++++++- build | 7 ++----- requirements.txt | 5 +++-- requirements_ec.txt | 3 +++ 6 files changed, 29 insertions(+), 18 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..57475f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,13 @@ 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,10 @@ 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/ADAravis/ ADAravis/ +RUN ADAravis/install.sh R2-3 + +# 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/requirements.txt b/requirements.txt index 6343875..cea131a 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.0 +# 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 From 7bbcba33568013298d50174d3b7bccb63e2c4bcb Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 27 Nov 2023 09:57:39 +0000 Subject: [PATCH 23/27] update to epics-base 7.0.7ec3 --- Dockerfile | 9 +-------- requirements.txt | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index 57475f4..4a481ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ ##### 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 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-adsimdetector. Using # the same location here makes devcontainer/runtime differences transparent. WORKDIR /epics/ioc-pmac/ibek-support @@ -41,9 +37,6 @@ RUN motor/install.sh R7-2-3b1 COPY ibek-support/pmac/ pmac/ RUN pmac/install.sh 2-4-10 -COPY ibek-support/ADAravis/ ADAravis/ -RUN ADAravis/install.sh R2-3 - # create IOC source tree, generate Makefile and compile IOC Instance RUN ibek ioc build diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index cea131a..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -ibek==1.5.0 -# to install direct from github during development in the dev branch: -#git+https://github.com/epics-containers/ibek.git@dev From 006992c182c1dd548cac4b4d79533212b3f90a63 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Tue, 28 Nov 2023 14:42:33 +0000 Subject: [PATCH 24/27] update to UPSTREAM motor --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4a481ac..5c87054 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ 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 From 766988fa5bfd2fc6d7695b2ffd64621963e634cf Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Fri, 1 Dec 2023 12:19:34 +0000 Subject: [PATCH 25/27] update to latest pmac / ibek-support --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5c87054..9166f1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ COPY ibek-support/motor/ motor/ RUN motor/install.sh R7-3-1 COPY ibek-support/pmac/ pmac/ -RUN pmac/install.sh 2-4-10 +RUN pmac/install.sh 2-6-2b1 # create IOC source tree, generate Makefile and compile IOC Instance RUN ibek ioc build From fec15f3d10dd74022c5cb4d24895dbc121287345 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Fri, 1 Dec 2023 13:36:43 +0000 Subject: [PATCH 26/27] upgrade to ibek 1.5.3 --- Dockerfile | 4 ++++ requirements.txt | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index 9166f1a..e9ed9d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ ARG REGISTRY=ghcr.io/epics-containers FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer +# 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-adsimdetector. Using # the same location here makes devcontainer/runtime differences transparent. WORKDIR /epics/ioc-pmac/ibek-support diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a34e873 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +ibek==1.5.3 +# to install direct from github during development in the dev branch: +#git+https://github.com/epics-containers/ibek.git@dev From d7deacaeff37ed5c2cd84133dfc85172cd0506fa Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Wed, 8 Nov 2023 14:15:00 +0000 Subject: [PATCH 27/27] update to latest ioc-template (#1) * update to latest ioc-template --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index e9ed9d2..aca70cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,12 @@ RUN sscan/install.sh R2-11-6 COPY ibek-support/calc/ calc/ RUN calc/install.sh R3-7-5 +COPY ibek-support/motor/ motor/ +RUN motor/install.sh R7-2-3b1 + +COPY ibek-support/pmac/ pmac/ +RUN pmac/install.sh 2-4-10 + COPY ibek-support/motor/ motor/ RUN motor/install.sh R7-3-1