added specific humidity abindings #309
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: C++ CI (Linux, MacOS, Windows) | |
on: | |
push: | |
branches: [ "main", "develop" ] | |
pull_request: | |
branches: [ "main", "develop" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
# You can convert this to a matrix build if you need cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
# runs-on: ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Ensures all matrix combinations runs if one fails | |
fail-fast: false | |
# Set up our build-matrix | |
# 1) Linux GCC | |
# 2) Linux Clang | |
# 3) MaxOS Clang | |
# 4) Windows MSVC | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
build_type: [Release] | |
cpp_compiler: [g++, clang++, cl] | |
include: | |
- os: ubuntu-latest | |
cpp_compiler: g++ | |
- os: ubuntu-latest | |
cpp_compiler: clang++ | |
- os: macos-latest | |
cpp_compiler: g++ | |
- os: macos-latest | |
cpp_compiler: clang++ | |
- os: windows-latest | |
cpp_compiler: cl | |
exclude: | |
- os: ubuntu-latest | |
cpp_compiler: cl | |
- os: macos-latest | |
cpp_compiler: cl | |
- os: windows-latest | |
cpp_compiler: g++ | |
- os: windows-latest | |
cpp_compiler: clang++ | |
steps: | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Change submodule URLs to HTTPS | |
run: | | |
git submodule foreach ' | |
git config submodule.$name.url https://github.com/$urlPath | |
' | |
- name: Submodules and Dependencies | |
run: | | |
git config --global --add safe.directory ${{ github.workspace }} | |
git submodule update --init --recursive | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: > | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-S ${{ github.workspace }} | |
- name: Build | |
# Build your program with the given configuration | |
run: | | |
cmake --build ${{ steps.strings.outputs.build-output-dir }} | |
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --target SHARPlib_tests | |
- name: Test | |
working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest -C ${{ matrix.build_type }} | |