Skip to content

Commit

Permalink
Add CI workflows for multiple platforms and configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
ViNN280801 committed Nov 5, 2024
1 parent e7a13e1 commit d3941d3
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CUDA CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
cuda-build-and-test:
runs-on: ubuntu-latest
container:
image: nvidia/cuda:11.4.2-devel-ubuntu20.04

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
apt-get update && apt-get install -y cmake build-essential libboost-all-dev libhdf5-dev libgmp-dev libtbb-dev
# Add additional dependencies as needed
- name: Configure CMake
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DGPU_CUDA_ON=ON
- name: Build
run: |
cd build
make -j$(nproc)
- name: Run Tests
run: |
cd build
ctest --output-on-failure
35 changes: 35 additions & 0 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Fedora CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-test:
runs-on: fedora-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 dnf install -y cmake boost-devel hdf5-devel gmp-devel tbb-devel
if [[ "${{ matrix.compiler }}" == gcc* ]]; then
sudo dnf install -y ${{ matrix.compiler }} ${{ matrix.compiler }}-base;
elif [[ "${{ matrix.compiler }}" == clang* ]]; then
sudo dnf install -y ${{ matrix.compiler }};
fi
if [[ "${{ matrix.technology }}" == "MPI" ]]; then
sudo dnf install -y openmpi-devel;
fi
56 changes: 56 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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

0 comments on commit d3941d3

Please sign in to comment.