|
88 | 88 | cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
|
89 | 89 | cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}
|
90 | 90 |
|
| 91 | + cpp_build_external_deps: |
| 92 | + runs-on: ${{ matrix.os }} |
| 93 | + strategy: |
| 94 | + matrix: |
| 95 | + os: [ubuntu-latest] |
| 96 | + # Unfortunately the CMake test target is OS dependent so we set it as |
| 97 | + # a variable here. |
| 98 | + include: |
| 99 | + - os: ubuntu-latest |
| 100 | + OTIO_TEST_TARGET: test |
| 101 | + |
| 102 | + env: |
| 103 | + OTIO_BUILD_CONFIG: Release |
| 104 | + OTIO_BUILD_DIR: ${{ github.workspace }}/build |
| 105 | + OTIO_INSTALL_DIR: ${{ github.workspace }}/install |
| 106 | + OTIO_CONSUMER_TEST_BUILD_DIR: ${{ github.workspace }}/consumertest |
| 107 | + |
| 108 | + steps: |
| 109 | + - uses: actions/checkout@v4 |
| 110 | + with: |
| 111 | + submodules: 'recursive' |
| 112 | + - name: Install coverage dependency |
| 113 | + if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT |
| 114 | + run: | |
| 115 | + sudo apt-get install lcov |
| 116 | + - name: Install external dependencies (Imath and rapidJSON) |
| 117 | + if: matrix.os == ubuntu-latest |
| 118 | + run: | |
| 119 | + sudo apt-get install libimath-dev |
| 120 | + - name: Build |
| 121 | + run: | |
| 122 | + cmake -E make_directory ${{ env.OTIO_BUILD_DIR }} |
| 123 | + cd ${{ env.OTIO_BUILD_DIR }} |
| 124 | + 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 |
| 125 | + cmake --build . --config ${{ env.OTIO_BUILD_CONFIG }} |
| 126 | + - name: Run tests |
| 127 | + run: | |
| 128 | + cd ${{ env.OTIO_BUILD_DIR }} |
| 129 | + cmake --build . --target ${{ matrix.OTIO_TEST_TARGET }} --config ${{ env.OTIO_BUILD_CONFIG }} |
| 130 | + - name: Collect code coverage |
| 131 | + if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT |
| 132 | + run: | |
| 133 | + cd ${{ env.OTIO_BUILD_DIR }} |
| 134 | + lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory . --output-file=coverage.info -q |
| 135 | + cat coverage.info | sed "s/SF:.*src/SF:src/g" > coverage.filtered.info |
| 136 | + lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q |
| 137 | + lcov --list coverage.filtered.info |
| 138 | + - name: Install |
| 139 | + run: | |
| 140 | + cd ${{ env.OTIO_BUILD_DIR }} |
| 141 | + cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }} |
| 142 | + - name: Consumer tests |
| 143 | + run: | |
| 144 | + cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }} |
| 145 | + cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }} |
| 146 | + cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }} |
| 147 | +
|
91 | 148 | py_build_test:
|
92 | 149 | runs-on: ${{ matrix.os }}
|
93 | 150 | strategy:
|
|
0 commit comments