JamesK LRA logistic regression analysis app #2031
Workflow file for this run
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
| name: CI | |
| on: | |
| - push | |
| - pull_request | |
| - workflow_dispatch | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| # ENVIRONMENT SETTINGS TO PREVENT HANGS | |
| env: | |
| OMP_NUM_THREADS: "1" | |
| MKL_NUM_THREADS: "1" | |
| OPENBLAS_NUM_THREADS: "1" | |
| VECLIB_MAXIMUM_THREADS: "1" | |
| NUMEXPR_NUM_THREADS: "1" | |
| # Agg backend is critical for headless CI | |
| MPLBACKEND: "Agg" | |
| # Prevent ProDy from checking online for updates during import | |
| PRODY_NO_UPDATE_CHECK: "1" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache Matplotlib | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/matplotlib | |
| key: ${{ runner.os }}-matplotlib-${{ hashFiles('environment.yml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-matplotlib- | |
| - name: Set up Micromamba | |
| uses: mamba-org/setup-micromamba@v1 | |
| with: | |
| environment-file: environment.yml | |
| cache-environment: true | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| - name: Verify Environment | |
| shell: bash -l {0} | |
| run: | | |
| micromamba info | |
| micromamba list | |
| - name: Build & compile HPB (Linux) | |
| if: runner.os == 'Linux' | |
| shell: bash -l {0} | |
| run: | | |
| pip install -e . | |
| python setup.py build_ext --inplace --force | |
| ls -lh prody/proteins/hpb.so || { echo "hpb.so missing"; exit 1; } | |
| - name: Build & compile HPB (macOS) | |
| if: runner.os == 'macOS' | |
| shell: bash -l {0} | |
| run: | | |
| export CFLAGS="${CFLAGS} -D__NO_FLOAT16" | |
| export CPPFLAGS="${CPPFLAGS} -D__NO_FLOAT16" | |
| pushd prody/proteins/hpbmodule | |
| gfortran -O3 -fPIC -c reg_tet.f || exit 1 | |
| PYINC=$(python -c "import sysconfig; print(sysconfig.get_path('include'))") | |
| PYLIBDIR=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") | |
| export LIBRARY_PATH="$CONDA_PREFIX/lib:$PYLIBDIR:$LIBRARY_PATH" | |
| g++ -O3 -g -fPIC -I"${PYINC}" -c hpbmodule.cpp -o hpbmodule.o || exit 1 | |
| g++ -dynamiclib -undefined dynamic_lookup \ | |
| -o hpb.so hpbmodule.o reg_tet.o \ | |
| -L"${PYLIBDIR}" -L"$CONDA_PREFIX/lib" -lgfortran || exit 1 | |
| cp hpb.so ../ | |
| popd | |
| pip install -e . | |
| python setup.py build_ext --inplace --force | |
| - name: Run tests | |
| shell: bash -l {0} | |
| run: | | |
| # Warm up imports to trigger font cache build (if needed) before tests start | |
| python -c "import matplotlib.pyplot" | |
| # Run tests without debug flags | |
| pytest -v -k "not testCommandExample19 and not testCommandExample20" |