Skip to content

Commit 644563d

Browse files
committed
Add CI build to text finding deps externally
1 parent f0bbf7a commit 644563d

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/python-package.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,59 @@ jobs:
8888
cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
8989
cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}
9090
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: Build
117+
run: |
118+
cmake -E make_directory ${{ env.OTIO_BUILD_DIR }}
119+
cd ${{ env.OTIO_BUILD_DIR }}
120+
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
121+
cmake --build . --config ${{ env.OTIO_BUILD_CONFIG }}
122+
- name: Run tests
123+
run: |
124+
cd ${{ env.OTIO_BUILD_DIR }}
125+
cmake --build . --target ${{ matrix.OTIO_TEST_TARGET }} --config ${{ env.OTIO_BUILD_CONFIG }}
126+
- name: Collect code coverage
127+
if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
128+
run: |
129+
cd ${{ env.OTIO_BUILD_DIR }}
130+
lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory . --output-file=coverage.info -q
131+
cat coverage.info | sed "s/SF:.*src/SF:src/g" > coverage.filtered.info
132+
lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q
133+
lcov --list coverage.filtered.info
134+
- name: Install
135+
run: |
136+
cd ${{ env.OTIO_BUILD_DIR }}
137+
cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }}
138+
- name: Consumer tests
139+
run: |
140+
cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
141+
cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
142+
cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}
143+
91144
py_build_test:
92145
runs-on: ${{ matrix.os }}
93146
strategy:

0 commit comments

Comments
 (0)