Skip to content

Commit 5abdeb5

Browse files
committed
Add CI build to text finding deps externally
1 parent f0bbf7a commit 5abdeb5

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/python-package.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,65 @@ 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+
- os: windows-latest
102+
OTIO_TEST_TARGET: RUN_TESTS
103+
- os: macos-latest
104+
OTIO_TEST_TARGET: test
105+
- os: macos-13
106+
OTIO_TEST_TARGET: test
107+
108+
env:
109+
OTIO_BUILD_CONFIG: Release
110+
OTIO_BUILD_DIR: ${{ github.workspace }}/build
111+
OTIO_INSTALL_DIR: ${{ github.workspace }}/install
112+
OTIO_CONSUMER_TEST_BUILD_DIR: ${{ github.workspace }}/consumertest
113+
114+
steps:
115+
- uses: actions/checkout@v4
116+
with:
117+
submodules: 'recursive'
118+
- name: Install coverage dependency
119+
if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
120+
run: |
121+
sudo apt-get install lcov
122+
- name: Build
123+
run: |
124+
cmake -E make_directory ${{ env.OTIO_BUILD_DIR }}
125+
cd ${{ env.OTIO_BUILD_DIR }}
126+
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
127+
cmake --build . --config ${{ env.OTIO_BUILD_CONFIG }}
128+
- name: Run tests
129+
run: |
130+
cd ${{ env.OTIO_BUILD_DIR }}
131+
cmake --build . --target ${{ matrix.OTIO_TEST_TARGET }} --config ${{ env.OTIO_BUILD_CONFIG }}
132+
- name: Collect code coverage
133+
if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
134+
run: |
135+
cd ${{ env.OTIO_BUILD_DIR }}
136+
lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory . --output-file=coverage.info -q
137+
cat coverage.info | sed "s/SF:.*src/SF:src/g" > coverage.filtered.info
138+
lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q
139+
lcov --list coverage.filtered.info
140+
- name: Install
141+
run: |
142+
cd ${{ env.OTIO_BUILD_DIR }}
143+
cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }}
144+
- name: Consumer tests
145+
run: |
146+
cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
147+
cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
148+
cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}
149+
91150
py_build_test:
92151
runs-on: ${{ matrix.os }}
93152
strategy:

0 commit comments

Comments
 (0)