refactor: separate build, test, and deploy in Python workflow (#2308)

_Test what you build, deploy what you test._

This refactors the Python CI workflow to wait for _all_ tests to pass
before publishing photonlibpy to PyPI.

- build-python-examples reuses the built wheel, removes redundant builds
- Simplify run.sh to not rebuild wheel since it's already installed
This commit is contained in:
David Vo
2026-01-18 02:46:19 +11:00
committed by GitHub
parent 9011e285d2
commit afb73b3918
2 changed files with 65 additions and 48 deletions

View File

@@ -5,19 +5,6 @@ if [ $# -eq 0 ]
exit 1
fi
# To run any example, we want to use photonlib out of this repo
# Build the wheel first
pushd ../photon-lib/py
if [ -d build ]
then rm -rdf build
fi
python3 setup.py bdist_wheel
popd
# Add the output directory to PYTHONPATH to make sure it gets picked up
export PHOTONLIBPY_ROOT=../photon-lib/py
export PYTHONPATH=$PHOTONLIBPY_ROOT
# Move to the right example folder
cd $1