-
Notifications
You must be signed in to change notification settings - Fork 29
96 lines (94 loc) · 3.48 KB
/
main_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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