Run Github CI tests. #606
Workflow file for this run
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: Run Github CI tests. | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Build and test | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
compiler: | |
- gcc | |
test: [0,1,2,3,4,5] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
export BLUE="\033[34;1m" | |
mkdir -p installDir | |
printf "${BLUE} PG; Installing gcc via apt\n" | |
sudo apt-get update | |
sudo apt-get install build-essential software-properties-common -y | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
sudo apt-get update | |
sudo apt-get install gcc g++ -y | |
export CXX="g++" | |
export CC="gcc" | |
printf "${BLUE} PG; Done installing gcc via apt\n" | |
printf "${BLUE} PG; Installing gfortran via apt\n" | |
sudo apt-get install gfortran -y | |
printf "${BLUE} PG; Done installing gfortran via apt\n" | |
printf "${BLUE} PG; Installing openmpi\n" | |
sudo apt-get install openmpi-bin libopenmpi-dev | |
printf "${BLUE} PG; Done installing openmpi\n" | |
printf "${BLUE} PG; Installing metis\n" | |
sudo apt-get install libmetis-dev libparmetis-dev | |
printf "${BLUE} PG; Done installing metis\n" | |
printf "${BLUE} PG; Installing OpenBLAS from apt\n" | |
sudo apt-get install libopenblas-openmp-dev | |
printf "${BLUE} PG; Done installing OpenBLAS from apt\n" | |
printf "${BLUE} PG; Installing ScaLAPACK from apt\n" | |
sudo apt-get install libscalapack-mpi-dev | |
printf "${BLUE} PG; Done installing ScaLAPACK from apt\n" | |
- name: Install package | |
run: | | |
export BLUE="\033[34;1m" | |
printf "${BLUE} PG; Installing STRUMPACK from source\n" | |
cd $GITHUB_WORKSPACE | |
rm -rf build | |
mkdir -p build | |
mkdir -p install | |
cd build | |
export CRAYPE_LINK_TYPE=dynamic | |
cmake .. \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DCMAKE_C_COMPILER=mpicc \ | |
-DCMAKE_CXX_COMPILER=mpic++ \ | |
-DCMAKE_Fortran_COMPILER=mpif90 \ | |
-DCMAKE_INSTALL_PREFIX=../install \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF | |
make | |
make install | |
make examples | |
printf "${BLUE} PG; Done installing STRUMPACK from source\n" | |
cd ../ | |
export STRUMPACK_DIR=`pwd`/install | |
cd test/build_external/ | |
mkdir -p build | |
cd build | |
cmake ../ | |
make | |
- name: Test | |
run: | | |
cd $GITHUB_WORKSPACE | |
export TEST_NUMBER=${{ matrix.test }} | |
sh ./.ci_tests.sh | |
- name: External build | |
run: | | |
cd $GITHUB_WORKSPACE | |
export STRUMPACK_DIR=`pwd`/install | |
cd test/build_external/ | |
mkdir -p build | |
cd build | |
cmake ../ | |
make |