diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index d67ad9b1..39c91608 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -251,12 +251,6 @@ jobs: working-directory: _build - name: Examples run: | - # Confirm the python module loads. Set PYTHONPATH to the - # _install directory of the module (better to find it - # procedurally than hard code a path). - export PYTHONPATH=`find ../_install -name imath.so | xargs dirname` - python -c "import imath;print(imath.__version__)" - # Make sure we can build the tests when configured as a # standalone application linking against the just-installed # Imath library. @@ -282,6 +276,20 @@ jobs: --config ${{ matrix.build-type }} ctest working-directory: _examples + - name: Test Python + run: | + # Confirm the python module loads. Set PYTHONPATH to the + # _install directory of the module (better to find it + # procedurally than hard code a path). + if [[ "${{ matrix.python }}" == "ON" ]]; then + export PYTHONPATH=`find ../_install -name imath.so | xargs dirname` + python -c "import imath;print(imath.__version__)" + fi + if [[ "${{ matrix.pybind11 }}" == "ON" ]]; then + export PYTHONPATH=`find ../_install -name pybindimath.so | xargs dirname` + python -c "import pybindimath;print(pybindimath.__version__)" + fi + shell: bash - name: Test run: | ctest -T Test ${{ matrix.exclude-tests }} \