Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
46f30d1
Swap to Spack and matrix-based GHA for more reliability
Matthew-Whitlock Oct 8, 2024
151eede
Syntax fix
Matthew-Whitlock Oct 8, 2024
ca62216
Add push trigger back
Matthew-Whitlock Oct 8, 2024
a8bf42a
Specify a work directory
Matthew-Whitlock Oct 9, 2024
ac15e69
Actually run the bootstrap container
Matthew-Whitlock Oct 9, 2024
9c20328
Swap driver from docker-container to docker
Matthew-Whitlock Oct 9, 2024
7714f03
Debug output
Matthew-Whitlock Oct 9, 2024
6a44ab4
Manually set volume
Matthew-Whitlock Oct 9, 2024
9c277f0
Use absolute path
Matthew-Whitlock Oct 9, 2024
e24010f
Fix dir name
Matthew-Whitlock Oct 9, 2024
941f185
Have spack find externals before installing MPI
Matthew-Whitlock Oct 9, 2024
0bc06f6
Fix typo
Matthew-Whitlock Oct 9, 2024
4f664ee
Avoid building openssl (2 minutes)
Matthew-Whitlock Oct 9, 2024
9ee9b8a
Try forcing the normal image name
Matthew-Whitlock Oct 9, 2024
0e74855
Retry setting image name
Matthew-Whitlock Oct 9, 2024
141da54
Update ci_checks.yaml
Matthew-Whitlock Oct 9, 2024
8d840fb
Setup image caching
Matthew-Whitlock Oct 9, 2024
352ac38
Update ci_checks.yaml
Matthew-Whitlock Oct 9, 2024
f680e16
Back to docker driver
Matthew-Whitlock Oct 9, 2024
6a75a3f
Update ci_checks.yaml
Matthew-Whitlock Oct 9, 2024
6c7b1b6
Have bootstrap container use same base image as env container
Matthew-Whitlock Oct 10, 2024
33eb607
Use Github's Container Registry (GHCR) to save environment image
Matthew-Whitlock Nov 13, 2024
88f3b58
remove domain from image name
Matthew-Whitlock Nov 13, 2024
96d5f6e
Use single-component names
Matthew-Whitlock Nov 13, 2024
7ea7f8f
Fix setting output twice
Matthew-Whitlock Nov 13, 2024
eb46ba3
Use full url for image name
Matthew-Whitlock Nov 13, 2024
29624b2
Set tag
Matthew-Whitlock Nov 13, 2024
de9bf63
Remove pointless command
Matthew-Whitlock Nov 13, 2024
dbcdf26
Remove one last 'local/'
Matthew-Whitlock Nov 13, 2024
80c08e0
Set docker output for fenix image
Matthew-Whitlock Nov 13, 2024
b7832e4
Add version 5.0.5 test
Matthew-Whitlock Nov 13, 2024
e93ecff
Add timeout to tests
Matthew-Whitlock Nov 13, 2024
a1a3793
Fix arg name format
Matthew-Whitlock Nov 13, 2024
95bca5d
Set specific spack version, swap to ompi versions supported
Matthew-Whitlock Nov 13, 2024
aa7b7e8
Add spack externals command back
Matthew-Whitlock Nov 13, 2024
3429280
Remove unsupported version of MPI for this version of Spack
Matthew-Whitlock Nov 13, 2024
45ddc7c
Continue running other matrix jobs when one fails
Matthew-Whitlock Nov 13, 2024
f04ee7d
Build dependencies instead of apt-installing
Matthew-Whitlock Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/Dockerfile

This file was deleted.

118 changes: 43 additions & 75 deletions .github/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,49 @@
version: "3.9"

x-fenix: &fenix
build: &fenix-build
context: ./
dockerfile: .github/Dockerfile
args:
OPENMPI_REPO: open-mpi/ompi
OPENMPI_VERS_PREFIX: tags
OPENMPI_VERS: v5.0.0rc10
#Caches should be manually scoped, or they'll conflict.
x-bake:
cache-from:
- type=gha,scope=default
cache-to:
- type=gha,scope=default,mode=max

services:
#fenix_ompi_5rc10:
# <<: *fenix
# image: "fenix:ompi_5rc10"
# build:
# <<: *fenix-build
# x-bake:
# cache-from:
# - type=gha,scope=ompi_5rc10
# cache-to:
# - type=gha,scope=ompi_5rc10,mode=max

fenix_ompi_5:
<<: *fenix
image: "fenix:ompi_5"
bootstrap:
image: "bootstrap"
build:
<<: *fenix-build
dockerfile_inline: |
FROM spack/ubuntu-jammy:0.22.2
VOLUME /configs
ARG OMPI_VERSION
ENV OMPI_VERSION=$${OMPI_VERSION}
CMD cp /configs/spack.yaml . && \
spack -e . add openmpi@$${OMPI_VERSION} && \
spack -e . containerize >/configs/spack.Dockerfile
args:
- OPENMPI_VERS_PREFIX=heads
- OPENMPI_VERS=v5.0.x
x-bake:
cache-from:
- type=gha,scope=ompi_5
cache-to:
- type=gha,scope=ompi_5,mode=max

fenix_ompi_main:
<<: *fenix
image: "fenix:ompi_main"
OMPI_VERSION: main
no_cache: true
pull_policy: build
volumes:
- .github/:/configs

env:
image: "ghcr.io/sandialabs/fenix/env:main"
build:
<<: *fenix-build
args:
- OPENMPI_VERS_PREFIX=heads
- OPENMPI_VERS=main
x-bake:
cache-from:
- type=gha,scope=ompi_main
cache-to:
- type=gha,scope=ompi_main,mode=max

fenix_icldisco_latest:
<<: *fenix
image: "fenix:icldisco_latest"
# Generated by running the bootstrap image
dockerfile: .github/spack.Dockerfile

fenix:
image: "fenix"
build:
<<: *fenix-build
dockerfile_inline: |
ARG OMPI_VERSION main
FROM ghcr.io/sandialabs/fenix/env:$${OMPI_VERSION}
COPY . /fenix
RUN . /opt/spack-environment/activate.sh && \
mkdir -p /fenix/build && \
cd /fenix/build && \
cmake /fenix \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=mpicc \
-DFENIX_EXAMPLES=ON \
-DFENIX_TESTS=ON \
-DMPIEXEC_PREFLAGS="--allow-run-as-root;--map-by;:oversubscribe" && \
make -j

WORKDIR /fenix/build
ENTRYPOINT ["/entrypoint.sh"]
CMD ["ctest", "--output-on-failure", "--timeout", "60"]
args:
- OPENMPI_REPO=icldisco/ompi
- OPENMPI_VERS_PREFIX=heads
- OPENMPI_VERS=ulfm/latest
x-bake:
cache-from:
- type=gha,scope=icldisco_latest
cache-to:
- type=gha,scope=icldisco_latest,mode=max

#fenix_icldisco_experimental:
# <<: *fenix
# image: fenix/icldisco
# build:
# <<: *fenix-build
# args:
# - OPENMPI_REPO=icldisco/ompi
# - OPENMPI_VERS_PREFIX=heads
# - OPENMPI_VERS=ulfm/experimental
OMPI_VERSION: main
pull_policy: build
31 changes: 31 additions & 0 deletions .github/spack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
spack:
packages:
openmpi:
variants: +internal-hwloc +internal-libevent +internal-pmix
concretizer:
unify: true
reuse: true

container:
format: docker
strip: false
images:
os: ubuntu:22.04
spack: 0.22.2
os_packages:
build:
- build-essential
- autotools-dev
- pkg-config
- python3
- m4
- autoconf
- automake
- flex
- git
- zlib1g-dev
- libperl-dev
- numactl
final:
- build-essential
- cmake
76 changes: 60 additions & 16 deletions .github/workflows/ci_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,65 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ompi_version:
- main
- 5.0.3

steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/bake-action@master
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to GHCR container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Bake the bootstrap docker image
uses: docker/bake-action@v5
with:
files: |
.github/docker-compose.yml
load: true
- name: Test open-mpi v5.0.x
if: success() || failure()
run: docker run fenix:ompi_5
- name: Test open-mpi main
if: success() || failure()
run: docker run fenix:ompi_main
- name: Test icldisco latest
if: success() || failure()
run: docker run fenix:icldisco_latest
files: .github/docker-compose.yml
targets: bootstrap
workdir: .
set: |
*.output=type=docker,name=bootstrap
*.cache-from=type=gha,scope=bootstrap/${{ matrix.ompi_version }}
*.cache-to=type=gha,mode=max,scope=bootstrap/${{ matrix.ompi_version }}
*.args.OMPI_VERSION=${{ matrix.ompi_version }}

- name: Bootstrap the environment Dockerfile
run: docker run -v ${GITHUB_WORKSPACE}/.github:/configs bootstrap

- name: Build the environment
uses: docker/bake-action@v5
with:
files: .github/docker-compose.yml
targets: env
workdir: .
pull: true
set: |
*.cache-from=type=gha,scope=env/${{ matrix.ompi_version }}
*.cache-to=type=gha,mode=max,scope=env/${{ matrix.ompi_version }}
env.tags=ghcr.io/sandialabs/fenix/env:${{ matrix.ompi_version }}
env.output=type=registry,name=ghcr.io/sandialabs/fenix/env:${{ matrix.ompi_version }}

- name: Build Fenix
uses: docker/bake-action@v5
with:
source: .
files: .github/docker-compose.yml
targets: fenix
workdir: .
set: |
*.output=type=docker,name=fenix
*.args.OMPI_VERSION=${{ matrix.ompi_version }}

- name: Test Fenix
run: docker run fenix
Loading