Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
67cea6e
deprecate dev extra in favor of requirements.txt in tests dir
reinecke Nov 9, 2025
39742e7
re-tool python tests to run against wheels
reinecke Nov 9, 2025
d5f527e
fixed indentation issue in workflow yml
reinecke Nov 9, 2025
aae5413
Fixed illegal env variable in runs-on
reinecke Nov 9, 2025
e2653c4
Added missing -r for installing requirements.txt
reinecke Nov 9, 2025
549b15c
Added discrete step for installing otio
reinecke Nov 9, 2025
6503a2a
removed erroneous redundant lint check from wheel test
reinecke Nov 9, 2025
021f574
fixed download artifact pattern to be glob instead of regex
reinecke Nov 9, 2025
dcac211
filter wheel downloads to only pull for the OS version
reinecke Nov 9, 2025
19fd51f
add --break-system-packages to test requirements for mingw
reinecke Nov 9, 2025
8154a0c
add --break-system-packages to test wheel install for mingw
reinecke Nov 9, 2025
af7508e
created anindependent build and test task for platforms with no wheel…
reinecke Nov 9, 2025
f22fe5b
fixed misplaced yaml object
reinecke Nov 9, 2025
f96bb26
restricted test only python to mingw
reinecke Nov 9, 2025
1af7f5e
added --break-system-packages for mingw
reinecke Nov 10, 2025
e713155
updated smoketest and testonly targets to build off sdist
reinecke Nov 10, 2025
f323137
reverted smoketest to use source checkout, fixed test only targets sd…
reinecke Nov 10, 2025
a76e051
one more attempt to make sdist install work
reinecke Nov 10, 2025
61a8b42
Trying using an intermediate variable to address sdist wildcard match…
reinecke Nov 12, 2025
742dc6c
adding a debugging ls
reinecke Nov 12, 2025
5e0ce4d
more debugging ls
reinecke Nov 12, 2025
9ef3995
reshuffle build step order in build only to make sure the sdist artif…
reinecke Nov 12, 2025
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
164 changes: 121 additions & 43 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: OpenTimelineIO

# for configuring which build will be a C++ coverage build / coverage report
env:
GH_COV_PY: "3.10"
GH_COV_PY: "3.13"
GH_COV_OS: ubuntu-latest
GH_DEPENDABOT: dependabot

Expand Down Expand Up @@ -88,86 +88,120 @@ jobs:
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 }}
py_smoketest_build:
# Ideally this would be ${{ env.GH_COV_OS }} - but github doens't allow it
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- { os: ubuntu-latest, shell: bash }
- { os: macos-latest, shell: bash }
- { os: macos-14, shell: bash }
- { os: windows-latest, shell: pwsh }
- { os: windows-latest, shell: msys2, python-version: "mingw64" }
exclude:
- { os: macos-latest, python-version: 3.9 }

defaults:
run:
shell: "${{ matrix.shell }} {0}"
shell: "bash {0}"

env:
OTIO_CXX_COVERAGE_BUILD: ON
OTIO_CXX_COVERAGE_BUILD: 'ON'
OTIO_CXX_BUILD_TMP_DIR: ${{ github.workspace }}/build

steps:
- uses: actions/checkout@v4
- name: Get tests and requirements from source
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Set up MSYS2
if: matrix.python-version == 'mingw64'
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: >-
mingw-w64-x86_64-python
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
make
git
- name: Set up Python ${{ matrix.python-version }}
if: matrix.python-version != 'mingw64'
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install coverage dependency
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
if: matrix.python-version == env.GH_COV_PY && github.actor != env.GH_DEPENDABOT
run: |
echo 'OTIO_CXX_DEBUG_BUILD=1' >> $GITHUB_ENV
sudo apt-get install lcov
- name: Install python build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
# \todo Temporarily disable check-manifest on MinGW, it is failing
# intermittently with this error:
# ModuleNotFoundError: No module named 'pip._vendor.distlib'
- name: Run check-manifest and lint check
if: matrix.python-version != 'mingw64'
run: make ci-prebuild
- name: Build and Install
- name: Install test dependencies
run: |
python -m pip install --upgrade -r tests/requirements.txt
- name: Build and Install OpenTimelineIO
run: |
pip install .[dev] -v --break-system-packages
python -m pip install . -v --break-system-packages
- name: Run tests w/ python coverage
run: make ci-postbuild
# (only on GH_COV_OS and GH_COV_PY)
- name: Generate C++ coverage report
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
if: matrix.python-version == env.GH_COV_PY && github.actor != env.GH_DEPENDABOT
run: make lcov
- name: Upload coverage to Codecov
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
uses: codecov/codecov-action@v4
if: matrix.python-version == env.GH_COV_PY && github.actor != env.GH_DEPENDABOT
uses: codecov/codecov-action@v5
with:
flags: py-unittests
name: py-opentimelineio-codecov
fail_ci_if_error: false
env:
# based on: https://github.com/codecov/codecov-action?tab=readme-ov-file#usage
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

# This is for platforms where we build and test, but don't make wheels
py_testonly_build:
needs: package_sdist
# Ideally this would be ${{ env.GH_COV_OS }} - but github doens't allow it
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: ["mingw64"]
include:
- { os: windows-latest, shell: msys2, python-version: "mingw64" }

defaults:
run:
shell: "${{ matrix.shell }} {0}"

env:
OTIO_CXX_COVERAGE_BUILD: 'ON'
OTIO_CXX_BUILD_TMP_DIR: ${{ github.workspace }}/build

steps:
- name: Set up MSYS2
if: matrix.python-version == 'mingw64'
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: >-
mingw-w64-x86_64-python
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
make
git
- name: Set up Python ${{ matrix.python-version }}
if: matrix.python-version != 'mingw64'
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Get sdist source
uses: actions/download-artifact@v5
with:
name: sdist
path: ./sdist
- name: Build and Install OpenTimelineIO
run: |
python -m pip install sdist/opentimelineio-*.tar.gz -v --break-system-packages
- name: Install python dev dependencies
run: |
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
- name: Get source
uses: actions/checkout@v4
- name: Install test dependencies
run: |
python -m pip install --break-system-packages --upgrade -r tests/requirements.txt
- name: Run tests w/ python coverage
run: make ci-postbuild

package_wheels:
needs: py_build_test
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -182,6 +216,8 @@ jobs:
python-build: ["cp39", "cp310", "cp311", "cp312", "cp313"]
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Build wheels (Python 3)
uses: pypa/[email protected]
Expand All @@ -200,8 +236,50 @@ jobs:
name: wheel-${{ matrix.os }}-${{ matrix.python-build }}
path: ./wheelhouse/*.whl

test_wheels:
needs: package_wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- { os: ubuntu-latest, shell: bash }
- { os: macos-latest, shell: bash }
- { os: macos-14, shell: bash }
- { os: windows-latest, shell: pwsh }
exclude:
- { os: macos-latest, python-version: 3.9 }

defaults:
run:
shell: "${{ matrix.shell }} {0}"

env:
OTIO_CXX_COVERAGE_BUILD: 'ON'
OTIO_CXX_BUILD_TMP_DIR: ${{ github.workspace }}/build

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
if: matrix.python-version != 'mingw64'
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install python build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest && python -m pip install --upgrade -r tests/requirements.txt
- uses: actions/download-artifact@v5
with:
pattern: wheel-${{ matrix.os }}-*
path: 'wheelhouse'
merge-multiple: true
- name: Install wheel for environment
run: pip install --no-cache-dir --no-index --find-links wheelhouse opentimelineio
- name: Run tests w/ python coverage
run: make ci-postbuild

package_sdist:
needs: py_build_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ccend = $(shell echo "\033[0m")
# Helpful link to install development dependencies declared in setup.py
define dev_deps_message
$(ccred)You can install this and other development dependencies with$(newline)$(ccend)\
$(ccblue) pip install -e .[dev]$(newline)$(ccend)
$(ccblue) pip install -e . && pip install -r tests/requirements.txt$(newline)$(ccend)
endef

# variables
Expand Down
8 changes: 0 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,6 @@ def run(self):
),
],
},
extras_require={
'dev': [
'check-manifest',
'flake8>=3.5',
'coverage>=4.5',
'urllib3>=1.24.3'
],
},

# because we need to open() the adapters manifest, we aren't zip-safe
zip_safe=False,
Expand Down
4 changes: 4 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
check-manifest
flake8>=3.5
coverage>=4.5
urllib3>=1.24.3
Loading