Skip to content

Commit 90df511

Browse files
committed
fixup! [Docs] Add hybrid plugin system notebook
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]>
1 parent 8918168 commit 90df511

File tree

16 files changed

+742
-257
lines changed

16 files changed

+742
-257
lines changed

.github/build_openassetio/action.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
name: Build OpenAssetIO
99
description: Builds OpenAssetIO and publishes an artifact
10+
inputs:
11+
install-prefix:
12+
description: Where to install OpenAssetIO once built
13+
required: true
1014
runs:
1115
using: "composite"
1216
steps:
@@ -20,13 +24,6 @@ runs:
2024
- name: Build OpenAssetIO
2125
shell: bash
2226
run: |
23-
cd openassetio-checkout
24-
mkdir build
25-
cmake -G Ninja -S . -B build -DOPENASSETIO_ENABLE_SIMPLECPPMANAGER=ON
26-
cmake --build build
27-
cmake --install build
28-
- uses: actions/upload-artifact@v3
29-
with:
30-
name: OpenAssetIO Build
31-
path: openassetio-checkout/build/dist
32-
retention-days: 1
27+
cmake -G Ninja -S openassetio-checkout -B openassetio-checkout/build
28+
cmake --build openassetio-checkout/build
29+
cmake --install openassetio-checkout/build --prefix ${{ inputs.install-prefix }}

.github/workflows/examples.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,44 @@ jobs:
4040
4141
test-cpp-notebooks:
4242
# A special job just for the Hybrid Plugin System because it needs a
43-
# build of SimpleCppManager. Use the OpenAssetIO Docker container to
44-
# get a build. If/when OpenAssetIO publishes SimpleCppManager with
45-
# its release artifacts, this could be simplified.
43+
# C++ build.
4644
name: Test Hybrid Plugin System notebook
4745
runs-on: ubuntu-latest
4846
container:
4947
image: ghcr.io/openassetio/openassetio-build
48+
env:
49+
SIMPLEHYBRIDMANAGER_SUBDIR: examples/resources/hybrid_plugin_system/SimpleHybridManager
5050
steps:
5151
- uses: actions/checkout@v3
5252
- name: Install Dependencies
5353
run: |
5454
python -m pip install .
5555
python -m pip install -r examples/resources/requirements.txt
56+
python -m pip install openassetio-traitgen
5657
57-
- name: Build SimpleCppManager
58+
- name: Build/install OpenAssetIO
5859
uses: ./.github/build_openassetio
60+
with:
61+
install-prefix: ${{ env.SIMPLEHYBRIDMANAGER_SUBDIR }}/dependencies
5962

60-
- name: Copy SimpleCppManager to expected location for notebook
61-
run: >
62-
cp openassetio-checkout/build/dist/SimpleCppManager.so
63-
examples/resources/hybrid_plugin_system/SimpleCppManager/
63+
- name: Build/install MediaCreation
64+
run: |
65+
cmake -S . -B build -G Ninja
66+
cmake --build build
67+
cmake --install build --prefix $SIMPLEHYBRIDMANAGER_SUBDIR/dependencies
68+
69+
- name: Build/install SimpleHybridManager
70+
run: |
71+
cmake -S src -B build -G Ninja
72+
cmake --build build
73+
cmake --install build --prefix plugin
74+
env:
75+
CMAKE_PREFIX_PATH: dependencies
76+
# Since we're in a Docker container, `github.workspace` doesn't
77+
# give the correct location, except, for some reason, when used
78+
# in a `working-directory` option. See
79+
# https://github.com/actions/runner/issues/2058#issuecomment-1541828550
80+
working-directory: ${{ github.workspace }}/${{ env.SIMPLEHYBRIDMANAGER_SUBDIR }}
6481

6582
- name: Test notebook
6683
run: jupyter nbconvert --to html --execute examples/hybrid_plugin_system.ipynb

.github/workflows/test.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
build-openassetio:
15-
name: Build OpenAssetIO
16-
runs-on: ubuntu-latest
17-
container:
18-
image: ghcr.io/openassetio/openassetio-build
19-
steps:
20-
- uses: actions/checkout@v3
21-
- name: Build
22-
uses: ./.github/build_openassetio
23-
2414
test-python:
2515
name: "${{ matrix.os }} python-${{ matrix.python }}"
2616
runs-on: ${{ matrix.os }}
@@ -43,25 +33,22 @@ jobs:
4333
test-cpp:
4434
name: Test Cpp
4535
runs-on: ubuntu-latest
46-
needs: build-openassetio
4736
container:
48-
image: aswf/ci-base:2024
37+
image: ghcr.io/openassetio/openassetio-build
4938
steps:
5039
- uses: actions/checkout@v3
5140

41+
- name: Build OpenAssetIO
42+
uses: ./.github/build_openassetio
43+
with:
44+
install-prefix: openassetio
45+
5246
- name: Install Traitgen
5347
run: python -m pip install openassetio-traitgen==1.0.0a10
5448

55-
- name: Get OpenAssetIO
56-
uses: actions/download-artifact@v3
57-
with:
58-
name: OpenAssetIO Build
59-
path: ./openassetio-build
60-
6149
- name: Configure CMake build
62-
run: >
63-
cmake -S . -DCMAKE_PREFIX_PATH=`pwd`/openassetio-build -B build -G Ninja
64-
--preset test
50+
run: |
51+
cmake -S . -DCMAKE_PREFIX_PATH=$(pwd)/openassetio -B build -G Ninja --preset test
6552
6653
- name: Build tests
6754
run: cmake --build build

0 commit comments

Comments
 (0)