Skip to content

Default to CY24 and drop support for CY22 #113

Default to CY24 and drop support for CY22

Default to CY24 and drop support for CY22 #113

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright 2023-2024 The Foundry Visionmongers Ltd
# Runs pytest on the matrix of supported platforms any Python versions.
name: Test
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-openassetio:
name: Build OpenAssetIO
runs-on: ubuntu-latest
container:
image: ghcr.io/openassetio/openassetio/openassetio-build:2024.5.rc3
steps:
- uses: actions/checkout@v3
- name: Build
uses: ./.github/build_openassetio
build-openassetio-mediacreation:
name: Build OpenAssetIO-MediaCreation
runs-on: ubuntu-latest
container:
image: ghcr.io/openassetio/openassetio/openassetio-build:2024.5.rc3
steps:
- uses: actions/checkout@v3
- name: Build
uses: ./.github/build_openassetio_mediacreation
test:
name: Test-Resolver
runs-on: ubuntu-latest
needs: build-openassetio
container:
image: ghcr.io/openassetio/openassetio/openassetio-build:2024.5.rc3
steps:
- uses: actions/checkout@v3
- name: Get OpenAssetIO
uses: actions/download-artifact@v3
with:
name: OpenAssetIO Build
path: ./openassetio-build
- name: Get OpenAssetIO-MediaCreation
uses: actions/download-artifact@v3
with:
name: OpenAssetIO-MediaCreation Build
path: ./openassetio-mediacreation-build
- name: Build and install Resolver
run: |
cmake -S . -DCMAKE_PREFIX_PATH="./openassetio-build;./openassetio-mediacreation-build" -B build
cmake --build build
cmake --install build
- run: |
python -m pip install -r tests/requirements.txt
python -m pip install importlib-metadata
# PYTHONPATH here is extended with `/usr/local/lib/python`
# because the USD install on this docker container is odd, and
# stores the `pxr` lib in that space, whilst the regular python
# libraries are contained at /usr/local/lib/python3.11,
# (which is already on the pythonpath)
#
# LD_LIBRARY_PATH doesn't have /usr/local/lib on it by default
# like you might expect because we're running as root, so we
# just append it (it's so we can find python itself.)
- name: Test
run: |
export PXR_PLUGINPATH_NAME=$GITHUB_WORKSPACE/build/dist/resources/plugInfo.json
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/openassetio-build/lib64
export PYTHONPATH=/usr/local/lib/python/:$GITHUB_WORKSPACE/openassetio-build/lib/python3.11/site-packages:$GITHUB_WORKSPACE/openassetio-mediacreation-build/lib/python3.11/site-packages
cd tests
python -m pytest -v --capture=tee-sys .