mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Adds `photonlib-python-examples` to CI build run to make sure that Python builds cleanly against that PR/commit.
26 lines
543 B
Bash
Executable File
26 lines
543 B
Bash
Executable File
# Check if the first argument is provided
|
|
if [ $# -eq 0 ]
|
|
then
|
|
echo "Error: No example-to-run provided."
|
|
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
|
|
|
|
# Run the example
|
|
python3 robot.py sim
|