SW data-driven radiation model #380
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: Test | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
name: ${{ matrix.name }}-py${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
name: [ubuntu, macos] | |
python-version: ["3.10", "3.11"] | |
include: | |
- name: ubuntu | |
os: ubuntu-22.04 | |
- name: macos | |
os: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install CliMT (MacOS) | |
if: matrix.name == 'macos' | |
env: | |
CC: gcc-12 | |
FC: gfortran-12 | |
TARGET: HASWELL | |
run: | | |
brew install gcc@12 | |
python -m pip install --upgrade pip wheel | |
python -m pip install git+https://github.com/atmtools/climt@rrtmg-only --no-binary climt | |
- name: Install CliMT (Linux) | |
if: matrix.name == 'ubuntu' | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install git+https://github.com/atmtools/climt@rrtmg-only --no-binary climt | |
- name: Install | |
run: | | |
python -m pip install -v .[docs,tests] | |
python -m pip list | |
- name: Lint with flake8 | |
if: matrix.name == 'ubuntu' && matrix.python-version == '3.11' | |
continue-on-error: true | |
run: | | |
python -m pip install flake8 | |
flake8 . --statistics || echo "::error::Check flake8 output for errors" | |
- name: Test | |
run: | | |
python -m pip install pytest | |
python -m pytest --pyargs konrad | |
- name: Build docs | |
continue-on-error: true | |
run: | | |
cd docs && make html || echo "::error::Documentation build errored." |