Skip to content

Commit af7508e

Browse files
committed
created anindependent build and test task for platforms with no wheel distro (mingw)
Signed-off-by: Eric Reinecke <[email protected]>
1 parent 8154a0c commit af7508e

File tree

1 file changed

+54
-11
lines changed

1 file changed

+54
-11
lines changed

.github/workflows/python-package.yml

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,58 @@ jobs:
143143
token: ${{ secrets.CODECOV_TOKEN }}
144144
verbose: true
145145

146+
# This is for platforms where we build and test, but don't make wheels
147+
py_testonly_build:
148+
# Ideally this would be ${{ env.GH_COV_OS }} - but github doens't allow it
149+
runs-on: ${{ matrix.os }}
150+
os: [windows-latest]
151+
strategy:
152+
matrix:
153+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
154+
include:
155+
- { os: windows-latest, shell: msys2, python-version: "mingw64" }
156+
157+
defaults:
158+
run:
159+
shell: "${{ matrix.shell }} {0}"
160+
161+
env:
162+
OTIO_CXX_COVERAGE_BUILD: 'ON'
163+
OTIO_CXX_BUILD_TMP_DIR: ${{ github.workspace }}/build
164+
165+
steps:
166+
- uses: actions/checkout@v4
167+
with:
168+
submodules: "recursive"
169+
- name: Set up MSYS2
170+
if: matrix.python-version == 'mingw64'
171+
uses: msys2/setup-msys2@v2
172+
with:
173+
msystem: mingw64
174+
install: >-
175+
mingw-w64-x86_64-python
176+
mingw-w64-x86_64-python-pip
177+
mingw-w64-x86_64-gcc
178+
mingw-w64-x86_64-cmake
179+
make
180+
git
181+
- name: Set up Python ${{ matrix.python-version }}
182+
if: matrix.python-version != 'mingw64'
183+
uses: actions/[email protected]
184+
with:
185+
python-version: ${{ matrix.python-version }}
186+
- name: Install python build dependencies
187+
run: |
188+
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
189+
- name: Install test dependencies
190+
run: |
191+
python -m pip install --upgrade -r tests/requirements.txt
192+
- name: Build and Install OpenTimelineIO
193+
run: |
194+
python -m pip install . -v --break-system-packages
195+
- name: Run tests w/ python coverage
196+
run: make ci-postbuild
197+
146198
package_wheels:
147199
needs: py_smoketest_build
148200
runs-on: ${{ matrix.os }}
@@ -191,7 +243,6 @@ jobs:
191243
- { os: macos-latest, shell: bash }
192244
- { os: macos-14, shell: bash }
193245
- { os: windows-latest, shell: pwsh }
194-
- { os: windows-latest, shell: msys2, python-version: "mingw64" }
195246
exclude:
196247
- { os: macos-latest, python-version: 3.9 }
197248

@@ -205,29 +256,21 @@ jobs:
205256

206257
steps:
207258
- uses: actions/checkout@v4
208-
- name: Set up MSYS2
209-
if: matrix.python-version == 'mingw64'
210-
uses: msys2/setup-msys2@v2
211-
with:
212-
msystem: mingw64
213-
install: >-
214-
mingw-w64-x86_64-python
215-
mingw-w64-x86_64-python-pip
216259
- name: Set up Python ${{ matrix.python-version }}
217260
if: matrix.python-version != 'mingw64'
218261
uses: actions/[email protected]
219262
with:
220263
python-version: ${{ matrix.python-version }}
221264
- name: Install python build dependencies
222265
run: |
223-
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest && python -m pip install --upgrade --break-system-packages -r tests/requirements.txt
266+
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest && python -m pip install --upgrade -r tests/requirements.txt
224267
- uses: actions/download-artifact@v5
225268
with:
226269
pattern: wheel-${{ matrix.os }}-*
227270
path: 'wheelhouse'
228271
merge-multiple: true
229272
- name: Install wheel for environment
230-
run: pip install --no-cache-dir --break-system-packages --no-index --find-links wheelhouse opentimelineio
273+
run: pip install --no-cache-dir --no-index --find-links wheelhouse opentimelineio
231274
- name: Run tests w/ python coverage
232275
run: make ci-postbuild
233276

0 commit comments

Comments
 (0)