mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 14:19:52 +08:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
170 lines
4.8 KiB
YAML
170 lines
4.8 KiB
YAML
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
name: Tests
|
|
|
|
jobs:
|
|
pytest:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pyversion: ['3.8', '3.9', '3.10', '3.11']
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
QT_QPA_PLATFORM: offscreen
|
|
MANIM_SLIDES_VERBOSITY: debug
|
|
PYTHONFAULTHANDLER: 1
|
|
DISPLAY: :99
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Poetry
|
|
run: pipx install poetry
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.pyversion }}
|
|
cache: poetry
|
|
|
|
- name: Run apt-get update on Ubuntu
|
|
run: sudo apt-get update
|
|
|
|
- name: Install manim dependencies on Ubuntu
|
|
run: |
|
|
sudo apt-get install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev
|
|
|
|
- name: Install xvfb on Ubuntu
|
|
run: |
|
|
sudo apt-get install xvfb
|
|
nohup Xvfb $DISPLAY &
|
|
|
|
- name: Install Manim Slides
|
|
run: |
|
|
poetry install --with test
|
|
|
|
- name: Run pytest
|
|
run: poetry run pytest -x -n auto
|
|
|
|
build-examples:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
manim: [manim, manimgl]
|
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
|
pyversion: ['3.8', '3.9', '3.10', '3.11']
|
|
exclude:
|
|
# excludes manimgl on Windows because if throws errors
|
|
# related to OpenGL, which seems hard to fix:
|
|
# Your graphics drivers do not support OpenGL 2.0.
|
|
- os: windows-latest
|
|
manim: manimgl
|
|
# We only test Python 3.11 on Windows and MacOS
|
|
- os: windows-latest
|
|
pyversion: '3.8'
|
|
- os: windows-latest
|
|
pyversion: '3.9'
|
|
- os: windows-latest
|
|
pyversion: '3.10'
|
|
manim: manim
|
|
- os: macos-latest
|
|
pyversion: '3.8'
|
|
- os: macos-latest
|
|
pyversion: '3.9'
|
|
- os: macos-latest
|
|
pyversion: '3.10'
|
|
manim: manim
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
QT_QPA_PLATFORM: offscreen
|
|
MANIM_SLIDES_VERBOSITY: debug
|
|
PYTHONFAULTHANDLER: 1
|
|
DISPLAY: :99
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Poetry
|
|
run: pipx install poetry
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.pyversion }}
|
|
cache: poetry
|
|
|
|
# Path related stuff
|
|
- name: Append to Path on MacOS
|
|
if: matrix.os == 'macos-latest'
|
|
run: |
|
|
echo "${HOME}/.local/bin" >> $GITHUB_PATH
|
|
echo "/Users/runner/Library/Python/${{ matrix.pyversion }}/bin" >> $GITHUB_PATH
|
|
|
|
- name: Append to Path on Ubuntu
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
|
|
|
|
- name: Append to Path on Windows
|
|
if: matrix.os == 'windows-latest'
|
|
run: echo "${HOME}/.local/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
|
|
# OS depedencies
|
|
- name: Install manim dependencies on MacOs
|
|
if: matrix.os == 'macos-latest' && matrix.manim == 'manim'
|
|
run: brew install ffmpeg py3cairo
|
|
|
|
- name: Install manimgl dependencies on MacOS
|
|
if: matrix.os == 'macos-latest' && matrix.manim == 'manimgl'
|
|
run: brew install ffmpeg
|
|
|
|
- name: Run apt-get update on Ubuntu
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: sudo apt-get update
|
|
|
|
- name: Install manim dependencies on Ubuntu
|
|
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manim'
|
|
run: |
|
|
sudo apt-get install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev
|
|
|
|
- name: Install manimgl dependencies on Ubuntu
|
|
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manimgl'
|
|
run: |
|
|
sudo apt-get install libpango1.0-dev ffmpeg freeglut3-dev
|
|
|
|
- name: Install xvfb on Ubuntu
|
|
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manimgl'
|
|
run: |
|
|
sudo apt-get install xvfb
|
|
nohup Xvfb $DISPLAY &
|
|
|
|
- name: Install Windows dependencies
|
|
if: matrix.os == 'windows-latest'
|
|
run: choco install ffmpeg
|
|
|
|
# Install Manim Slides
|
|
- name: Install Manim Slides
|
|
run: |
|
|
poetry install --extras ${{ matrix.manim }}
|
|
|
|
# Render slides
|
|
- name: Render slides
|
|
if: matrix.manim == 'manim'
|
|
run: poetry run manim -ql example.py BasicExample ThreeDExample
|
|
|
|
- name: Render slides
|
|
if: matrix.manim == 'manimgl'
|
|
run: poetry run -v manimgl -l example.py BasicExample ThreeDExample
|
|
|
|
# Play slides
|
|
- name: Test slides
|
|
run: poetry run manim-slides BasicExample ThreeDExample --skip-all
|
|
|
|
# Test slides to html
|
|
- name: Test convert on Ubuntu
|
|
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manim'
|
|
run: |
|
|
poetry run manim -ql example.py ConvertExample
|
|
poetry run manim-slides convert --to=html ConvertExample index.html
|