Skip to content

Commit

Permalink
fixup! [Docs] Add hybrid plugin system notebook
Browse files Browse the repository at this point in the history
Use a custom hybrid plugin created especially for the notebook, rather
than sellotaping BAL and SimpleCppManager together. This allows the
notebook to avoid potentially confusing readers with misleading text
about configuring two completely independent plugins to work together.

Also add a section about information sharing between plugins via the
`Context.managerState`.

Signed-off-by: David Feltell <[email protected]>
  • Loading branch information
feltech committed Sep 19, 2024
1 parent 8918168 commit e62f405
Show file tree
Hide file tree
Showing 16 changed files with 739 additions and 259 deletions.
17 changes: 7 additions & 10 deletions .github/build_openassetio/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

name: Build OpenAssetIO
description: Builds OpenAssetIO and publishes an artifact
inputs:
install-prefix:
description: Where to install OpenAssetIO once built
required: true
runs:
using: "composite"
steps:
Expand All @@ -20,13 +24,6 @@ runs:
- name: Build OpenAssetIO
shell: bash
run: |
cd openassetio-checkout
mkdir build
cmake -G Ninja -S . -B build -DOPENASSETIO_ENABLE_SIMPLECPPMANAGER=ON
cmake --build build
cmake --install build
- uses: actions/upload-artifact@v3
with:
name: OpenAssetIO Build
path: openassetio-checkout/build/dist
retention-days: 1
cmake -G Ninja -S openassetio-checkout -B openassetio-checkout/build
cmake --build openassetio-checkout/build
cmake --install openassetio-checkout/build --prefix ${{ inputs.install-prefix }}
27 changes: 19 additions & 8 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ jobs:
test-cpp-notebooks:
# A special job just for the Hybrid Plugin System because it needs a
# build of SimpleCppManager. Use the OpenAssetIO Docker container to
# get a build. If/when OpenAssetIO publishes SimpleCppManager with
# its release artifacts, this could be simplified.
# C++ build.
name: Test Hybrid Plugin System notebook
runs-on: ubuntu-latest
container:
Expand All @@ -53,14 +51,27 @@ jobs:
run: |
python -m pip install .
python -m pip install -r examples/resources/requirements.txt
python -m pip install openassetio-traitgen
- name: Build SimpleCppManager
- name: Build/install OpenAssetIO
uses: ./.github/build_openassetio
with:
install-prefix: dependencies

- name: Copy SimpleCppManager to expected location for notebook
run: >
cp openassetio-checkout/build/dist/SimpleCppManager.so
examples/resources/hybrid_plugin_system/SimpleCppManager/
- name: Build/install MediaCreation
run: |
cmake -S . -B build -G Ninja
cmake --build build
cmake --install build --prefix dependencies
- name: Build/install SimpleHybridManager
run: |
cd examples/resources/hybrid_plugin_system/SimpleHybridManager
cmake -S src -B build -G Ninja
cmake --build build
cmake --install build --prefix plugin
env:
CMAKE_PREFIX_PATH: dependencies

- name: Test notebook
run: jupyter nbconvert --to html --execute examples/hybrid_plugin_system.ipynb
Expand Down
29 changes: 8 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ concurrency:
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

test-python:
name: "${{ matrix.os }} python-${{ matrix.python }}"
runs-on: ${{ matrix.os }}
Expand All @@ -43,25 +33,22 @@ jobs:
test-cpp:
name: Test Cpp
runs-on: ubuntu-latest
needs: build-openassetio
container:
image: aswf/ci-base:2024
image: ghcr.io/openassetio/openassetio-build
steps:
- uses: actions/checkout@v3

- name: Build OpenAssetIO
uses: ./.github/build_openassetio
with:
install-prefix: openassetio

- name: Install Traitgen
run: python -m pip install openassetio-traitgen==1.0.0a10

- name: Get OpenAssetIO
uses: actions/download-artifact@v3
with:
name: OpenAssetIO Build
path: ./openassetio-build

- name: Configure CMake build
run: >
cmake -S . -DCMAKE_PREFIX_PATH=`pwd`/openassetio-build -B build -G Ninja
--preset test
run: |
cmake -S . -DCMAKE_PREFIX_PATH=$(pwd)/openassetio -B build -G Ninja --preset test
- name: Build tests
run: cmake --build build
Expand Down
Loading

0 comments on commit e62f405

Please sign in to comment.