Adding link to GFS #203
Workflow file for this run
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
push: | |
branches: [ master, without-dycore ] | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-18.04, macos-10.15] | |
python-version: [py37, py38, py39, py310] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 37 | |
if: ${{ matrix.python-version == 'py37' }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.7" | |
- name: Set up Python 38 | |
if: ${{ matrix.python-version == 'py38' }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
- name: Set up Python 39 | |
if: ${{ matrix.python-version == 'py39' }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Set up Python 310 | |
if: ${{ matrix.python-version == 'py310' }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel tox | |
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 --ignore=E501,E226,W504,W605 climt/ --count --show-source --statistics | |
- name: Build climt | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
gfortran --version | |
CLIMT_ARCH=Linux tox -e ${{ matrix.python-version }} | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
# which gcc #/usr/bin/gcc | |
# which gfortran | |
CLIMT_ARCH=Darwin tox -e ${{ matrix.python-version }} | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
shell: bash |