Skip to content

Commit

Permalink
Merge branch 'AcademySoftwareFoundation:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelPlug authored Aug 5, 2023
2 parents 34b8bb9 + eaf8569 commit 57848b4
Show file tree
Hide file tree
Showing 366 changed files with 12,244 additions and 22,735 deletions.
8 changes: 4 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
# AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
# AllowAllConstructorInitializersOnNextLine: true
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
Expand Down Expand Up @@ -39,7 +39,7 @@ BraceWrapping:
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ If no new tests are introduced as part of this PR, note the tests that are provi

<!--
Important: If this is your first contribution to OpenTimelineIO, you will need to submit a Contributor License Agreement. For a step-by-step instructions on the pull request process, see
https://github.com/PixarAnimationStudios/OpenTimelineIO/tree/main/CONTRIBUTING.md
https://github.com/AcademySoftwareFoundation/OpenTimelineIO/tree/main/CONTRIBUTING.md
-->
105 changes: 105 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: docs

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- uses: actions/[email protected]
with:
python-version: '3.10'

- name: Create virtualenv
run: python3 -m venv .venv

- name: Install dependencies
run: |
source .venv/bin/activate
python -m pip install .
python -m pip install -r docs/requirements.txt
- name: Linkcheck
working-directory: docs
run: |
source ../.venv/bin/activate
set +e
make linkcheck
exit_code=$?
set -e
if [ $exit_code -eq 0 ]; then
echo -e "\n\n=================\nAll links are valid!"
echo "# :heavy_check_mark: Sphinx links" >> $GITHUB_STEP_SUMMARY
echo "All links are valid!" >> $GITHUB_STEP_SUMMARY
else
echo -e "\n\n=================\nFound broken links. Look at the build logs.\n"
echo "# :x: Sphinx links" >> $GITHUB_STEP_SUMMARY
echo "Found broken links. Look at the build logs for additional information." >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat _build/linkcheck/output.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
fi
exit $exit_code
check-warnings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- uses: actions/[email protected]
with:
python-version: '3.10'

- name: Create virtualenv
run: python3 -m venv .venv

- name: Install dependencies
run: |
source .venv/bin/activate
python -m pip install .
python -m pip install -r docs/requirements.txt
- name: Check warnings/errors
working-directory: docs
run: |
source ../.venv/bin/activate
set +e
make htmlstrict
exit_code=$?
set -e
if [ $exit_code -eq 0 ]; then
echo -e "\n\n=================\nNo warnings or errors detected!"
echo "# :heavy_check_mark: Sphinx warnings/errors" >> $GITHUB_STEP_SUMMARY
echo "No errors or warnings detected!" >> $GITHUB_STEP_SUMMARY
else
echo -e "\n\n=================\nWarnings and or errors detected; See the summary bellow:\n"
cat _build/htmlstrict/output.txt
echo "# :x: Sphinx warnings/errors" >> $GITHUB_STEP_SUMMARY
echo "Found some warnings or errors:" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat _build/htmlstrict/output.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
fi
exit $exit_code
86 changes: 45 additions & 41 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cpp_build:
runs-on: ${{ matrix.os }}
Expand All @@ -35,6 +39,7 @@ jobs:
OTIO_BUILD_CONFIG: Release
OTIO_BUILD_DIR: ${{ github.workspace }}/build
OTIO_INSTALL_DIR: ${{ github.workspace }}/install
OTIO_CONSUMER_TEST_BUILD_DIR: ${{ github.workspace }}/consumertest

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -67,7 +72,7 @@ jobs:
# \todo Should the Codecov web pages show the results of the C++ or Python tests?
# - name: Upload coverage to Codecov
# if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
# uses: codecov/codecov-action@v2.1.0
# uses: codecov/codecov-action@v3.1.1
# with:
# files: ${{ env.OTIO_BUILD_DIR }}/coverage.filtered.info
# flags: unittests
Expand All @@ -77,13 +82,27 @@ jobs:
run: |
cd ${{ env.OTIO_BUILD_DIR }}
cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }}
- name: Consumer tests
run: |
cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
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 }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['2.7', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
include:
- { os: ubuntu-latest, shell: bash }
- { os: macos-latest, shell: bash }
- { os: windows-latest, shell: pwsh }
- { os: windows-latest, shell: msys2, python-version: 'mingw64' }

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

env:
OTIO_CXX_COVERAGE_BUILD: ON
Expand All @@ -93,20 +112,31 @@ jobs:
- uses: actions/checkout@v3
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 }}
uses: actions/setup-python@v3
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
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
- name: install mock for python 2.7 tests only
if: matrix.python-version == 2.7
run: python -m pip install --upgrade mock
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
- name: Run check-manifest and lint check
run: make ci-prebuild
- name: Build and Install
Expand All @@ -121,7 +151,7 @@ jobs:
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@v2.1.0
uses: codecov/codecov-action@v3.1.1
with:
flags: py-unittests
name: py-opentimelineio-codecov
Expand All @@ -133,47 +163,21 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-build: ['cp27*', 'cp37*', 'cp38*', 'cp39*', 'cp310*']
python-build: ['cp37*', 'cp38*', 'cp39*', 'cp310*', 'cp311*']
steps:
- uses: actions/checkout@v3

# cibuildwheel 1.12.0 gates Python 2.7 wheels builds
# by using two environment variables, DISTUTILS_USE_SDK and MSSdk.
# https://cibuildwheel.readthedocs.io/en/1.x/cpp_standards/#windows-and-python-27
# Note that normally these are used by setuptools/distutils, but in our case
# they are really just used for cibuildwheel as we don't use any of the
# setuptools/distutils build tools. Our builds are entirely handled
# by CMake. CMake is able to find the right toolchain, thanks to
# the -A argument that we specify in the setup.py to set the
# target platform (x86, x64, etc).
- name: Set Windows Python 2.7 environment variables
if: matrix.python-build == 'cp27*' && runner.os == 'Windows'
shell: bash
run: |
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
echo "MSSdk=1" >> $GITHUB_ENV
- name: Build wheels (Python 2.7)
if: matrix.python-build == 'cp27*'
# cibuildwheel 1.12.0 is the last release that supported Python 2.7.
uses: pypa/[email protected]
with:
output-dir: wheelhouse
env:
CIBW_BUILD: ${{ matrix.python-build }}

- name: Build wheels (Python 3)
uses: pypa/[email protected]
if: matrix.python-build != 'cp27*'
uses: pypa/[email protected]
with:
output-dir: wheelhouse
env:
CIBW_BUILD: ${{ matrix.python-build }}
CIBW_SKIP: '*musllinux*'
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
Expand All @@ -186,15 +190,15 @@ jobs:
with:
submodules: 'recursive'

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4.3.0

- name: Install pypa/build
run: python -m pip install build --user

- name: Generate sdist
run: python -m build -s .

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: sdist
path: dist
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ htmlcov
.vscode/
xcuserdata/
.venv/
.cache

# Pycharm metadata
.idea/

# These files are generated, don't put them into source control
docs/api
docs/_build
.tox
cpp_cov_html/
lcov_html_report/
*.so
*.pyd
15 changes: 6 additions & 9 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@
version: 2

build:
image: latest
os: "ubuntu-20.04"
tools:
python: "3.10"

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- cmake
- method: pip
path: .
- requirements: docs/requirements.txt

submodules:
include: all
recursive: true

conda:
environment: readthedocs-conda.yml
22 changes: 3 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
cmake_minimum_required(VERSION 3.18.2)

#------------------------------------------------------------------------------
# Project Meta data
# Project Metadata
# TODO: read this information from a configuration file, here, and in setup.py

set(OTIO_VERSION_MAJOR "0")
set(OTIO_VERSION_MINOR "14")
set(OTIO_VERSION_MINOR "16")
set(OTIO_VERSION_PATCH "0")
set(OTIO_VERSION ${OTIO_VERSION_MAJOR}.${OTIO_VERSION_MINOR}.${OTIO_VERSION_PATCH})

Expand Down Expand Up @@ -114,18 +114,6 @@ else()
# Note that this has no effect on Windows.
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)

if(MSVC AND Python_VERSION_MAJOR VERSION_LESS 3)
# Statically link run-time library (vcruntime and msvcp)
# See https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=msvc-160
# This allows us to compile OTIO bindings with a newer MSVC version
# than the one used by the interpreter where OTIO will be installed.
# This is only required for Python < 3 because only these are
# compiled with an older compiler (9.0). CPython 3.5+ uses at least
# Visual C++ 14.X.
# See https://wiki.python.org/moin/WindowsCompilers#Which_Microsoft_Visual_C.2B-.2B-_compiler_to_use_with_a_specific_Python_version_.3F
add_compile_options(/MT)
endif()
endif()
endif()

Expand Down Expand Up @@ -181,11 +169,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
#------------------------------------------------------------------------------
# Fetch or refresh submodules if requested
#
# fetching submodules does not work in Travis, so override the OTIO_AUTOMATIC_SUBMODULES option
# TODO: Travis is no longer used for CI of OpenTimelineIO, so the ENV var that overrides
# the automatic submodule feature should be renamed.

if (OTIO_AUTOMATIC_SUBMODULES AND NOT DEFINED ENV{TRAVIS})
if (OTIO_AUTOMATIC_SUBMODULES)
# make sure that git submodules are up to date when building
find_package(Git QUIET)
if (GIT_FOUND)
Expand Down
Loading

0 comments on commit 57848b4

Please sign in to comment.