Skip to content

XIOS Integration (MVP) #751

XIOS Integration (MVP)

XIOS Integration (MVP) #751

name: compile code and tests
on:
push:
branches: [ main, develop, issue103_CI ]
pull_request:
branches: [ main, develop, issue103_CI ]
jobs:
clang-on-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: clang
run: |
brew extract --version=13.0.1 clang-format homebrew/cask-versions
brew install clang-format@13.0.1
cd core/src
clang-format --dry-run -Werror *cpp include/*hpp
cd -
for component in physics
do
cd $component/src
clang-format --dry-run -Werror *cpp include/*hpp
cd -
done
build-and-tests-on-ubuntu:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: installs
run: |
sudo apt-get update
sudo apt-get install libhdf5-103 libhdf5-cpp-103 libhdf5-fortran-102 libhdf5-hl-100 libhdf5-hl-cpp-100 libhdf5-hl-fortran-100
sudo apt-get install libnetcdf-dev libnetcdff-dev libnetcdf-mpi-dev libpnetcdf-dev
# sudo apt install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev mpich
sudo apt-get install netcdf-bin libnetcdf-c++4-dev libboost-all-dev libeigen3-dev cmake
git clone -b v2.x https://github.com/catchorg/Catch2.git
cd Catch2
cmake -Bbuild -H. -DBUILD_TESTING=OFF
sudo cmake --build build/ --target install
cd ..
svn checkout http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk xios
scp .github/xios_arch/ubuntu.env xios/arch/arch-GCC_LINUX.env
scp .github/xios_arch/ubuntu.arch xios/arch/arch-GCC_LINUX.arch
cd xios
# TODO: Figure out how to get this running using (default) netcdf4_par on GH Actions
./make_xios --arch GCC_LINUX --full --netcdf_lib netcdf4_seq
cd ..
- name: make
run: |
cmake .
make
- name: run tests
run: |
cd core/test
for file in $(find test* -maxdepth 0 -type f); do ./$file; done
cd -
for component in physics
do
cd $component/test
for file in $(find test* -maxdepth 0 -type f); do ./$file; done
cd -
done
build-and-tests-on-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: installs
run: |
brew install netcdf
brew install netcdf-cxx
brew install boost
brew install eigen
brew install cmake
- name: make
run: |
cmake .
make
- name: run tests
run: |
cd core/test
for file in $(find test* -maxdepth 0 -type f); do ./$file; done
cd -
for component in physics
do
cd $component/test
for file in $(find test* -maxdepth 0 -type f); do ./$file; done
cd -
done