Skip to content

Commit

Permalink
Merge pull request #38 from DUNE/hwallace/feature/ubuntu_container
Browse files Browse the repository at this point in the history
Feat: Update workflows to build on ubuntu
  • Loading branch information
pjdunne authored Jan 27, 2025
2 parents 3534f31 + 6a706f7 commit 2baa089
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/CDImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
- os: alma9
file: doc/MaCh3DockerFiles/Alma9/Dockerfile
tag_latest: alma9latest
- os: Ubuntu22.04
file: doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile
tag: ubuntulatest


name: Image CD ${{ matrix.os }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/CIBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: Build CI
# The events that trigger the workflow
on:
pull_request:
branches: [ develop ]

branches: [ develop ]
permissions:
contents: read
packages: write
Expand All @@ -22,9 +22,9 @@ jobs:
- os: Alma9
file: doc/MaCh3DockerFiles/Alma9/Dockerfile
tag: alma9latest
# - os: Rocky9
# file: doc/MaCh3DockerFiles/Rocky9/Dockerfile
# tag: rocky9latest
- os: Ubuntu22.04
file: doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile
tag: ubuntulatest

name: Build CI ${{ matrix.os }}

Expand Down
30 changes: 30 additions & 0 deletions doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#To run use: docker build --secret id=tokens,src=tokens.txt -t mach3dune .
FROM rootproject/root:6.32.02-ubuntu22.04 AS mach3_dune_build

RUN apt update && apt upgrade -y
RUN apt-get install -y nlohmann-json3-dev
#MISC_SW
RUN apt install -y --no-install-recommends \
vim less nano gdb csh tcsh ed quota python3 python3-dev python3-pip \
cvs procmail ca-certificates cmake ninja-build


# Declare the build argument
ARG MACH3_DUNE_VERSION
ENV MACH3_DUNE_VERSION=${MACH3_DUNE_VERSION:-develop}

ENV MACH3_DUNE_WORK_DIR=/opt/MaCh3DUNE/
ENV MACH3_DUNE_INSTALL_DIR=${MACH3_DUNE_WORK_DIR}/build


RUN --mount=type=ssh git clone https://github.com/DUNE/MaCh3_DUNE.git ${MACH3_DUNE_WORK_DIR}

WORKDIR ${MACH3_DUNE_WORK_DIR}
RUN git checkout ${MACH3_DUNE_VERSION}

RUN mkdir -p ${MACH3_DUNE_INSTALL_DIR}
WORKDIR ${MACH3_DUNE_INSTALL_DIR}

RUN cmake ../

RUN make -j && make install

0 comments on commit 2baa089

Please sign in to comment.