Skip to content

Commit 857a44e

Browse files
committed
Auto-format YAML
Signed-off-by: Joshua Minor <[email protected]>
1 parent bd9ccb0 commit 857a44e

File tree

1 file changed

+132
-132
lines changed

1 file changed

+132
-132
lines changed

.github/workflows/python-package.yml

Lines changed: 132 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ env:
1111

1212
on:
1313
push:
14-
branches: [ main ]
14+
branches: [main]
1515
pull_request:
16-
branches: [ main ]
16+
branches: [main]
1717

1818
concurrency:
1919
group: ${{ github.workflow }}-${{ github.ref }}
@@ -28,14 +28,14 @@ jobs:
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-13
38+
OTIO_TEST_TARGET: test
3939

4040
env:
4141
OTIO_BUILD_CONFIG: Release
@@ -44,148 +44,148 @@ 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 --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 '*/usr/*' --output-file=coverage.filtered.info -q
71-
lcov --remove coverage.filtered.info '*/deps/*' --output-file=coverage.filtered.info -q
72-
lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q
73-
lcov --list coverage.filtered.info
74-
# \todo Should the Codecov web pages show the results of the C++ or Python tests?
75-
# - name: Upload coverage to Codecov
76-
# if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
77-
# uses: codecov/[email protected]
78-
# with:
79-
# files: ${{ env.OTIO_BUILD_DIR }}/coverage.filtered.info
80-
# flags: unittests
81-
# name: opentimelineio-codecov
82-
# fail_ci_if_error: true
83-
- name: Install
84-
run: |
85-
cd ${{ env.OTIO_BUILD_DIR }}
86-
cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }}
87-
- name: Consumer tests
88-
run: |
89-
cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
90-
cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
91-
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 --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 '*/usr/*' --output-file=coverage.filtered.info -q
71+
lcov --remove coverage.filtered.info '*/deps/*' --output-file=coverage.filtered.info -q
72+
lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q
73+
lcov --list coverage.filtered.info
74+
# \todo Should the Codecov web pages show the results of the C++ or Python tests?
75+
# - name: Upload coverage to Codecov
76+
# if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
77+
# uses: codecov/[email protected]
78+
# with:
79+
# files: ${{ env.OTIO_BUILD_DIR }}/coverage.filtered.info
80+
# flags: unittests
81+
# name: opentimelineio-codecov
82+
# fail_ci_if_error: true
83+
- name: Install
84+
run: |
85+
cd ${{ env.OTIO_BUILD_DIR }}
86+
cmake --build . --target install --config ${{ env.OTIO_BUILD_CONFIG }}
87+
- name: Consumer tests
88+
run: |
89+
cmake -E make_directory ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
90+
cd ${{ env.OTIO_CONSUMER_TEST_BUILD_DIR }}
91+
cmake ${{ github.workspace }}/tests/consumer -DCMAKE_PREFIX_PATH=${{ env.OTIO_INSTALL_DIR }}
9292
9393
py_build_test:
9494
runs-on: ${{ matrix.os }}
9595
strategy:
9696
fail-fast: false
9797
matrix:
9898
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
99-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
99+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
100100
include:
101101
- { os: ubuntu-latest, shell: bash }
102102
- { os: macos-latest, shell: bash }
103103
- { os: macos-13, shell: bash }
104104
- { os: windows-latest, shell: pwsh }
105-
- { os: windows-latest, shell: msys2, python-version: 'mingw64' }
105+
- { os: windows-latest, shell: msys2, python-version: "mingw64" }
106106
exclude:
107107
- { os: macos-latest, python-version: 3.7 }
108108
- { os: macos-latest, python-version: 3.8 }
109109
- { os: macos-latest, python-version: 3.9 }
110110

111111
defaults:
112112
run:
113-
shell: '${{ matrix.shell }} {0}'
113+
shell: "${{ matrix.shell }} {0}"
114114

115115
env:
116116
OTIO_CXX_COVERAGE_BUILD: ON
117117
OTIO_CXX_BUILD_TMP_DIR: ${{ github.workspace }}/build
118118

119119
steps:
120-
- uses: actions/checkout@v4
121-
with:
122-
submodules: 'recursive'
123-
- name: Set up MSYS2
124-
if: matrix.python-version == 'mingw64'
125-
uses: msys2/setup-msys2@v2
126-
with:
127-
msystem: mingw64
128-
install: >-
129-
mingw-w64-x86_64-python
130-
mingw-w64-x86_64-python-pip
131-
mingw-w64-x86_64-gcc
132-
mingw-w64-x86_64-cmake
133-
make
134-
git
135-
- name: Ensure MSYS2 pip is updated
136-
if: matrix.python-version == 'mingw64'
137-
run: curl -sS https://bootstrap.pypa.io/get-pip.py | python
138-
- name: Set up Python ${{ matrix.python-version }}
139-
if: matrix.python-version != 'mingw64'
140-
uses: actions/[email protected]
141-
with:
142-
python-version: ${{ matrix.python-version }}
143-
- name: Install coverage dependency
144-
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
145-
run: |
146-
echo 'OTIO_CXX_DEBUG_BUILD=1' >> $GITHUB_ENV
147-
sudo apt-get install lcov
148-
- name: Install python build dependencies
149-
run: |
150-
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
151-
- name: Run check-manifest and lint check
152-
run: make ci-prebuild
153-
- name: Build and Install
154-
run: |
155-
# compile and install into virtualenv/virtual machine (verbosely)
156-
pip install .[dev] -v
157-
- name: Run tests w/ python coverage
158-
run: make ci-postbuild
159-
160-
# if tests fail, run tmate for remote debugging session
161-
- name: Setup tmate session
162-
if: ${{ failure() }}
163-
uses: mxschmitt/action-tmate@v3
164-
165-
# (only on ubuntu/pyhton3.7)
166-
- name: Generate C++ coverage report
167-
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
168-
run: make lcov
169-
- name: Upload coverage to Codecov
170-
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
171-
uses: codecov/codecov-action@v4
172-
with:
173-
flags: py-unittests
174-
name: py-opentimelineio-codecov
175-
fail_ci_if_error: false
176-
env:
177-
# based on: https://github.com/codecov/codecov-action?tab=readme-ov-file#usage
178-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
120+
- uses: actions/checkout@v4
121+
with:
122+
submodules: "recursive"
123+
- name: Set up MSYS2
124+
if: matrix.python-version == 'mingw64'
125+
uses: msys2/setup-msys2@v2
126+
with:
127+
msystem: mingw64
128+
install: >-
129+
mingw-w64-x86_64-python
130+
mingw-w64-x86_64-python-pip
131+
mingw-w64-x86_64-gcc
132+
mingw-w64-x86_64-cmake
133+
make
134+
git
135+
- name: Ensure MSYS2 pip is updated
136+
if: matrix.python-version == 'mingw64'
137+
run: curl -sS https://bootstrap.pypa.io/get-pip.py | python
138+
- name: Set up Python ${{ matrix.python-version }}
139+
if: matrix.python-version != 'mingw64'
140+
uses: actions/[email protected]
141+
with:
142+
python-version: ${{ matrix.python-version }}
143+
- name: Install coverage dependency
144+
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
145+
run: |
146+
echo 'OTIO_CXX_DEBUG_BUILD=1' >> $GITHUB_ENV
147+
sudo apt-get install lcov
148+
- name: Install python build dependencies
149+
run: |
150+
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
151+
- name: Run check-manifest and lint check
152+
run: make ci-prebuild
153+
- name: Build and Install
154+
run: |
155+
# compile and install into virtualenv/virtual machine (verbosely)
156+
pip install .[dev] -v
157+
- name: Run tests w/ python coverage
158+
run: make ci-postbuild
159+
160+
# if tests fail, run tmate for remote debugging session
161+
- name: Setup tmate session
162+
if: ${{ failure() }}
163+
uses: mxschmitt/action-tmate@v3
164+
165+
# (only on ubuntu/pyhton3.7)
166+
- name: Generate C++ coverage report
167+
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
168+
run: make lcov
169+
- name: Upload coverage to Codecov
170+
if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
171+
uses: codecov/codecov-action@v4
172+
with:
173+
flags: py-unittests
174+
name: py-opentimelineio-codecov
175+
fail_ci_if_error: false
176+
env:
177+
# based on: https://github.com/codecov/codecov-action?tab=readme-ov-file#usage
178+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
179179

180180
package_wheels:
181181
needs: py_build_test
182182
runs-on: ${{ matrix.os }}
183183
strategy:
184184
matrix:
185185
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
186-
python-build: ['cp37*', 'cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*']
186+
python-build: ["cp37*", "cp38*", "cp39*", "cp310*", "cp311*", "cp312*"]
187187
exclude:
188-
- { os: macos-latest, python-build: 'cp37*' }
188+
- { os: macos-latest, python-build: "cp37*" }
189189
steps:
190190
- uses: actions/checkout@v4
191191

@@ -199,7 +199,7 @@ jobs:
199199
output-dir: wheelhouse
200200
env:
201201
CIBW_BUILD: ${{ matrix.python-build }}
202-
CIBW_SKIP: '*musllinux*'
202+
CIBW_SKIP: "*musllinux*"
203203
CIBW_ARCHS_LINUX: x86_64 aarch64
204204
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
205205
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
@@ -213,19 +213,19 @@ jobs:
213213
needs: py_build_test
214214
runs-on: ubuntu-latest
215215
steps:
216-
- uses: actions/checkout@v4
217-
with:
218-
submodules: 'recursive'
216+
- uses: actions/checkout@v4
217+
with:
218+
submodules: "recursive"
219219

220-
- uses: actions/[email protected]
220+
- uses: actions/[email protected]
221221

222-
- name: Install pypa/build
223-
run: python -m pip install build --user
222+
- name: Install pypa/build
223+
run: python -m pip install build --user
224224

225-
- name: Generate sdist
226-
run: python -m build -s .
225+
- name: Generate sdist
226+
run: python -m build -s .
227227

228-
- uses: actions/upload-artifact@v3
229-
with:
230-
name: sdist
231-
path: dist
228+
- uses: actions/upload-artifact@v3
229+
with:
230+
name: sdist
231+
path: dist

0 commit comments

Comments
 (0)