Skip to content

Commit

Permalink
Add callable workflows for building OpenMPI and MPICH from source (HD…
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored and brtnfld committed Nov 4, 2024
1 parent c0814ca commit 0b7d658
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 38 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/build_mpich_source.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# Build MPICH from source using the latest commit on the
# 'main' branch and cache the results. The result is compressed
# into a 'mpich.tar' archive to preserve permissions and
# then is uploaded as the artifact 'mpich' which can later
# be downloaded with 'actions/download-artifact' and then
# uncompressed with 'tar xvf mpich.tar -C <directory>'
# 'main' branch and cache the results. The result is installed
# to (or restored to) '${{ runner.workspace }}/mpich'.

# Triggers the workflow on a call from another workflow
on:
workflow_call:
inputs:
build_mode:
description: "Release vs. Debug build"
description: "production vs. debug build"
required: true
type: string

Expand Down Expand Up @@ -56,8 +53,8 @@ jobs:

# Enable threads=multiple for testing with Subfiling and
# VOL connectors that require MPI_THREAD_MULTIPLE
- name: Install MPICH (GCC) (Release)
if: ${{ steps.cache-mpich-ubuntu-gcc.outputs.cache-hit != 'true' && (inputs.build_mode == 'Release') }}
- name: Install MPICH (GCC) (Production)
if: ${{ steps.cache-mpich-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode != 'debug') }}
run: |
cd $GITHUB_WORKSPACE/mpich
./autogen.sh
Expand All @@ -71,7 +68,7 @@ jobs:
# Enable threads=multiple for testing with Subfiling and
# VOL connectors that require MPI_THREAD_MULTIPLE
- name: Install MPICH (GCC) (Debug)
if: ${{ steps.cache-mpich-ubuntu-gcc.outputs.cache-hit != 'true' && (inputs.build_mode == 'Debug') }}
if: ${{ steps.cache-mpich-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode == 'debug') }}
run: |
cd $GITHUB_WORKSPACE/mpich
./autogen.sh
Expand All @@ -83,13 +80,3 @@ jobs:
--enable-threads=multiple
make -j2
make install
- name: Tar MPICH installation to preserve permissions for artifact
run: tar -cvf mpich.tar -C ${{ runner.workspace }} mpich

- name: Save MPICH installation artifact
uses: actions/upload-artifact@v4
with:
name: mpich
path: mpich.tar
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
25 changes: 6 additions & 19 deletions .github/workflows/build_openmpi_source.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# Build OpenMPI from source using the latest commit on the
# 'main' branch and cache the results. The result is compressed
# into a 'openmpi.tar' archive to preserve permissions and
# then is uploaded as the artifact 'openmpi' which can later
# be downloaded with 'actions/download-artifact' and then
# uncompressed with 'tar xvf openmpi.tar -C <directory>'
# 'main' branch and cache the results. The result is installed
# to (or restored to) '${{ runner.workspace }}/openmpi'.

# Triggers the workflow on a call from another workflow
on:
workflow_call:
inputs:
build_mode:
description: "Release vs. Debug build"
description: "production vs. debug build"
required: true
type: string

Expand Down Expand Up @@ -54,8 +51,8 @@ jobs:
path: ${{ runner.workspace }}/openmpi
key: ${{ runner.os }}-${{ runner.arch }}-gcc-openmpi-${{ steps.get-sha.outputs.sha }}-${{ inputs.build_mode }}

- name: Install OpenMPI (GCC) (Release)
if: ${{ steps.cache-openmpi-ubuntu-gcc.outputs.cache-hit != 'true' && (inputs.build_mode == 'Release') }}
- name: Install OpenMPI (GCC) (Production)
if: ${{ steps.cache-openmpi-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode != 'debug') }}
run: |
cd $GITHUB_WORKSPACE/ompi
./autogen.pl
Expand All @@ -66,7 +63,7 @@ jobs:
make install
- name: Install OpenMPI (GCC) (Debug)
if: ${{ steps.cache-openmpi-ubuntu-gcc.outputs.cache-hit != 'true' && (inputs.build_mode == 'Debug') }}
if: ${{ steps.cache-openmpi-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode == 'debug') }}
run: |
cd $GITHUB_WORKSPACE/ompi
./autogen.pl
Expand All @@ -76,13 +73,3 @@ jobs:
--enable-debug
make -j2
make install
- name: Tar OpenMPI installation to preserve permissions for artifact
run: tar -cvf openmpi.tar -C ${{ runner.workspace }} openmpi

- name: Save OpenMPI installation artifact
uses: actions/upload-artifact@v4
with:
name: openmpi
path: openmpi.tar
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

0 comments on commit 0b7d658

Please sign in to comment.