Use correct branch name #204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ubuntu | |
on: [push] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
apt update | |
apt install -y wget gpg build-essential cmake pipx flex bison gfortran pkg-config libfftw3-dev | |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | 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" | tee /etc/apt/sources.list.d/oneAPI.list | |
apt update | |
apt install -y intel-oneapi-mkl intel-oneapi-mkl-devel python3-dev python3-pip python3-venv python3-virtualenv git | |
pipx install lit | |
pipx ensurepath | |
echo "/github/home/.local/bin" >> $GITHUB_PATH | |
- name: Cache PETSc | |
id: cache-petsc | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/petsc | |
key: ${{runner.os}}-petsc | |
- name: Build PETSc | |
if: steps.cache-petsc.outputs.cache-hit != 'true' | |
run: | | |
git clone --depth 1 --branch v3.21.5 https://gitlab.com/petsc/petsc.git petsc | |
cd petsc | |
./configure --with-debugging=no --download-mpich --with-fortran-bindings=0 --with-blas-lapack-dir=/opt/intel/oneapi/mkl/latest/lib --with-mkl_cpardiso --with-mkl_pardiso --download-scalapack --download-triangle --download-ctetgen --download-parmetis --download-metis --download-mmg --download-ptscotch COPTFLAGS="-O3 -march=native" CXXOPTFLAGS="-O3 -march=native" | |
make PETSC_DIR=${GITHUB_WORKSPACE}/petsc PETSC_ARCH=arch-linux-c-opt all | |
- name: Build ParMGMC | |
run: | | |
mkdir build && cd build | |
cmake .. -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/petsc/arch-linux-c-opt/bin/mpicc -DCMAKE_CXX_COMPILER=${GITHUB_WORKSPACE}/petsc/arch-linux-c-opt/bin/mpic++ -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/petsc/arch-linux-c-opt -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install | |
make | |
- name: Install ParMGMC | |
run: | | |
cd ${GITHUB_WORKSPACE}/build | |
make install | |
- name: Configure tests | |
run: | | |
cd ${GITHUB_WORKSPACE}/examples | |
mkdir build && cd build | |
cmake .. -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/petsc/arch-linux-c-opt;${GITHUB_WORKSPACE}/install" | |
- name: Run sequential tests | |
run: | | |
cd ${GITHUB_WORKSPACE}/examples/build | |
make check-seq | |
- name: Run parallel tests | |
run: | | |
cd ${GITHUB_WORKSPACE}/examples/build | |
export LD_PRELOAD=/opt/intel/oneapi/mkl/latest/lib/libmkl_blacs_intelmpi_lp64.so | |
make check-par |