Work/1169 entity exists conveniences #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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-2019 | |
preamble: call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat" x64 | |
shell: cmd | |
- os: ubuntu-20.04 | |
shell: bash | |
- os: macos-11 | |
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-2019 | |
site-packages: Lib/site-packages | |
- os: ubuntu-20.04 | |
site-packages: lib/python3.9/site-packages | |
- os: macos-11 | |
site-packages: lib/python3.9/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 | |
- 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 |