Skip to content

Work/1351 cy24

Work/1351 cy24 #149

Workflow file for this run

# Runs assorted integration tests that test the working tree
# against a variety of external projects.
#
# We keep these in few jobs to avoid an explosion in the number of runners.
name: Integrations
on:
pull_request:
branches-ignore:
- docs
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
python-integrations:
name: Python e2e on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
# We can't properly align to the VFX Reference Platform as this
# requires glibc 2.17, which is older than any of the available
# environments.
config:
- os: windows-2022
preamble: call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat" x64
shell: cmd
- os: ubuntu-22.04
shell: bash
- os: macos-12
shell: bash
defaults:
run:
# Annoyingly required here since `matrix` isn't available in
# the `shell` property of individual steps.
shell: ${{ matrix.config.shell }}
steps:
- uses: actions/checkout@v4
- name: Bootstrap
uses: ./.github/bootstrap_platform
- name: Build OpenAssetIO (setup.py)
run: |
${{ matrix.config.preamble }}
python -m pip install src/openassetio-python
env:
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.conan/conan_paths.cmake
- name: Install test dependencies
run: |
# We don't use the local requirements.txt for each
# integration as they will try to install openassetio
# and we want to use the working tree.
# Note: if we do need to install specific test dependencies
# for an integration, ensure that it does not override our
# `openassetio` package.
python -m pip install pytest
- name: Checkout BAL
uses: actions/checkout@v4
with:
repository: OpenAssetIO/OpenAssetIO-Manager-BAL
path: external/BAL
- name: Test BAL
run: |
python -m pip install external/BAL
python -m pip install -r external/BAL/tests/requirements.txt
python -m pytest -v external/BAL/tests
- name: Test Simple Resolver
run: |
python -m pytest -v examples/host/simpleResolver
env:
OPENASSETIO_PLUGIN_PATH: ${{ github.workspace }}/external/BAL/plugin
- name: Checkout TraitGen
uses: actions/checkout@v4
with:
repository: OpenAssetIO/OpenAssetIO-TraitGen
path: external/TraitGen
- name: Install TraitGen
run : |
python -m pip install external/TraitGen
- name: Install TraitGen test dependencies
# Ensure test dependencies don't splat the working tree version
# of `openassetio` (installed via setup.py, above). Use `awk`
# rather than `grep` so that output is not swallowed. The `awk`
# script will exit with status 1 if `openassetio` is not left
# unmodified, failing the build.
run : >
python -m pip install -r external/TraitGen/tests/requirements.txt
| awk '{print} /Attempting uninstall: openassetio/{found=1} END{exit found}'
- name: Test TraitGen (Python)
run: |
python -m pytest -v external/TraitGen
cmake-integrations:
name: CMake package on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: windows-2022
site-packages: Lib/site-packages
# TODO(DF): Disabled pending upstream changes to use system
# default libstdc++ - i.e. dropping CY22 support in favour of
# CY24.
# - os: ubuntu-22.04
# site-packages: lib/python3.11/site-packages
- os: macos-12
site-packages: lib/python3.11/site-packages
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Bootstrap
uses: ./.github/bootstrap_platform
- name: Build/install OpenAssetIO
run: >
${{ matrix.config.preamble }}
cmake -S . -B build --install-prefix '${{ github.workspace }}/dist'
-DOPENASSETIO_ENABLE_C=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel --config RelWithDebInfo
cmake --install build --config RelWithDebInfo
env:
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.conan/conan_paths.cmake
- name: Checkout TraitGen
uses: actions/checkout@v4
with:
repository: OpenAssetIO/OpenAssetIO-TraitGen
path: external/TraitGen
- name: Install TraitGen
run : |
python -m pip install external/TraitGen
- name: Install TraitGen test dependencies
run : >
python -m pip install -r external/TraitGen/tests/requirements.txt
| awk '{print} /Attempting uninstall: openassetio/{found=1} END{exit found}'
env:
PYTHONPATH: ${{ github.workspace }}/dist/${{ matrix.config.site-packages }}
- name: Test TraitGen (C++)
run: |
python -m pytest -v --capture=tee-sys -m ctest external/TraitGen
env:
PYTHONPATH: ${{ github.workspace }}/dist/${{ matrix.config.site-packages }}
CMAKE_PREFIX_PATH: ${{ github.workspace }}/dist
# TODO(DF): Consider adding some linting, e.g. compiler
# warnings, sanitizers. Will need additional CMake preset(s).
OPENASSETIO_TRAITGENTEST_CMAKE_PRESET: test
CONAN_USER_HOME: ~/conan
# For Windows:
OPENASSETIO_DLL_PATH: ${{ github.workspace }}/dist/bin
- name: Checkout OpenAssetIO-Test-CMake
uses: actions/checkout@v4
with:
repository: OpenAssetIO/OpenAssetIO-Test-CMake
path: external/OpenAssetIO-Test-CMake
- name: "Get Submodules"
run: |
cd external/OpenAssetIO-Test-CMake
git submodule update --init --recursive --remote OpenAssetIO-MediaCreation
- name: Test CMake package
run: >
${{ matrix.config.preamble }}
cd external/OpenAssetIO-Test-CMake
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DOPENASSETIOTEST_ENABLE_MEDIACREATION_SUBPROJECT=ON
cmake --build build --parallel --config RelWithDebInfo
ctest -VV --test-dir build --build-config RelWithDebInfo --parallel 4
env:
CMAKE_PREFIX_PATH: ${{ github.workspace }}/dist
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.conan/conan_paths.cmake
# For Windows:
OPENASSETIO_DLL_PATH: ${{ github.workspace }}/dist/bin
cpp-manager-plugin:
name: C++ manager plugin on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: windows-2022
preamble: call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat" x64
site-packages: Lib/site-packages
shell: cmd
- os: ubuntu-22.04
site-packages: lib/python3.11/site-packages
shell: bash
- os: macos-12
site-packages: lib/python3.11/site-packages
shell: bash
defaults:
run:
shell: ${{ matrix.config.shell }}
steps:
- uses: actions/checkout@v4
- name: Bootstrap
uses: ./.github/bootstrap_platform
- name: Install test dependencies
run: |
python -m pip install pytest
- name: Build/install OpenAssetIO (CMake)
run: >
${{ matrix.config.preamble }}
cmake -S . -B build --install-prefix ${{ github.workspace }}/dist
-DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel --config RelWithDebInfo
cmake --install build --config RelWithDebInfo
env:
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.conan/conan_paths.cmake
- name: Build/install SimpleCppManager
run: >
${{ matrix.config.preamble }}
cd examples/manager/SimpleCppManager
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DOPENASSETIO_ENABLE_TESTS=ON
cmake --build build --parallel --config RelWithDebInfo
cmake --install build --prefix '${{ github.workspace }}/dist/plugins'
--config RelWithDebInfo
env:
CMAKE_PREFIX_PATH: ${{ github.workspace }}/dist
- name: Test SimpleCppManager with simpleResolver (via CMake install tree)
run: >
python ${{ github.workspace }}/examples/host/simpleResolver/simpleResolver.py
openassetio-mediacreation:identity.DisplayName simplecpp://test/entity/1
| grep 'Test Entity 1'
env:
PYTHONPATH: ${{ github.workspace }}/dist/${{ matrix.config.site-packages }}
OPENASSETIO_LOGGING_SEVERITY: 1
OPENASSETIO_PLUGIN_PATH: ${{ github.workspace }}/dist/plugins
OPENASSETIO_DEFAULT_CONFIG: ${{ github.workspace }}/examples/manager/SimpleCppManager/tests/resources/openassetio_config.toml
# For Windows:
OPENASSETIO_DLL_PATH: ${{ github.workspace }}/dist/bin
- name: Build/install OpenAssetIO (setup.py)
run: |
${{ matrix.config.preamble }}
python -m pip install src/openassetio-python
env:
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.conan/conan_paths.cmake
- name: Test SimpleCppManager with simpleResolver (via Python distribution)
run: >
python ${{ github.workspace }}/examples/host/simpleResolver/simpleResolver.py
openassetio-mediacreation:identity.DisplayName simplecpp://test/entity/1
| grep 'Test Entity 1'
env:
OPENASSETIO_LOGGING_SEVERITY: 1
OPENASSETIO_PLUGIN_PATH: ${{ github.workspace }}/dist/plugins
OPENASSETIO_DEFAULT_CONFIG: ${{ github.workspace }}/examples/manager/SimpleCppManager/tests/resources/openassetio_config.toml