Skip to content

Add IncrediBuild support #309

Add IncrediBuild support

Add IncrediBuild support #309

Workflow file for this run

name: master
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: write
env:
MPI_HOME: ""
jobs:
linux-dev:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [ ubuntu-24.04 ]
build: [ RelWithDebInfo, Debug ]
mpi: [ impi, mpich, openmpi ]
index: [ 'ON', 'OFF' ]
exclude:
- mpi: mpich
index: 'ON'
- mpi: openmpi
index: 'ON'
steps:
- name: Clone
uses: actions/checkout@v6
with:
submodules: recursive
- name: Update
run: |
sudo apt-get update && sudo apt-get install lcov
- name: MKL
if: matrix.mpi == 'impi'
run: |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update && sudo apt-get install intel-oneapi-mkl-devel intel-oneapi-mpi-devel
- name: Compile
run: |
mkdir build && cd build
if [ "${{ matrix.mpi }}" == "impi" ]; then
source /opt/intel/oneapi/setvars.sh
export MPI_HOME=/opt/intel/oneapi/mpi/latest
elif [ "${{ matrix.mpi }}" == "mpich" ]; then
wget -q https://github.com/TLCFEM/prebuilds/releases/download/latest/MPICH-${{ matrix.os }}.tar.gz
tar -xzf MPICH-${{ matrix.os }}.tar.gz
sudo mv MPICH /MPICH
export MPI_HOME=/MPICH
elif [ "${{ matrix.mpi }}" == "openmpi" ]; then
wget -q https://github.com/TLCFEM/prebuilds/releases/download/latest/OpenMPI-${{ matrix.os }}.tar.gz
tar -xzf OpenMPI-${{ matrix.os }}.tar.gz
sudo mv OpenMPI /OpenMPI
export MPI_HOME=/OpenMPI
fi
echo "MPI_HOME=$MPI_HOME" >> "$GITHUB_ENV"
echo $MPI_HOME
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DEZP_TEST=ON -DEZP_STANDALONE=ON -DMPI_HOME=${{ env.MPI_HOME }} -DEZP_USE_64BIT_INT=${{ matrix.index }} ..
cmake --build . --target all
- name: Test
if: matrix.build == 'Debug' && matrix.index == 'OFF'
run: |
if [ "${{ matrix.mpi }}" == "impi" ]; then
source /opt/intel/oneapi/setvars.sh
else
export PATH=${{ env.MPI_HOME }}/bin:$PATH
fi
cd build
for SRC in `find . -type f -executable -iname "*example*"`; do $SRC; done
for SRC in `find . -type f -executable -iname "*test*"`; do $SRC 10; done
mpirun -n 2 ./catch2
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --list coverage.info
- name: Report
if: ${{ hashFiles('./build/coverage.info') != '' }}
uses: codecov/codecov-action@v5
with:
plugins: gcov
files: ./build/coverage.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
documentation:
needs: linux-dev
runs-on: ubuntu-24.04
if: github.event_name == 'push'
steps:
- name: Delete All
uses: strumwolf/delete-deployment-environment@v3
with:
token: ${{ secrets.ALL }}
environment: github-pages
- name: Clone
uses: actions/checkout@v6
- name: Setup
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'
- name: Deploy
run: |
sudo apt-get install doxygen graphviz libmpich-dev
doxygen
cp README.md docs/README.md
pip install -r requirements.txt
mkdocs build
git fetch origin
git config --global user.name "Theodore Chang"
git config --global user.email "tlcfem@gmail.com"
git pull
mkdocs gh-deploy