Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,46 @@ jobs:
MPLBACKEND: Agg
run: python -m pytest --timeout=50 --timeout-method=thread

pgraph-compat:
# BundleAdjust is the only pgraph user and pgraph 1.0 changed API (keyword-only
# graph constructors, UVertex -> Vertex, edges() a list). The main matrix
# installs whatever pip resolves, so run the pgraph-touching tests against
# both the 0.6 series and the newest release explicitly.
name: pgraph compat (${{ matrix.pgraph }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pgraph: ["pgraph-python<1", "pgraph-python"]

steps:
- uses: actions/checkout@v7

- uses: actions/setup-python@v7
with:
python-version: "3.12"

- name: Install libegl
run: sudo apt-get update && sudo apt-get install -y libegl1 libgl1

- name: Install package
run: |
pip install .[dev,tool]
cd packages/mvtb-data && pip install .

- name: Install requested pgraph
run: |
pip install --upgrade "${{ matrix.pgraph }}"
pip show pgraph-python | grep -i '^version'

- name: Run pgraph tests
env:
MPLBACKEND: Agg
run: python -m pytest tests/test_bundleadjust.py --timeout=50 --timeout-method=thread

all-tests-passed:
name: All tests passed
needs: test
needs: [test, pgraph-compat]
runs-on: ubuntu-latest
if: always()
steps:
Expand All @@ -59,6 +96,10 @@ jobs:
echo "test matrix did not succeed: ${{ needs.test.result }}"
exit 1
fi
if [ "${{ needs.pgraph-compat.result }}" != "success" ]; then
echo "pgraph compat did not succeed: ${{ needs.pgraph-compat.result }}"
exit 1
fi

codecov:
needs: test
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies = [
"opencv-python>=4.5,<6.0.0",
"opencv-contrib-python>=4.5,<6.0.0",
"spatialmath-python",
"pgraph-python",
"pgraph-python>=0.6.4",
"ansitable",
"mvtb-data",
"requests",
Expand Down
Loading