add sympl dependency #264
This file contains hidden or 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-latest, macos-latest] | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - 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 climt --config=tox.ini | |
| - name: Build climt | |
| run: | | |
| # Create tox environment string (e.g., 3.9 -> py39) | |
| py_ver="${{ matrix.python-version }}" | |
| tox_env="py${py_ver//./}" | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| gfortran --version | |
| CLIMT_ARCH=Linux tox -e $tox_env | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| # which gcc #/usr/bin/gcc | |
| # which gfortran | |
| CLIMT_ARCH=Darwin tox -e $tox_env | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| shell: bash |