Skip to content

Support C++ manager plugins #116

Support C++ manager plugins

Support C++ manager plugins #116

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright 2023-2024 The Foundry Visionmongers Ltd
# Runs pytest on the matrix of supported platforms any Python versions.
name: Test
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-openassetio:
name: Build OpenAssetIO
runs-on: ubuntu-latest
container:
image: ghcr.io/openassetio/openassetio-build
steps:
- uses: actions/checkout@v3
- name: Build
uses: ./.github/build_openassetio
build-openassetio-mediacreation:
name: Build OpenAssetIO-MediaCreation
runs-on: ubuntu-latest
container:
image: ghcr.io/openassetio/openassetio-build
steps:
- uses: actions/checkout@v3
- name: Build
uses: ./.github/build_openassetio_mediacreation
test:
name: Test-Resolver
runs-on: ubuntu-latest
needs: build-openassetio
container:
image: ghcr.io/openassetio/openassetio-build
steps:
- uses: actions/checkout@v3
- name: Get OpenAssetIO
uses: actions/download-artifact@v3
with:
name: OpenAssetIO Build
path: ./openassetio-build
- name: Get OpenAssetIO-MediaCreation
uses: actions/download-artifact@v3
with:
name: OpenAssetIO-MediaCreation Build
path: ./openassetio-mediacreation-build
- name: Build and install Resolver
run: |
cmake -S . -DCMAKE_PREFIX_PATH="./openassetio-build;./openassetio-mediacreation-build" -B build
cmake --build build
cmake --install build
- run: |
python -m pip install -r tests/requirements.txt
# PYTHONPATH here is extended with `/usr/local/lib/python`
# because the USD install on this docker container is odd, and
# stores the `pxr` lib in that space, whilst the regular python
# libraries are contained at /usr/local/lib/python3.11,
# (which is already on the pythonpath)
#
# 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: 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 "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