@@ -658,7 +658,70 @@ jobs:
658658 # ###################################################
659659 # Test Dependencies/Regressions #
660660 # ###################################################
661- test_dependencies :
661+ test_buildtime_dependencies :
662+ needs :
663+ - initialize
664+ strategy :
665+ matrix :
666+ os :
667+ - ubuntu-20.04
668+ python-version :
669+ - 3.9
670+ packages :
671+ - ' "numpy>=2" "pandas>=2.2" "pyarrow>=16.1"'
672+
673+ runs-on : ${{ matrix.os }}
674+
675+ steps :
676+ - name : Checkout
677+ uses : actions/checkout@v4
678+ with :
679+ submodules : recursive
680+ fetch-depth : 0
681+
682+ - name : Set up Python ${{ matrix.python-version }}
683+ uses : ./.github/actions/setup-python
684+ with :
685+ version : ' ${{ matrix.python-version }}'
686+
687+ - name : Set up Caches
688+ uses : ./.github/actions/setup-caches
689+
690+ - name : Install python dependencies
691+ run : make requirements
692+
693+ - name : Install test dependencies
694+ shell : bash
695+ run : sudo apt-get install graphviz
696+
697+ # If we're checking a build-time dependency, install
698+ # the dependency, and then try to build
699+ - name : Install packages - ${{ matrix.packages }} (build time dependency check)
700+ run : python -m pip install -U ${{ matrix.packages }}
701+
702+ - name : Python Wheel Steps - ${{ matrix.packages }} (build time dependency check)
703+ run : make dist-py-cibw
704+ env :
705+ CIBW_BUILD : cp39-manylinux*
706+ CIBW_BUILD_FRONTEND : " pip; args: --no-build-isolation"
707+ CIBW_BUILD_VERBOSITY : 3
708+ CIBW_BEFORE_BUILD : make requirements && pip install ${{ matrix.packages }}
709+ 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 }}"
710+
711+ - name : Move Wheel
712+ run : mv dist/*.whl .
713+
714+ - name : Install wheel (build time dependency check)
715+ run : python -m pip install -U *manylinux*.whl --target .
716+
717+ - name : Install packages - ${{ matrix.packages }} (build time dependency check)
718+ run : python -m pip install -U ${{ matrix.packages }}
719+
720+ # Run tests to check dependencies
721+ - name : Python Test Steps (build time dependency check)
722+ run : make test
723+
724+ test_runtime_dependencies :
662725 needs :
663726 - initialize
664727 - build
@@ -669,10 +732,10 @@ jobs:
669732 - ubuntu-20.04
670733 python-version :
671734 - 3.9
672- package :
673- - " sqlalchemy>=2"
674- - " sqlalchemy<2"
675- - " numpy==1.19.5"
735+ packages :
736+ - ' "sqlalchemy>=2"'
737+ - ' "sqlalchemy<2"'
738+ - ' "numpy==1.19.5"'
676739
677740 runs-on : ${{ matrix.os }}
678741
@@ -681,6 +744,7 @@ jobs:
681744 uses : actions/checkout@v4
682745 with :
683746 submodules : recursive
747+ fetch-depth : 0
684748
685749 - name : Set up Python ${{ matrix.python-version }}
686750 uses : ./.github/actions/setup-python
@@ -694,26 +758,28 @@ jobs:
694758 shell : bash
695759 run : sudo apt-get install graphviz
696760
697- - name : Download wheel
761+ - name : Download wheel (run time dependency check)
698762 uses : actions/download-artifact@v4
699763 with :
700764 name : csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}
701765
702- - name : Install wheel
766+ - name : Install wheel (run time dependency check)
703767 run : |
704768 python -m pip install -U *manylinux*.whl
705769 python -m pip install -U --no-deps *manylinux*.whl --target .
706770
707- - name : Install package - ${{ matrix.package }}
708- run : python -m pip install -U " ${{ matrix.package }}"
771+ - name : Install packages - ${{ matrix.packages }} (run time dependency check)
772+ run : python -m pip install -U ${{ matrix.packages }}
709773
710- - name : Python Test Steps
774+ # Run tests to check dependencies
775+ - name : Python Test Steps (run time dependency check)
711776 run : make test TEST_ARGS="-k TestDBReader"
712- if : ${{ contains( 'sqlalchemy', matrix.package )}}
777+ if : ${{ contains( matrix.packages, 'sqlalchemy' )}}
713778
714- - name : Python Test Steps
779+ # For e.g. numpy dep changes, run all tests
780+ - name : Python Test Steps (run time dependency check)
715781 run : make test
716- if : ${{ contains( 'numpy', matrix.package )}}
782+ if : ${{ contains( matrix.packages, 'numpy' )}}
717783
718784 # ##########################################################################################################
719785 # .........................................................................................................#
@@ -762,7 +828,8 @@ jobs:
762828 - build
763829 - test
764830 - test_sdist
765- - test_dependencies
831+ - test_buildtime_dependencies
832+ - test_runtime_dependencies
766833
767834 if : startsWith(github.ref, 'refs/tags/v')
768835 runs-on : ubuntu-22.04
0 commit comments