Skip to content

Fix hypre link & build instructions #48

Fix hypre link & build instructions

Fix hypre link & build instructions #48

Workflow file for this run

name: build-and-test-laghos
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
HYPRE_ARCHIVE: v2.11.2.tar.gz
HYPRE_TOP_DIR: hypre-2.11.2
METIS_ARCHIVE: metis-4.0.3.tar.gz
METIS_TOP_DIR: metis-4.0.3
MFEM_TOP_DIR: mfem
MFEM_BRANCH: master
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
# Checkout Laghos in "laghos" subdirectory. Final path: /home/runner/work/ceed/laghos/laghos
# Note: it must be done now to access "install-hypre", "install-metis" and "install-mfem" actions.
- name: checkout Laghos
uses: actions/checkout@v2
with:
path: laghos
- name: get MPI (Linux)
run: |
sudo apt-get install mpich libmpich-dev
export MAKE_CXX_FLAG="MPICXX=mpic++"
# Get Hypre through cache, or build it.
# Install will only run on cache miss.
- name: cache Hypre
id: hypre-cache
uses: actions/cache@v2
with:
path: ${{ env.HYPRE_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-v2
- name: build Hypre
if: steps.hypre-cache.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-hypre@master
with:
archive: ${{ env.HYPRE_ARCHIVE }}
dir: ${{ env.HYPRE_TOP_DIR }}
# Get Metis through cache, or build it.
# Install will only run on cache miss.
- name: cache Metis
id: metis-cache
uses: actions/cache@v2
with:
path: ${{ env.METIS_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.METIS_TOP_DIR }}-v2
- name: build Metis
if: steps.metis-cache.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-metis@master
with:
archive: ${{ env.METIS_ARCHIVE }}
dir: ${{ env.METIS_TOP_DIR }}
# make generic links to libraries for MFEM install
# Those links are already created by build-mfem action, but not when the cache is used...
- name: configure links
run: |
echo "Hypre symlink:"
ln -s $HYPRE_TOP_DIR hypre;
echo "Metis symlink:"
ln -s $METIS_TOP_DIR metis-4.0;
- name: MFEM ${{ env.MFEM_BRANCH }} commit
run: |
echo "MFEM_COMMIT=$(git ls-remote --heads https://github.com/mfem/mfem.git ${{ env.MFEM_BRANCH }} | awk '{print $1;}')" >> $GITHUB_ENV
# Get MFEM through cache, or build it.
# Install will only run on cache miss.
- name: cache MFEM
id: mfem-cache
uses: actions/cache@v2
with:
path: ${{ env.MFEM_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.MFEM_TOP_DIR }}-${{ env.MFEM_COMMIT }}-v3
- name: build MFEM
if: steps.mfem-cache.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-mfem@master
with:
os: ${{ runner.os }}
hypre-dir: ${{ env.HYPRE_TOP_DIR }}
metis-dir: ${{ env.METIS_TOP_DIR }}
mfem-dir: ${{ env.MFEM_TOP_DIR }}
mfem-branch: ${{ env.MFEM_BRANCH }}
- name: build Laghos
run: |
cd laghos && make -j
- name: check Laghos 1 proc
run: |
cd laghos && make checks ranks=1
- name: check Laghos 2 procs
run: |
cd laghos && make checks ranks=2
- name: test Laghos
run: |
cd laghos && make tests