Skip to content

[WIP] ENH: DAOS and DFS modules #970

[WIP] ENH: DAOS and DFS modules

[WIP] ENH: DAOS and DFS modules #970

Workflow file for this run

name: Python Testing
on:
push:
branches:
- main
paths:
- darshan-util/**
- include/**
pull_request:
branches:
- main
paths:
- darshan-util/**
- include/**
- .github/workflows/**
jobs:
test_pydarshan:
strategy:
matrix:
platform: [ubuntu-latest,
macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pyflakes asv pytest-cov "mypy<1.0.0"
- if: ${{matrix.platform == 'macos-latest'}}
name: Install MacOS deps
run: |
brew install automake
brew install libtool
- name: Install darshan-util
run: |
git submodule update --init
export DARSHAN_INSTALL_PREFIX=$PWD/darshan_install
DARSHAN_RUNTIME_SKIP=1 darshan-test/automated/build-darshan.sh
# run darshan-util make check target
make -C darshan_build/darshan-util check
- name: Install pydarshan
run: |
cd darshan-util/pydarshan
python -m pip install .[test]
# only install the darshan_logs project in some CI
# entries so we test proper handling of skips
# in test suite
- if: ${{matrix.python-version != 3.8}}
name: Install darshan_logs package
run: |
python -m pip install git+https://github.com/darshan-hpc/darshan-logs.git@main
- if: ${{matrix.python-version == 3.8}}
name: Use minimal deps
run: |
# uninstall deps that are not absolute requirements
# to make sure that i.e., tests skip appropriately
python -m pip uninstall -y lxml
- name: Test with pytest
run: |
export LD_LIBRARY_PATH=$PWD/darshan_install/lib
export DYLD_FALLBACK_LIBRARY_PATH=$PWD/darshan_install/lib
# the test suite should be portable
# to any directory--it must be possible
# to check HPC spack installs for example
cd $RUNNER_TEMP
site_packages=$(pip show darshan | grep Location | cut -d ' ' -f 2)
pytest -W error::FutureWarning -W error:"The join function was deprecated in Matplotlib" --pyargs darshan --cov-report xml --cov=$site_packages/darshan
- name: mypy check
run: |
export LD_LIBRARY_PATH=$PWD/darshan_install/lib
export DYLD_FALLBACK_LIBRARY_PATH=$PWD/darshan_install/lib
cd darshan-util/pydarshan
mypy darshan
- name: pyflakes check
run: |
cd darshan-util/pydarshan
pyflakes darshan/backend | (grep -E -i 'assigned to but never used' || exit 0 && exit 123)
- name: asv check
run: |
export LD_LIBRARY_PATH=$PWD/darshan_install/lib
export DYLD_FALLBACK_LIBRARY_PATH=$PWD/darshan_install/lib
cd darshan-util/pydarshan/benchmarks
python -m pip install "seaborn==0.12"
python -m asv check -E existing
- name: codecov check
uses: codecov/codecov-action@v3
with:
files: $RUNNER_TEMP/coverage.xml,/home/runner/work/_temp/coverage.xml,/Users/runner/work/_temp/coverage.xml
fail_ci_if_error: False