Skip to content

Add versioning traits/specifications #68

Add versioning traits/specifications

Add versioning traits/specifications #68

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 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-build
steps:
- uses: actions/checkout@v3
- name: Build
uses: ./.github/build_openassetio
test-python:
name: "${{ matrix.os }} python-${{ matrix.python }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
python: ["3.7", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- run: |
python -m pip install -r tests/python/requirements.txt
python -m pip install .
- name: Test
run: python -m pytest -v
test-cpp:
name: Test Cpp
runs-on: ubuntu-latest
needs: build-openassetio
container:
image: aswf/ci-vfxall:2022-clang14.3
steps:
- uses: actions/checkout@v3
- name: Install Traitgen
run: python -m pip install openassetio-traitgen==1.0.0a6
- name: Get OpenAssetIO
uses: actions/download-artifact@v3
with:
name: OpenAssetIO Build
path: ./openassetio-build
- name: Configure CMake build
run: >
cmake -S . -DCMAKE_PREFIX_PATH=`pwd`/openassetio-build -B build -G Ninja
--preset test
- name: Build tests
run: cmake --build build
- name: Test
run: ctest -VV --test-dir build/tests/cpp --parallel 2
test-python-from-cmake:
# To support hybrid C++ applications, the python package may also be
# generated using the CMake packaging, in addition and simultaneously
# to the C++ package. This tests that.
name: "Test Python From CMake"
runs-on: ubuntu-latest
container:
image: aswf/ci-vfxall:2022-clang14.3
steps:
- uses: actions/checkout@v3
- name: Install Traitgen
run: python -m pip install openassetio-traitgen==1.0.0a6
- name: Configure CMake build
run: >
cmake -S . -B build -G Ninja
-DOPENASSETIO_MEDIACREATION_GENERATE_PYTHON=ON
-DOPENASSETIO_MEDIACREATION_PYTHON_SITEDIR="hybridpython"
- name: Install package
run: cmake --install build
- name: Install OpenAssetIO
run: python -m pip install openassetio>=1.0.0a6
- name: Test
run: |
python -m pip install -r tests/python/requirements.txt
PYTHONPATH=$(pwd)/build/dist/hybridpython python -m pytest -v