Skip to content

Commit

Permalink
Separate pimega build from area_detector.
Browse files Browse the repository at this point in the history
Pimega build is something that we will probably do frequently here
and throwing away the areadetector build cache to rebuild pimega is
time consuming.

Maybe this could be done for all modules? Particularly for me, pimega
is enough, but standardization is never bad.
  • Loading branch information
MarcoMontevechi committed Nov 17, 2023
1 parent 7aaf29d commit f1a6468
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
5 changes: 4 additions & 1 deletion base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ COPY lnls-get-n-unpack.sh /usr/local/bin/lnls-get-n-unpack
ARG LIBPIMEGA_VERSION

RUN lnls-get-n-unpack -r \
http://gca-jobs:1234/packages/libpimega_${LIBPIMEGA_VERSION}_amd64.tar.gz
http://10.30.1.74/packages/libpimega_${LIBPIMEGA_VERSION}_amd64.tar.gz

ARG EPICS_BASE_VERSION
ENV EPICS_BASE_PATH /opt/epics/base
Expand Down Expand Up @@ -63,5 +63,8 @@ COPY nanohttp_stream.patch .
COPY install_area_detector.sh .
RUN ./install_area_detector.sh

COPY install_pimega.sh .
RUN ./install_pimega.sh

COPY install_motor.sh .
RUN ./install_motor.sh
29 changes: 0 additions & 29 deletions base/install_area_detector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,32 +99,3 @@ git apply --directory ADSupport ${EPICS_MODULES_PATH}/nanohttp_stream.patch
make -j${JOBS}
make clean

cd ..

git clone --depth 1 --branch ${LIBSSCPIMEGA_VERSION} \
https://github.com/cnpem/ssc-pimega

make -C ssc-pimega/c install

install_github_module cnpem NDSSCPimega NDSSCPIMEGA $NDSSCPIMEGA_VERSION "
EPICS_BASE = ${EPICS_BASE_PATH}
ASYN=${EPICS_MODULES_PATH}/asyn
AREA_DETECTOR=${EPICS_MODULES_PATH}/areaDetector
ADCORE=${EPICS_MODULES_PATH}/areaDetector/ADCore
"

cd areaDetector

lnls-get-n-unpack -l http://gca-jobs:1234/packages/ad-pimega_${ADPIMEGA_VERSION}.tar.gz

echo "
EPICS_BASE=${EPICS_BASE_PATH}
" > ADPimega/configure/RELEASE.local

echo "ADPIMEGA=${EPICS_MODULES_PATH}/areaDetector/ADPimega" >> $EPICS_RELEASE_FILE

echo "BUILD_IOCS=YES" >> configure/CONFIG_SITE
cp $EPICS_RELEASE_FILE ADPimega/iocs/pimegaIOC/configure/RELEASE

make -C ADPimega
35 changes: 35 additions & 0 deletions base/install_pimega.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

set -ex

. /opt/epics/install-functions.sh

cd /opt/epics/modules

git clone --depth 1 --branch ${LIBSSCPIMEGA_VERSION} \
https://github.com/cnpem/ssc-pimega

make -C ssc-pimega/c install

install_github_module cnpem NDSSCPimega NDSSCPIMEGA $NDSSCPIMEGA_VERSION "
EPICS_BASE = ${EPICS_BASE_PATH}
ASYN=${EPICS_MODULES_PATH}/asyn
AREA_DETECTOR=${EPICS_MODULES_PATH}/areaDetector
ADCORE=${EPICS_MODULES_PATH}/areaDetector/ADCore
"

cd areaDetector

lnls-get-n-unpack -l http://10.30.1.74/packages/ad-pimega_${ADPIMEGA_VERSION}.tar.gz

echo "
EPICS_BASE=${EPICS_BASE_PATH}
" > ADPimega/configure/RELEASE.local

echo "ADPIMEGA=${EPICS_MODULES_PATH}/areaDetector/ADPimega" >> $EPICS_RELEASE_FILE

echo "BUILD_IOCS=YES" >> configure/CONFIG_SITE
cp $EPICS_RELEASE_FILE ADPimega/iocs/pimegaIOC/configure/RELEASE

make -C ADPimega

0 comments on commit f1a6468

Please sign in to comment.