-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake build for ip2 along with changes to repo layout
- Loading branch information
1 parent
3eb7f4b
commit 4aa6b67
Showing
277 changed files
with
638 additions
and
719 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Build and Test | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
FC: gfortran-9 | ||
CC: gcc-9 | ||
|
||
steps: | ||
|
||
- name: checkout-pfunit | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Goddard-Fortran-Ecosystem/pFUnit | ||
path: pfunit | ||
|
||
- name: cache-pfunit | ||
id: cache-pfunit | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/pfunit | ||
key: pfunit-${{ runner.os }}-${{ hashFiles('pfunit/VERSION') }} | ||
|
||
- name: build-pfunit | ||
if: steps.cache-pfunit.outputs.cache-hit != 'true' | ||
run: | | ||
cd pfunit | ||
mkdir build | ||
cd build | ||
cmake .. -DSKIP_MPI=YES -DSKIP_ESMF=YES -DSKIP_FHAMCREST=YES -DCMAKE_INSTALL_PREFIX=~/pfunit | ||
make -j2 | ||
make install | ||
- name: checkout-sp | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: NOAA-EMC/NCEPLIBS-sp | ||
path: sp | ||
ref: develop | ||
|
||
- name: build-sp | ||
run: | | ||
cd sp | ||
mkdir build | ||
cd build | ||
cmake .. -DCMAKE_INSTALL_PREFIX=~/sp | ||
make -j2 | ||
make install | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ip2 | ||
submodules: true | ||
|
||
- name: build | ||
run: | | ||
cd ip2 | ||
mkdir build | ||
cd build | ||
cmake .. -DENABLE_TESTS=ON -DCMAKE_PREFIX_PATH="~/pfunit;~/" | ||
make -j2 | ||
- name: test | ||
run: | | ||
cd $GITHUB_WORKSPACE/ip2/build | ||
make test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
build/ | ||
install/ | ||
|
||
*.[ao] | ||
*.mod | ||
*.so | ||
*DS_Store | ||
|
||
*.swp |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
file(STRINGS "VERSION" pVersion) | ||
|
||
project( | ||
ip2 | ||
VERSION ${pVersion} | ||
LANGUAGES Fortran) | ||
|
||
option(OPENMP "use OpenMP threading" OFF) | ||
option(ENABLE_TESTS "Build pfunit tests?" OFF) | ||
|
||
if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$") | ||
message(STATUS "Setting build type to 'Release' as none was specified.") | ||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE) | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|GNU)$") | ||
message(WARNING "Compiler not officially supported: ${CMAKE_Fortran_COMPILER_ID}") | ||
endif() | ||
|
||
if(OPENMP) | ||
find_package(OpenMP REQUIRED COMPONENTS Fortran) | ||
endif() | ||
|
||
find_package(sp REQUIRED) | ||
|
||
add_subdirectory(src) | ||
|
||
if (ENABLE_TESTS) | ||
find_package(PFUNIT REQUIRED) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.