Skip to content

Commit

Permalink
Merge pull request #671 from lukemartinlogan/dev
Browse files Browse the repository at this point in the history
Update actions to be ubuntu22
  • Loading branch information
lukemartinlogan authored Feb 8, 2024
2 parents 8e09fc9 + 94a0cb0 commit ec7cb5b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build_and_push_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build and Push Docker Images
on:
push:
workflow_dispatch:
branches:
- master
- main
- dev
inputs:
# build_docker_images:
# description: 'If ''true'', force a build of the docker images and push them to dockerhub'
Expand Down
8 changes: 5 additions & 3 deletions ci/build_hermes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# ARGS:
# SPACK_DIR: the path to spack

# Ensure environment modules are loaded
. /hermes/ci/module_load.sh

# THIS SCRIPT IS EXECUTED BY CONTAINER!!!
set -x
set -e
Expand All @@ -21,7 +24,6 @@ pip install -e . -r requirements.txt
popd

# Load scspkg environment
. /module_load.sh
module use "$(scspkg module dir)"

# Load hermes_shm
Expand Down Expand Up @@ -61,7 +63,7 @@ cmake ../ \
-DHERMES_ENABLE_STDIO_ADAPTER=ON \
-DHERMES_ENABLE_POSIX_ADAPTER=ON \
-DHERMES_ENABLE_COVERAGE=ON
make -j8
make -j4
make install

# Test Hermes
Expand All @@ -73,4 +75,4 @@ cd /hermes/test/unit/external
mkdir build
cd build
cmake ../
make -j8
make -j4
16 changes: 7 additions & 9 deletions ci/module_load.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/bash
if ! shopt -q login_shell; then
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
fi
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
fi
8 changes: 5 additions & 3 deletions docker/deps.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# NOTE(llogan): This dockerfile assumes that
# hermes github is mounted on /hermes

# Install ubuntu 22.04
FROM ubuntu:22.04
LABEL maintainer="[email protected]"
Expand Down Expand Up @@ -35,10 +38,9 @@ ENV SPACK_DIR="${HOME}/spack"
ENV SPACK_VERSION="v0.20.2"
ENV HERMES_DEPS_DIR="${HOME}/hermes_deps"
ENV HERMES_DIR="${HOME}/hermes"
COPY ci/module_load.sh /module_load.sh

# Install Spack
RUN . /module_load.sh && \
RUN . /hermes/ci/module_load.sh && \
git clone -b ${SPACK_VERSION} https://github.com/spack/spack ${SPACK_DIR} && \
. "${SPACK_DIR}/share/spack/setup-env.sh" && \
git clone -b dev https://github.com/lukemartinlogan/hermes.git ${HERMES_DEPS_DIR} && \
Expand All @@ -48,7 +50,7 @@ RUN . /module_load.sh && \
spack external find

# Install hermes_shm
RUN . /module_load.sh && \
RUN . /hermes/ci/module_load.sh && \
. "${SPACK_DIR}/share/spack/setup-env.sh" && \
spack external find && \
spack install hermes_shm@master+vfd+mpiio^[email protected]
Expand Down

0 comments on commit ec7cb5b

Please sign in to comment.