Skip to content

Commit

Permalink
Merge pull request #332 from JeffersonLab/rasool_gluex_ci
Browse files Browse the repository at this point in the history
Add GitHub Action for Automated JANA2 Build Against halld_recon
  • Loading branch information
nathanwbrei authored Aug 7, 2024
2 parents ffd66f7 + 889facb commit 90e9cd8
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/halld_recon_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

echo "mounting cvmfs"
yum -y install fuse
chmod 666 /dev/fuse
mkdir -p /cvmfs/oasis.opensciencegrid.org
mount -t cvmfs oasis.opensciencegrid.org /cvmfs/oasis.opensciencegrid.org

cd /workspace/halld_recon
ln -s /cvmfs/oasis.opensciencegrid.org/gluex/group /group
export BUILD_SCRIPTS=/group/halld/Software/build_scripts
source $BUILD_SCRIPTS/gluex_env_boot_jlab.sh --bs $BUILD_SCRIPTS
gxenv /workspace/JANA2/.github/halld_recon_build_prereqs_version.xml

echo "rootsys"
echo $ROOTSYS
chmod +x $JANA_HOME/bin/*
cd src
scons install -j12
16 changes: 16 additions & 0 deletions .github/halld_recon_build_prereqs_version.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://halldweb.jlab.org/halld_versions/version7.xsl"?>
<gversions file="version_5.12.0.xml" date="2023-10-13">
<description>Update to amptools, gluex_root_analysis, halld_recont, halld_sim, hdgeant4, hd_utilities</description>
<package name="ccdb" version="1.06.11"/>
<package name="cernlib" version="2005" word_length="64-bit"/>
<package name="evio" version="4.4.6"/>
<package name="hddm" version="4.31.0"/>
<package name="hdds" version="4.15.0"/>
<package name="jana" version="2.1.2" home="/workspace/JANA2/"/>
<package name="rcdb" version="0.07.01"/>
<package name="root" version="6.24.04"/>
<package name="sqlitecpp" version="3.1.1"/>
<package name="sqlite" version="3.36.0" year="2021"/>
<package name="xerces-c" version="3.2.3"/>
</gversions>
26 changes: 26 additions & 0 deletions .github/jana_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
echo "mounting cvmfs"
yum -y install fuse
chmod 666 /dev/fuse
mkdir -p /cvmfs/oasis.opensciencegrid.org
mount -t cvmfs oasis.opensciencegrid.org /cvmfs/oasis.opensciencegrid.org

export CC=$(which gcc)
export CXX=$(which g++)
export BUILD_SCRIPTS=/cvmfs/oasis.opensciencegrid.org/gluex/group/halld/Software/build_scripts
export PROJECT_ROOT=/workspace
export JANA_HOME=$PROJECT_ROOT/JANA2
export JANA_PLUGIN_PATH=$PROJECT_ROOT/JANA2/plugins

source $BUILD_SCRIPTS/gluex_env_boot_jlab.sh --bs $BUILD_SCRIPTS
gxenv $PROJECT_ROOT/JANA2/.github/jana_prereqs_version.xml

echo "jana_home value: $JANA_HOME"

cd $JANA_HOME
mkdir -p build
cd build

echo "Building start"
cmake3 $JANA_HOME -DUSE_XERCES=1 -DCMAKE_CXX_STANDARD=17
make install -j12
28 changes: 28 additions & 0 deletions .github/jana_prereqs_version.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://halldweb.jlab.org/halld_versions/version7.xsl"?>
<gversions file="version_5.12.0.xml" date="2023-10-13">
<description>Update to amptools, gluex_root_analysis, halld_recont, halld_sim, hdgeant4, hd_utilities</description>
<package name="amptools" version="0.15.1"/>
<package name="ccdb" version="1.06.11"/>
<package name="cernlib" version="2005" word_length="64-bit"/>
<package name="diracxx" version="2.0.2"/>
<package name="evio" version="4.4.6"/>
<package name="evtgen" version="01.07.00"/>
<package name="geant4" version="10.04.p02"/>
<package name="gluex_MCwrapper" version="v2.7.0"/>
<package name="gluex_root_analysis" version="1.25.0"/>
<package name="halld_recon" version="4.42.0"/>
<package name="halld_sim" version="4.46.0"/>
<package name="hdds" version="4.15.0"/>
<package name="hdgeant4" version="2.36.0"/>
<package name="hd_utilities" version="1.46"/>
<package name="hepmc" version="2.06.10"/>
<package name="jana" version="2.1.2" home="/workspace/JANA2/"/>
<package name="lapack" version="3.9.0"/>
<package name="photos" version="3.61"/>
<package name="rcdb" version="0.07.01"/>
<package name="root" version="6.24.04"/>
<package name="sqlitecpp" version="3.1.1"/>
<package name="sqlite" version="3.36.0" year="2021"/>
<package name="xerces-c" version="3.2.3"/>
</gversions>
55 changes: 55 additions & 0 deletions .github/workflows/halld_recon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: halld_recon

on:
push:
branches: [master]
pull_request:
branches: [master]


jobs:
jana2_halld_recon:
name: halld_recon
runs-on: [self-hosted, macOS, ARM64]

steps:
- uses: actions/checkout@v4
with:
path: JANA2

- name: Make Scripts executable
run: |
chmod +x ./JANA2/.github/jana_build.sh
chmod +x ./JANA2/.github/halld_recon_build.sh
- name: Build JANA2 on Alma9
run: |
docker run --rm \
--platform linux/amd64 \
--privileged \
--mount type=bind,source=${{ github.workspace }},target=/workspace \
raiqarasool/gluex_build:cvmfs /bin/bash -c "source /workspace/JANA2/.github/jana_build.sh"
- name: Git Clone Halld_recon
run: |
mkdir halld_recon
cd halld_recon
git clone --branch rasool_jana2 https://github.com/JeffersonLab/halld_recon.git .
- name: Build Halld_recon on Alma9
run: |
docker run --rm \
--platform linux/amd64 \
--privileged \
--mount type=bind,source=${{ github.workspace }},target=/workspace \
raiqarasool/gluex_build:cvmfs /bin/bash -c "source /workspace/JANA2/.github/halld_recon_build.sh"
- name: Cleaning up created folders
if: always()
run: |
rm -rf JANA2
rm -rf halld_recon
69 changes: 69 additions & 0 deletions containers/Docker/gluex.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#
# Dockerfile - docker build script for a standard GlueX sim-recon
# container image based on alma linux 9.
#
# author: richard.t.jones at uconn.edu
# version: october 17 2023
#
# usage: [as root] $ docker build Dockerfile .
#

FROM almalinux:9


# Add JLab CA certificate
ADD http://pki.jlab.org/JLabCA.crt /etc/pki/ca-trust/source/anchors/JLabCA.crt
# Update CA certificates
RUN chmod 644 /etc/pki/ca-trust/source/anchors/JLabCA.crt && update-ca-trust


# install the necessary yum repositories
RUN dnf -y update
RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
RUN grep 'enabled=1' /etc/yum.repos.d/epel.repo
RUN /usr/bin/crb enable
# RUN dnf -y install https://repo.opensciencegrid.org/osg/3.6/osg-3.6-el9-release-latest.rpm
# RUN grep 'enabled=1' /etc/yum.repos.d/osg.repo

# install a few utility rpms
RUN dnf -y install dnf dnf-plugins-core
RUN dnf -y install python-unversioned-command
RUN dnf -y install subversion cmake make imake python3-scons patch git
RUN dnf -y install libtool which bc nano nmap-ncat xterm emacs gdb wget
RUN dnf -y install gcc-c++ gcc-gfortran boost-devel gdb-gdbserver
RUN dnf -y install bind-utils blas blas-devel dump file tcsh expat-devel
RUN dnf -y install libXt-devel openmotif-devel libXpm-devel bzip2-devel
RUN dnf -y install perl-XML-Simple perl-XML-Writer perl-File-Slurp
RUN dnf -y install mesa-libGLU-devel gsl-devel python3-future python3-devel
RUN dnf -y install xrootd-client-libs xrootd-client libXi-devel neon
RUN dnf -y install mariadb mariadb-devel python3-mysqlclient python3-psycopg2
RUN dnf -y install fmt-devel libtirpc-devel atlas rsync vim
RUN dnf -y install gfal2-all gfal2-devel gfal2-plugin-dcap gfal2-plugin-gridftp gfal2-plugin-srm
RUN dnf -y install hdf5 hdf5-devel pakchois perl-Test-Harness sqlite sqlite-devel
RUN dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel java-11-openjdk-devel
RUN dnf -y install java-17-openjdk-devel java-latest-openjdk-devel java-hdf5 java-runtime-decompiler
RUN dnf -y install lapack lapack-devel openmpi openmpi-devel xalan-j2
RUN dnf -y install openssh-server postgresql-server-devel postgresql-upgrade-devel
RUN dnf -y install procps-ng strace ucx valgrind xerces-c xerces-c-devel xerces-c-doc
RUN dnf -y install qt5 qt5-qtx11extras qt5-devel openblas-devel libnsl2-devel


# install the osg worker node client packages
# RUN dnf -y install osg-ca-certs
# RUN dnf -y install osg-wn-client
RUN dnf -y install python3-h5py python3-scipy python3-tqdm

# install some dcache client tools
RUN dnf -y install https://zeus.phys.uconn.edu/halld/gridwork/dcache-srmclient-3.0.11-1.noarch.rpm

#Installing cvmfs
RUN dnf -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm \
&& dnf -y install cvmfs cvmfs-config-default \
&& echo "CVMFS_HTTP_PROXY=DIRECT" | tee -a /etc/cvmfs/default.local \
&& echo "CVMFS_REPOSITORIES=oasis.opensciencegrid.org,singularity.opensciencegrid.org" | tee -a /etc/cvmfs/default.local \
&& echo "CVMFS_CLIENT_PROFILE=single" | tee -a /etc/cvmfs/default.local \
&& dnf clean all

# Fix for Silverblue's toolbox utility
RUN dnf -y install passwd sudo
RUN touch /.dockerenv

0 comments on commit 90e9cd8

Please sign in to comment.