Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,63 @@ jobs:
cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}

cpp_build_external_deps:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment describing this job and what distinguishes this from the simple cpp_build job would be nice.
With three jobs, it feels like we would want comments on the other two as well, but that is outside the scope of thisPR.

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# Unfortunately the CMake test target is OS dependent so we set it as
# a variable here.
include:
- os: ubuntu-latest
OTIO_TEST_TARGET: test

env:
OTIO_BUILD_CONFIG: Release
OTIO_BUILD_DIR: ${{ github.workspace }}/build
OTIO_INSTALL_DIR: ${{ github.workspace }}/install
OTIO_CONSUMER_TEST_BUILD_DIR: ${{ github.workspace }}/consumertest

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install coverage dependency
if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
run: |
sudo apt-get install lcov
- name: Install external dependencies (Imath and rapidJSON)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libimath-dev rapidjson-dev
- name: Build
run: |
cmake -E make_directory ${{ env.OTIO_BUILD_DIR }}
cd ${{ env.OTIO_BUILD_DIR }}
cmake ${{ github.workspace }} -DCMAKE_INSTALL_PREFIX=${{ env.OTIO_INSTALL_DIR }} -DOTIO_SHARED_LIBS=OFF -DOTIO_CXX_COVERAGE=ON -DOTIO_FIND_IMATH=ON -DOTIO_FIND_RAPIDJSON=ON
cmake --build . --config ${{ env.OTIO_BUILD_CONFIG }}
- name: Run tests
run: |
cd ${{ env.OTIO_BUILD_DIR }}
cmake --build . --target ${{ matrix.OTIO_TEST_TARGET }} --config ${{ env.OTIO_BUILD_CONFIG }}
- name: Collect code coverage
if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
run: |
cd ${{ env.OTIO_BUILD_DIR }}
lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory . --output-file=coverage.info -q
cat coverage.info | sed "s/SF:.*src/SF:src/g" > coverage.filtered.info
lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q
lcov --list coverage.filtered.info
Comment on lines +131 to +137
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to run the coverage step, since that is covered by the generic test

- name: Install
run: |
cd ${{ env.OTIO_BUILD_DIR }}
cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }}
- name: Consumer tests
run: |
cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}

py_build_test:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,10 @@ if (NOT "${OTIO_IMATH_LIBS}" STREQUAL "")
set(OTIO_RESOLVED_IMATH_LIBRARIES "${OTIO_IMATH_LIBS}")
set(USE_DEPS_IMATH OFF)
elseif(OTIO_FIND_IMATH)
find_package(Imath QUIET)
set(USE_DEPS_IMATH OFF)
find_package(Imath REQUIRED)
if (Imath_FOUND)
message(STATUS "Found Imath 3 at ${Imath_CONFIG}")
set(USE_DEPS_IMATH OFF)
else()
message(STATUS "Imath 3 was not found, using src/deps/Imath")
set(USE_DEPS_IMATH ON)
endif()
else()
message(STATUS "Using src/deps/Imath by default")
Expand Down
Loading