Skip to content

Commit

Permalink
chore(version): fixing all CI tests (#76)
Browse files Browse the repository at this point in the history
* fix(ci): add Ubuntu dep and change pip install

* fix(ci): typo

* fix(ci): add missing deps for Ubuntu

* fix(ci): typo in pkg name

* fix(ci): trying to install manimpango

* fix(ci): append bin to path on MacOS

* fix(ci): install Python setup tool

* try(ci): trying some stuff

* fix(ci): remove useless pkgs

* fix(ci): check manimpango and remove pyopengl

* try(ci): try fix

* try(ci): cleaner workflow

* fix(ci): missing dollar

* try(ci): minimal platform

* try(ci): test

* fix(ci): reset offscreen option

* fix(ci): add opengl dep

* fix(ci): xvfb for pyglet

* fix(ci): correctly set env var

* try(ci): set DISPLAY env var at the beginning

* test(ci): switch minimal to offscreen

* test(ci): remove QT debug env var

* try(ci): fixing manimgl issue

* Revert "try(ci): fixing manimgl issue"

This reverts commit f76c058.

* try(ci): manimgl to manim-render

* try(ci): verbose

* fix(ci): update linux deps

* fix(ci): typo

* fix(ci): typo in deps

* fix(ci): typo

* fix(ci): test other deps

* test(ci): install manimpango

* try(ci): test

* test(ci): print help

* test(ci): reset verbose mode

* fix(ci): typo

* chore(setup): use poetry

* chore(setup): cache installs

* fix(ci): swap order

* fix(ci): poetry install

* chore(setup): add manim/manimgl to dev-deps

* try(ci): some test

* try(ci): import two maybe conflicting packages

* fix(ci): typo in cmd

* fix(ci): only check if manimgl

* fix(ci): remove useless check
  • Loading branch information
jeertmans authored Dec 5, 2022
1 parent 8dfe600 commit 0565a99
Show file tree
Hide file tree
Showing 3 changed files with 2,060 additions and 72 deletions.
104 changes: 56 additions & 48 deletions .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ on:
pull_request:
paths:
- '**.py'
- '.github/workflows/test_examples.yml'
workflow_dispatch:

name: Test Examples

env:
QT_QPA_PLATFORM: offscreen
MANIM_SLIDES_VERBOSITY: debug
PYTHONFAULTHANDLER: 1
DISPLAY: ":99"

jobs:
build-examples:
Expand All @@ -24,9 +27,6 @@ jobs:
# Your graphics drivers do not support OpenGL 2.0.
- os: windows-latest
manim: manimgl
# manimgl seems to have problems with Python 3.11
- manim: manimgl
pyversion: '3.11'
# We only test Python 3.11 on Windows and MacOS
- os: windows-latest
pyversion: '3.8'
Expand All @@ -46,64 +46,72 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyversion }}
- name: Append to Path on MacOS and Ubuntu
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
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
- name: Install MacOS dependencies (manim only)

# OS depedencies
- name: Install manim dependencies on MacOs
if: matrix.os == 'macos-latest' && matrix.manim == 'manim'
run: brew install py3cairo
- name: Install MacOS dependencies
if: matrix.os == 'macos-latest'
run: brew install ffmpeg py3cairo
- name: Install manimgl dependencies on MacOS
if: matrix.os == 'macos-latest' && matrix.manim == 'manimgl'
run: brew install ffmpeg
- name: Install Ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev xvfb
- 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
- name: Install manim on MacOs
if: matrix.manim == 'manim' && matrix.os == 'macos-latest'
run: pip3 install --user manim
- name: Install manim on Ubuntu and Windows
if: matrix.manim == 'manim' && (matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest')
run: python -m pip install --user manim
- name: Install manimgl on MacOs
if: matrix.manim == 'manimgl' && matrix.os == 'macos-latest'
run: pip3 install --user manimgl
- name: Install manimgl on Ubuntu and Windows
if: matrix.manim == 'manimgl' && matrix.os != 'macos-latest'
run: python -m pip install --user manimgl
- name: Install manim-slides on MacOS
if: matrix.os == 'macos-latest'
run: pip3 install --user .
- name: Install manim-slides on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: xvfb-run -a -s "-screen 0 1400x900x24" python -m pip install --user .
- name: Install manim-slides on Windows
if: matrix.os == 'windows-latest'
run: pip3 install -e .
- name: Build slides with manim

# Install Manim Slides
- name: Install Manim Slides
run: |
poetry config experimental.new-installer false
poetry install
# Render slides
- name: Render slides
if: matrix.manim == 'manim'
run: python -m manim -ql example.py Example ThreeDExample ConvertExample
- name: Build slides with manimgl on Ubuntu
if: matrix.manim == 'manimgl' && matrix.os == 'ubuntu-latest'
run: xvfb-run -a -s "-screen 0 1400x900x24" manim-render -l example.py Example ThreeDExample
- name: Build slides with manimgl on MacOS or Windows
if: matrix.manim == 'manimgl' && (matrix.os == 'macos-latest' || matrix.os == 'windows-latest')
run: manimgl -l example.py Example ThreeDExample
- name: Test slides on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: xvfb-run -a -s "-screen 0 1400x900x24" manim-slides Example ThreeDExample --skip-all
- name: Test slides on MacOS or Windows
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
run: manim-slides Example ThreeDExample --skip-all
run: poetry run manim -ql example.py Example ThreeDExample
- name: Render slides
if: matrix.manim == 'manimgl'
run: poetry run -v manimgl -l example.py Example ThreeDExample

# Play slides
- name: Test slides
run: poetry run manim-slides Example ThreeDExample --skip-all

# Test slides to html
- name: Test convert on Ubuntu
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manim'
run: manim-slides convert --to=html ConvertExample index.html
run: |
poetry run manim -ql example.py ConvertExample
poetry run manim-slides convert --to=html ConvertExample index.html
Loading

0 comments on commit 0565a99

Please sign in to comment.