From d828a0cf819c97a24b630ada9fb5f23ec52248da Mon Sep 17 00:00:00 2001 From: David Feltell Date: Wed, 21 Aug 2024 19:01:56 +0100 Subject: [PATCH] [CI] Test with C++ and Python managers Part of #40. Update CI tests to make use of SimpleCppManager as a C++ alternative to the Python BasicAssetLibrary (BAL) manager. Signed-off-by: David Feltell --- .github/build_openassetio/action.yml | 2 +- .github/workflows/test.yml | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/build_openassetio/action.yml b/.github/build_openassetio/action.yml index 151bf8d..1d1ab52 100644 --- a/.github/build_openassetio/action.yml +++ b/.github/build_openassetio/action.yml @@ -21,7 +21,7 @@ runs: run: | cd openassetio-checkout mkdir build - cmake -G Ninja -S . -B build + cmake -G Ninja -S . -B build -DOPENASSETIO_ENABLE_SIMPLECPPMANAGER=ON cmake --build build cmake --install build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be1352a..bacd94c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,11 +70,20 @@ jobs: # LD_LIBRARY_PATH doesn't have /usr/local/lib on it by default # like you might expect because we're running as root, so we # just append it (it's so we can find python itself.) - - name: Test + + - name: Configure environment + run: | + echo "PXR_PLUGINPATH_NAME=$GITHUB_WORKSPACE/build/dist/resources/plugInfo.json" >> "$GITHUB_ENV" + echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/openassetio-build/lib64" >> "$GITHUB_ENV" + echo "PYTHONPATH=/usr/local/lib/python/:$GITHUB_WORKSPACE/openassetio-build/lib/python3.11/site-packages:$GITHUB_WORKSPACE/openassetio-mediacreation-build/lib/python3.11/site-packages" >> "$GITHUB_ENV" + + - name: Test (Python manager) + run: | + export "OPENASSETIO_DEFAULT_CONFIG=$GITHUB_WORKSPACE/tests/resources/openassetio_config_python.toml" + python -m pytest -v --capture=tee-sys tests + + - name: Test (C++ manager) run: | - export PXR_PLUGINPATH_NAME=$GITHUB_WORKSPACE/build/dist/resources/plugInfo.json - export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/openassetio-build/lib64 - export PYTHONPATH=/usr/local/lib/python/:$GITHUB_WORKSPACE/openassetio-build/lib/python3.11/site-packages:$GITHUB_WORKSPACE/openassetio-mediacreation-build/lib/python3.11/site-packages - export OPENASSETIO_DEFAULT_CONFIG=$GITHUB_WORKSPACE/tests/resources/openassetio_config_python.toml - cd tests - python -m pytest -v --capture=tee-sys . + export "OPENASSETIO_DEFAULT_CONFIG=$GITHUB_WORKSPACE/tests/resources/openassetio_config_cpp.toml" + export "OPENASSETIO_PLUGIN_PATH=$GITHUB_WORKSPACE/openassetio-build" + python -m pytest -v --capture=tee-sys tests