Bumped dependency versions #136
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
name: Check and publish | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- '**' | |
pull_request: ~ | |
workflow_dispatch: ~ | |
jobs: | |
quality: | |
name: Code QA | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: pip install black flake8 isort | |
- run: black --version | |
- run: isort --check . | |
- run: black --check . | |
- run: flake8 . | |
checks: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- gnu-10@ubuntu-20.04 | |
- clang-12@ubuntu-20.04 | |
- gnu-10@ubuntu-18.04 | |
- clang-9@ubuntu-18.04 | |
- gnu-10@macos-10.15 | |
- clang-12@macos-10.15 | |
include: | |
- name: gnu-10@ubuntu-20.04 | |
os: ubuntu-20.04 | |
compiler: gnu-10 | |
compiler_cc: gcc-10 | |
compiler_cxx: g++-10 | |
compiler_fc: gfortran-10 | |
- name: clang-12@ubuntu-20.04 | |
os: ubuntu-20.04 | |
compiler: clang-12 | |
compiler_cc: clang-12 | |
compiler_cxx: clang++-12 | |
compiler_fc: gfortran-10 | |
- name: gnu-10@ubuntu-18.04 | |
os: ubuntu-18.04 | |
compiler: gnu-10 | |
compiler_cc: gcc-10 | |
compiler_cxx: g++-10 | |
compiler_fc: gfortran-10 | |
- name: clang-9@ubuntu-18.04 | |
os: ubuntu-18.04 | |
compiler: clang-9 | |
compiler_cc: clang-9 | |
compiler_cxx: clang++-9 | |
compiler_fc: gfortran-9 | |
- name: gnu-10@macos-10.15 | |
os: macos-10.15 | |
compiler: gnu-10 | |
compiler_cc: gcc-10 | |
compiler_cxx: g++-10 | |
compiler_fc: gfortran-10 | |
# Xcode compiler requires empty environment variables, so we pass null (~) here | |
- name: clang-12@macos-10.15 | |
os: macos-10.15 | |
compiler: clang-12 | |
compiler_cc: ~ | |
compiler_cxx: ~ | |
compiler_fc: gfortran-10 | |
runs-on: ${{ matrix.os }} | |
name: Pytests on ${{ matrix.name }} | |
needs: quality | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
id: install-dependencies | |
uses: ecmwf-actions/build-package@v2 | |
with: | |
self_build: false | |
dependencies: | | |
ecmwf/ecbuild@refs/tags/2021.08.0 | |
ecmwf/eccodes@refs/tags/2.34.1 | |
ecmwf/eckit@refs/tags/1.25.2 | |
ecmwf/metkit@refs/tags/1.10.04 | |
ecmwf/fdb@refs/tags/5.11.30 | |
dependency_branch: develop | |
- name: General set up | |
run: | | |
mkdir -p $HOME/data/fdb | |
chmod -R o+rw $HOME/data | |
chmod -R o+rw . | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install pyfdb | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel | |
pip install pyeccodes | |
pip install -e . | |
- name: Unit tests | |
env: | |
LD_LIBRARY_PATH: ${{ steps.install-dependencies.outputs.lib_path }} | |
shell: bash -eux {0} | |
run: | | |
cwd=$(pwd) | |
export FDB5_CONFIG='{"type":"local","engine":"toc","schema":"'"$cwd"'/tests/default_fdb_schema","spaces":[{"handler":"Default","roots":[{"path":"'"$HOME"'/data/fdb"}]}]}' | |
cd tests | |
DYLD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }} python3 test.py | |
- name: Documentation | |
run: | | |
pip install sphinx ipykernel nbsphinx sphinx_rtd_theme | |
make clean | |
make html | |
working-directory: docs | |
deploy: | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
name: Upload to Pypi | |
needs: checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Check version | |
run: | | |
release=${GITHUB_REF##*/} | |
version=$(python setup.py --version) | |
test "$release" == "$version" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python setup.py sdist bdist_wheel | |
twine upload dist/* |