Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install FFMPEG with brew on Mac CI runners #214

Closed
wants to merge 9 commits into from
30 changes: 26 additions & 4 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,34 @@ jobs:
task: [black, ruff]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.x"

# Temporary fix for 'pip install imageio-ffmpeg'
# not including the FFMPEG binary on Apple Silicon macs
# This step can be removed when issue is fixed in imageio-ffmpeg
# https://github.com/imageio/imageio-ffmpeg/issues/71
- name: Setup FFmpeg
if: runner.name == 'macos-latest'
run: |
brew update
brew install ffmpeg

- name: Install dependencies
run: |
pip install --upgrade pip
pip install tox
- name: Run task

- name: Run tox
run: tox -e ${{ matrix.task }}

test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
Expand All @@ -64,6 +78,14 @@ jobs:
powershell gl-ci-helpers/appveyor/install_opengl.ps1
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}

# Temporary fix for 'pip install imageio-ffmpeg'
# not including the FFMPEG binary on Apple Silicon macs
# This step can be removed when issue is fixed in imageio-ffmpeg
# https://github.com/imageio/imageio-ffmpeg/issues/71
- name: Setup FFmpeg
if: runner.os == 'macOS'
uses: AnimMouse/setup-ffmpeg@v1

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -92,7 +114,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"


[tool.black]
target-version = ['py38', 'py39', 'py310', 'py311']
target-version = ['py39', 'py310', 'py311', 'py312']
line-length = 79
exclude = '''
(
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ classifiers =
Framework :: napari
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Operating System :: OS Independent
License :: OSI Approved :: BSD License

Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py{38,39,310,311}-{linux,macos,windows}-pyqt, py{38,39,310}-{linux,macos,windows}-pyside
envlist = py{39,310,311,312}-{linux,macos,windows}-pyqt, py{39,310}-{linux}-pyside

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[gh-actions:env]
PLATFORM =
Expand All @@ -34,12 +34,12 @@ deps =
pytest-xvfb ; sys_platform == 'linux'
commands = pytest -v --color=yes --cov=napari_animation --cov-report=xml

[testenv:py{38,39,310,311}-{linux,macos,windows}-pyqt]
[testenv:py{39,310,311,312}-{linux,macos,windows}-pyqt]
deps =
napari[pyqt5,testing]
lxml_html_clean # should only be needed till napari 0.5.0

[testenv:py{38,39,310}-{linux,macos,windows}-pyside]
[testenv:py{39,310}-{linux}-pyside]
deps =
napari[pyside2,testing]
lxml_html_clean # should only be needed till napari 0.5.0
Expand Down
Loading