Added workflow for the Red Hat Linux #2
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 CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
compiler: [gcc-11, gcc-12, gcc-13, gcc-14, clang-8, clang-9] | |
build_type: [Release, Debug] | |
technology: [OpenMP, MPI, HDF5] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake build-essential libboost-all-dev libhdf5-dev libgmp-dev libtbb-dev | |
if [[ "${{ matrix.compiler }}" == gcc* ]]; then | |
sudo apt-get install -y ${{ matrix.compiler }} ${{ matrix.compiler }}-base; | |
elif [[ "${{ matrix.compiler }}" == clang* ]]; then | |
sudo apt-get install -y ${{ matrix.compiler }}; | |
fi | |
if [[ "${{ matrix.technology }}" == "MPI" ]]; then | |
sudo apt-get install -y libopenmpi-dev openmpi-bin; | |
fi | |
- name: Configure CMake | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DSTART_OPENMP_ON=${{ matrix.technology == 'OpenMP' }} \ | |
-DSTART_MPI_ON=${{ matrix.technology == 'MPI' }} \ | |
-DHDF5_FOUND=${{ matrix.technology == 'HDF5' }} | |
- name: Build | |
run: | | |
cd build | |
make -j$(nproc) | |
- name: Run Tests | |
run: | | |
cd build | |
ctest --output-on-failure |