Skip to content

Latest commit

 

History

History
90 lines (68 loc) · 2.87 KB

SANDBOXED_BUILDS.md

File metadata and controls

90 lines (68 loc) · 2.87 KB

Sandboxed builds

For convenience, OpenAssetIO provides two different sandboxed build environments.

Docker

A simple way to perform a from-source build is to use the openassetio-build docker image.

The openassetio-build image is almost identical to the ASWF CY24 Docker image, with just a few added dependencies. This image contains all the necessary dependencies to build and test OpenAssetIO, and functions as a fully configured build environment.

For example, to build and install OpenAssetIO (by default to a dist directory under the build directory) via a container, from the repository root run

docker run -v `pwd`:/src ghcr.io/openassetio/openassetio-build bash -c '
  cd /src && \
  cmake -S . -B build && \
  cmake --build build && \
  cmake --install build'

The install tree (build/dist) will contain a complete bundle, including the core C++ shared library, Python extension module (which dynamically links to the core C++ library) and Python sources.

The created bundle is therefore suitable for use in both C++ and Python applications.

The docker image also comes with the test dependencies installed. To build and run tests, from the root of the repository run

docker run -v `pwd`:/src ghcr.io/openassetio/openassetio-build bash -c '
  cd /src && \
  cmake -S . -B build -DOPENASSETIO_ENABLE_TESTS=ON && \
  ctest --test-dir build'

Note

Running tests via ctest will automatically perform the build and install steps.

Steps for creating openassetio-build docker image

The openassetio-build docker container is published to ghcr.io/openassetio/openassetio-build. On occasion, it may become necessary for contributors to rebuild and republish this image, find instructions on how to accomplish this below.

Building the image

OpenAssetIO provides a makefile to build the docker container. From resources/build, run

make docker-image

Note

If you find you need to update the version, this can be found inside the makefile itself. The openassetio-build container is versioned according to the VFX reference platform versioning scheme, eg 2022.1 for version 1 of the CY2022 based image.

Deploying the image

To deploy the image, again from resources/build, we use make.

GITHUB_PAT=<token> GITHUB_USERNAME=<username> make publish-docker

GITHUB_PAT refers to a personal access token. It must have the wite:packages permission.

Note

If this is a new image, the first time the image is published it will be created private. You can change the visibility through the GitHub web page for the package.