1111
1212on :
1313 push :
14- branches : [ main ]
14+ branches : [main]
1515 pull_request :
16- branches : [ main ]
16+ branches : [main]
1717
1818concurrency :
1919 group : ${{ github.workflow }}-${{ github.ref }}
@@ -24,18 +24,18 @@ jobs:
2424 runs-on : ${{ matrix.os }}
2525 strategy :
2626 matrix :
27- os : [ubuntu-latest, windows-latest, macos-13 , macos-latest]
27+ os : [ubuntu-latest, windows-latest, macos-14 , macos-latest]
2828 # Unfortunately the CMake test target is OS dependent so we set it as
2929 # a variable here.
3030 include :
31- - os : ubuntu-latest
32- OTIO_TEST_TARGET : test
33- - os : windows-latest
34- OTIO_TEST_TARGET : RUN_TESTS
35- - os : macos-latest
36- OTIO_TEST_TARGET : test
37- - os : macos-13
38- OTIO_TEST_TARGET : test
31+ - os : ubuntu-latest
32+ OTIO_TEST_TARGET : test
33+ - os : windows-latest
34+ OTIO_TEST_TARGET : RUN_TESTS
35+ - os : macos-latest
36+ OTIO_TEST_TARGET : test
37+ - os : macos-14
38+ OTIO_TEST_TARGET : test
3939
4040 env :
4141 OTIO_BUILD_CONFIG : Release
@@ -44,135 +44,142 @@ jobs:
4444 OTIO_CONSUMER_TEST_BUILD_DIR : ${{ github.workspace }}/consumertest
4545
4646 steps :
47- - uses : actions/checkout@v4
48- with :
49- submodules : ' recursive'
50- - name : Install coverage dependency
51- if : matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
52- run : |
53- sudo apt-get install lcov
54- - name : Build
55- run : |
56- cmake -E make_directory ${{ env.OTIO_BUILD_DIR }}
57- cd ${{ env.OTIO_BUILD_DIR }}
58- cmake ${{ github.workspace }} -DCMAKE_INSTALL_PREFIX=${{ env.OTIO_INSTALL_DIR }} -DOTIO_SHARED_LIBS=OFF -DOTIO_CXX_COVERAGE=ON
59- cmake --build . --config ${{ env.OTIO_BUILD_CONFIG }}
60- - name : Run tests
61- run : |
62- cd ${{ env.OTIO_BUILD_DIR }}
63- cmake --build . --target ${{ matrix.OTIO_TEST_TARGET }} --config ${{ env.OTIO_BUILD_CONFIG }}
64- - name : Collect code coverage
65- if : matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
66- run : |
67- cd ${{ env.OTIO_BUILD_DIR }}
68- lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory . --output-file=coverage.info -q
69- cat coverage.info | sed "s/SF:.*src/SF:src/g" > coverage.filtered.info
70- lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q
71- lcov --list coverage.filtered.info
72- # \todo Should the Codecov web pages show the results of the C++ or Python tests?
73- # - name: Upload coverage to Codecov
74- # if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
75- 76- # with:
77- # files: ${{ env.OTIO_BUILD_DIR }}/coverage.filtered.info
78- # flags: unittests
79- # name: opentimelineio-codecov
80- # fail_ci_if_error: true
81- - name : Install
82- run : |
83- cd ${{ env.OTIO_BUILD_DIR }}
84- cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }}
85- - name : Consumer tests
86- run : |
87- cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
88- cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
89- cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}
47+ - uses : actions/checkout@v4
48+ with :
49+ submodules : " recursive"
50+ - name : Install coverage dependency
51+ if : matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
52+ run : |
53+ sudo apt-get install lcov
54+ - name : Build
55+ run : |
56+ cmake -E make_directory ${{ env.OTIO_BUILD_DIR }}
57+ cd ${{ env.OTIO_BUILD_DIR }}
58+ cmake ${{ github.workspace }} -DCMAKE_INSTALL_PREFIX=${{ env.OTIO_INSTALL_DIR }} -DOTIO_SHARED_LIBS=OFF -DOTIO_CXX_COVERAGE=ON
59+ cmake --build . --config ${{ env.OTIO_BUILD_CONFIG }}
60+ - name : Run tests
61+ run : |
62+ cd ${{ env.OTIO_BUILD_DIR }}
63+ cmake --build . --target ${{ matrix.OTIO_TEST_TARGET }} --config ${{ env.OTIO_BUILD_CONFIG }}
64+ - name : Collect code coverage
65+ if : matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
66+ run : |
67+ cd ${{ env.OTIO_BUILD_DIR }}
68+ lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory . --output-file=coverage.info -q
69+ cat coverage.info | sed "s/SF:.*src/SF:src/g" > coverage.filtered.info
70+ lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q
71+ lcov --list coverage.filtered.info
72+ # \todo Should the Codecov web pages show the results of the C++ or Python tests?
73+ # - name: Upload coverage to Codecov
74+ # if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
75+ 76+ # with:
77+ # files: ${{ env.OTIO_BUILD_DIR }}/coverage.filtered.info
78+ # flags: unittests
79+ # name: opentimelineio-codecov
80+ # fail_ci_if_error: true
81+ - name : Install
82+ run : |
83+ cd ${{ env.OTIO_BUILD_DIR }}
84+ cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }}
85+ - name : Consumer tests
86+ run : |
87+ cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
88+ cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
89+ cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}
9090
9191 py_build_test :
9292 runs-on : ${{ matrix.os }}
9393 strategy :
9494 matrix :
95- os : [ubuntu-latest, windows-latest, macos-13 , macos-latest]
96- python-version : [' 3.9', ' 3.10', ' 3.11', ' 3.12' ]
95+ os : [ubuntu-latest, windows-latest, macos-14 , macos-latest]
96+ python-version : [" 3.9", " 3.10", " 3.11", " 3.12" ]
9797 include :
9898 - { os: ubuntu-latest, shell: bash }
9999 - { os: macos-latest, shell: bash }
100- - { os: macos-13 , shell: bash }
100+ - { os: macos-14 , shell: bash }
101101 - { os: windows-latest, shell: pwsh }
102- - { os: windows-latest, shell: msys2, python-version: ' mingw64' }
102+ - { os: windows-latest, shell: msys2, python-version: " mingw64" }
103103 exclude :
104104 - { os: macos-latest, python-version: 3.9 }
105105
106106 defaults :
107107 run :
108- shell : ' ${{ matrix.shell }} {0}'
108+ shell : " ${{ matrix.shell }} {0}"
109109
110110 env :
111111 OTIO_CXX_COVERAGE_BUILD : ON
112112 OTIO_CXX_BUILD_TMP_DIR : ${{ github.workspace }}/build
113113
114114 steps :
115- - uses : actions/checkout@v4
116- with :
117- submodules : ' recursive'
118- - name : Set up MSYS2
119- if : matrix.python-version == 'mingw64'
120- uses : msys2/setup-msys2@v2
121- with :
122- msystem : mingw64
123- install : >-
124- mingw-w64-x86_64-python
125- mingw-w64-x86_64-python-pip
126- mingw-w64-x86_64-gcc
127- mingw-w64-x86_64-cmake
128- make
129- git
130- - name : Set up Python ${{ matrix.python-version }}
131- if : matrix.python-version != 'mingw64'
132- 133- with :
134- python-version : ${{ matrix.python-version }}
135- - name : Install coverage dependency
136- if : matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
137- run : |
138- echo 'OTIO_CXX_DEBUG_BUILD=1' >> $GITHUB_ENV
139- sudo apt-get install lcov
140- - name : Install python build dependencies
141- run : |
142- python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
143- # \todo Temporarily disable check-manifest on MinGW, it is failing
144- # intermittently with this error:
145- # ModuleNotFoundError: No module named 'pip._vendor.distlib'
146- - name : Run check-manifest and lint check
147- if : matrix.python-version != 'mingw64'
148- run : make ci-prebuild
149- - name : Build and Install
150- run : |
151- pip install .[dev] -v --break-system-packages
152- - name : Run tests w/ python coverage
153- run : make ci-postbuild
154- # (only on GH_COV_OS and GH_COV_PY)
155- - name : Generate C++ coverage report
156- if : matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
157- run : make lcov
158- - name : Upload coverage to Codecov
159- if : matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
160- uses : codecov/codecov-action@v4
161- with :
162- flags : py-unittests
163- name : py-opentimelineio-codecov
164- fail_ci_if_error : false
165- env :
166- # based on: https://github.com/codecov/codecov-action?tab=readme-ov-file#usage
167- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
115+ - uses : actions/checkout@v4
116+ with :
117+ submodules : " recursive"
118+ - name : Set up MSYS2
119+ if : matrix.python-version == 'mingw64'
120+ uses : msys2/setup-msys2@v2
121+ with :
122+ msystem : mingw64
123+ install : >-
124+ mingw-w64-x86_64-python
125+ mingw-w64-x86_64-python-pip
126+ mingw-w64-x86_64-gcc
127+ mingw-w64-x86_64-cmake
128+ make
129+ git
130+ - name : Set up Python ${{ matrix.python-version }}
131+ if : matrix.python-version != 'mingw64'
132+ 133+ with :
134+ python-version : ${{ matrix.python-version }}
135+ - name : Install coverage dependency
136+ if : matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
137+ run : |
138+ echo 'OTIO_CXX_DEBUG_BUILD=1' >> $GITHUB_ENV
139+ sudo apt-get install lcov
140+ - name : Install python build dependencies
141+ run : |
142+ python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
143+ # \todo Temporarily disable check-manifest on MinGW, it is failing
144+ # intermittently with this error:
145+ # ModuleNotFoundError: No module named 'pip._vendor.distlib'
146+ - name : Run check-manifest and lint check
147+ if : matrix.python-version != 'mingw64'
148+ run : make ci-prebuild
149+ - name : Build and Install
150+ run : |
151+ pip install .[dev] -v --break-system-packages
152+ - name : Run tests w/ python coverage
153+ run : make ci-postbuild
154+ # (only on GH_COV_OS and GH_COV_PY)
155+ - name : Generate C++ coverage report
156+ if : matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
157+ run : make lcov
158+ - name : Upload coverage to Codecov
159+ if : matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
160+ uses : codecov/codecov-action@v4
161+ with :
162+ flags : py-unittests
163+ name : py-opentimelineio-codecov
164+ fail_ci_if_error : false
165+ env :
166+ # based on: https://github.com/codecov/codecov-action?tab=readme-ov-file#usage
167+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
168168
169169 package_wheels :
170170 needs : py_build_test
171171 runs-on : ${{ matrix.os }}
172172 strategy :
173173 matrix :
174- os : [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest]
175- python-build : ['cp39', 'cp310', 'cp311', 'cp312']
174+ os :
175+ [
176+ ubuntu-latest,
177+ ubuntu-24.04-arm,
178+ windows-latest,
179+ macos-14,
180+ macos-latest,
181+ ]
182+ python-build : ["cp39", "cp310", "cp311", "cp312"]
176183 # exclude:
177184 # none currently
178185 # - { os: macos-latest, python-build: 'cp37' }
@@ -185,7 +192,7 @@ jobs:
185192 output-dir : wheelhouse
186193 env :
187194 CIBW_BUILD : ${{ matrix.python-build }}*
188- CIBW_SKIP : ' *musllinux*'
195+ CIBW_SKIP : " *musllinux*"
189196 CIBW_ARCHS_LINUX : native
190197 CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
191198 CIBW_MANYLINUX_AARCH64_IMAGE : manylinux2014
@@ -200,19 +207,19 @@ jobs:
200207 needs : py_build_test
201208 runs-on : ubuntu-latest
202209 steps :
203- - uses : actions/checkout@v4
204- with :
205- submodules : ' recursive'
210+ - uses : actions/checkout@v4
211+ with :
212+ submodules : " recursive"
206213
207- 214+ 208215
209- - name : Install pypa/build
210- run : python -m pip install build --user
216+ - name : Install pypa/build
217+ run : python -m pip install build --user
211218
212- - name : Generate sdist
213- run : python -m build -s .
219+ - name : Generate sdist
220+ run : python -m build -s .
214221
215- - uses : actions/upload-artifact@v4
216- with :
217- name : sdist
218- path : dist
222+ - uses : actions/upload-artifact@v4
223+ with :
224+ name : sdist
225+ path : dist
0 commit comments