@@ -648,7 +648,68 @@ jobs:
648648 # ###################################################
649649 # Test Dependencies/Regressions #
650650 # ###################################################
651- test_dependencies :
651+ test_buildtime_dependencies :
652+ needs :
653+ - initialize
654+ strategy :
655+ matrix :
656+ os :
657+ - ubuntu-20.04
658+ python-version :
659+ - 3.9
660+ packages :
661+ - ' "numpy>=2" "pandas>=2.2" "pyarrow>=16.1"'
662+
663+ runs-on : ${{ matrix.os }}
664+
665+ steps :
666+ - name : Checkout
667+ uses : actions/checkout@v4
668+ with :
669+ submodules : recursive
670+ fetch-depth : 0
671+
672+ - name : Set up Python ${{ matrix.python-version }}
673+ uses : ./.github/actions/setup-python
674+ with :
675+ version : ' ${{ matrix.python-version }}'
676+
677+ - name : Set up Caches
678+ uses : ./.github/actions/setup-caches
679+
680+ - name : Install python dependencies
681+ run : make requirements
682+
683+ - name : Install test dependencies
684+ shell : bash
685+ run : sudo apt-get install graphviz
686+
687+ # If we're checking a build-time dependency, install
688+ # the dependency, and then try to build
689+ - name : Install packages - ${{ matrix.packages }} (build time dependency check)
690+ run : python -m pip install -U ${{ matrix.packages }}
691+
692+ - name : Python Wheel Steps - ${{ matrix.packages }} (build time dependency check)
693+ run : make dist-py-cibw
694+ env :
695+ CIBW_BUILD : " cp39-manylinux*"
696+ CIBW_ENVIRONMENT_LINUX : CSP_MANYLINUX="ON" CCACHE_DIR="/host/home/runner/work/csp/csp/.ccache" VCPKG_DEFAULT_BINARY_CACHE="/host${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" VCPKG_DOWNLOADS="/host${{ env.VCPKG_DOWNLOADS }}"
697+ CIBW_BUILD_VERBOSITY : 3
698+
699+ - name : Move Wheel
700+ run : mv dist/*.whl .
701+
702+ - name : Install wheel (build time dependency check)
703+ run : python -m pip install -U *manylinux*.whl --target .
704+
705+ - name : Install packages - ${{ matrix.packages }} (build time dependency check)
706+ run : python -m pip install -U ${{ matrix.packages }}
707+
708+ # Run tests to check dependencies
709+ - name : Python Test Steps (build time dependency check)
710+ run : make test
711+
712+ test_runtime_dependencies :
652713 needs :
653714 - initialize
654715 - build
@@ -659,10 +720,10 @@ jobs:
659720 - ubuntu-20.04
660721 python-version :
661722 - 3.9
662- package :
663- - " sqlalchemy>=2"
664- - " sqlalchemy<2"
665- - " numpy==1.19.5"
723+ packages :
724+ - ' "sqlalchemy>=2"'
725+ - ' "sqlalchemy<2"'
726+ - ' "numpy==1.19.5"'
666727
667728 runs-on : ${{ matrix.os }}
668729
@@ -671,6 +732,7 @@ jobs:
671732 uses : actions/checkout@v4
672733 with :
673734 submodules : recursive
735+ fetch-depth : 0
674736
675737 - name : Set up Python ${{ matrix.python-version }}
676738 uses : ./.github/actions/setup-python
@@ -684,24 +746,26 @@ jobs:
684746 shell : bash
685747 run : sudo apt-get install graphviz
686748
687- - name : Download wheel
749+ - name : Download wheel (run time dependency check)
688750 uses : actions/download-artifact@v4
689751 with :
690752 name : csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}
691753
692- - name : Install wheel
754+ - name : Install wheel (run time dependency check)
693755 run : python -m pip install -U *manylinux*.whl --target .
694756
695- - name : Install package - ${{ matrix.package }}
696- run : python -m pip install -U " ${{ matrix.package }}"
757+ - name : Install packages - ${{ matrix.packages }} (run time dependency check)
758+ run : python -m pip install -U ${{ matrix.packages }}
697759
698- - name : Python Test Steps
760+ # Run tests to check dependencies
761+ - name : Python Test Steps (run time dependency check)
699762 run : make test TEST_ARGS="-k TestDBReader"
700- if : ${{ contains( 'sqlalchemy', matrix.package )}}
763+ if : ${{ contains( matrix.packages, 'sqlalchemy' )}}
701764
702- - name : Python Test Steps
765+ # For e.g. numpy dep changes, run all tests
766+ - name : Python Test Steps (run time dependency check)
703767 run : make test
704- if : ${{ contains( 'numpy', matrix.package )}}
768+ if : ${{ contains( matrix.packages, 'numpy' )}}
705769
706770 # ##########################################################################################################
707771 # .........................................................................................................#
@@ -750,7 +814,8 @@ jobs:
750814 - build
751815 - test
752816 - test_sdist
753- - test_dependencies
817+ - test_buildtime_dependencies
818+ - test_runtime_dependencies
754819
755820 if : startsWith(github.ref, 'refs/tags/v')
756821 runs-on : ubuntu-22.04
0 commit comments