Skip to content

Commit 0565a99

Browse files
authored
chore(version): fixing all CI tests (#76)
* 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
1 parent 8dfe600 commit 0565a99

File tree

3 files changed

+2060
-72
lines changed

3 files changed

+2060
-72
lines changed

.github/workflows/test_examples.yml

+56-48
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ on:
22
pull_request:
33
paths:
44
- '**.py'
5+
- '.github/workflows/test_examples.yml'
56
workflow_dispatch:
67

78
name: Test Examples
89

910
env:
1011
QT_QPA_PLATFORM: offscreen
1112
MANIM_SLIDES_VERBOSITY: debug
13+
PYTHONFAULTHANDLER: 1
14+
DISPLAY: ":99"
1215

1316
jobs:
1417
build-examples:
@@ -24,9 +27,6 @@ jobs:
2427
# Your graphics drivers do not support OpenGL 2.0.
2528
- os: windows-latest
2629
manim: manimgl
27-
# manimgl seems to have problems with Python 3.11
28-
- manim: manimgl
29-
pyversion: '3.11'
3030
# We only test Python 3.11 on Windows and MacOS
3131
- os: windows-latest
3232
pyversion: '3.8'
@@ -46,64 +46,72 @@ jobs:
4646
steps:
4747
- name: Checkout repository
4848
uses: actions/checkout@v3
49+
- name: Install Poetry
50+
run: pipx install poetry
4951
- name: Install Python
5052
uses: actions/setup-python@v4
5153
with:
5254
python-version: ${{ matrix.pyversion }}
53-
- name: Append to Path on MacOS and Ubuntu
54-
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
55+
cache: 'poetry'
56+
57+
# Path related stuff
58+
- name: Append to Path on MacOS
59+
if: matrix.os == 'macos-latest'
60+
run: |
61+
echo "${HOME}/.local/bin" >> $GITHUB_PATH
62+
echo "/Users/runner/Library/Python/${{ matrix.pyversion }}/bin" >> $GITHUB_PATH
63+
- name: Append to Path on Ubuntu
64+
if: matrix.os == 'ubuntu-latest'
5565
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
5666
- name: Append to Path on Windows
5767
if: matrix.os == 'windows-latest'
5868
run: echo "${HOME}/.local/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
59-
- name: Install MacOS dependencies (manim only)
69+
70+
# OS depedencies
71+
- name: Install manim dependencies on MacOs
6072
if: matrix.os == 'macos-latest' && matrix.manim == 'manim'
61-
run: brew install py3cairo
62-
- name: Install MacOS dependencies
63-
if: matrix.os == 'macos-latest'
73+
run: brew install ffmpeg py3cairo
74+
- name: Install manimgl dependencies on MacOS
75+
if: matrix.os == 'macos-latest' && matrix.manim == 'manimgl'
6476
run: brew install ffmpeg
65-
- name: Install Ubuntu dependencies
66-
if: matrix.os == 'ubuntu-latest'
67-
run: sudo apt install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev xvfb
77+
- name: Install manim dependencies on Ubuntu
78+
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manim'
79+
run: |
80+
sudo apt-get install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev
81+
- name: Install manimgl dependencies on Ubuntu
82+
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manimgl'
83+
run: |
84+
sudo apt-get install libpango1.0-dev ffmpeg freeglut3-dev
85+
- name: Install xvfb on Ubuntu
86+
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manimgl'
87+
run: |
88+
sudo apt-get install xvfb
89+
nohup Xvfb $DISPLAY &
6890
- name: Install Windows dependencies
6991
if: matrix.os == 'windows-latest'
7092
run: choco install ffmpeg
71-
- name: Install manim on MacOs
72-
if: matrix.manim == 'manim' && matrix.os == 'macos-latest'
73-
run: pip3 install --user manim
74-
- name: Install manim on Ubuntu and Windows
75-
if: matrix.manim == 'manim' && (matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest')
76-
run: python -m pip install --user manim
77-
- name: Install manimgl on MacOs
78-
if: matrix.manim == 'manimgl' && matrix.os == 'macos-latest'
79-
run: pip3 install --user manimgl
80-
- name: Install manimgl on Ubuntu and Windows
81-
if: matrix.manim == 'manimgl' && matrix.os != 'macos-latest'
82-
run: python -m pip install --user manimgl
83-
- name: Install manim-slides on MacOS
84-
if: matrix.os == 'macos-latest'
85-
run: pip3 install --user .
86-
- name: Install manim-slides on Ubuntu
87-
if: matrix.os == 'ubuntu-latest'
88-
run: xvfb-run -a -s "-screen 0 1400x900x24" python -m pip install --user .
89-
- name: Install manim-slides on Windows
90-
if: matrix.os == 'windows-latest'
91-
run: pip3 install -e .
92-
- name: Build slides with manim
93+
94+
# Install Manim Slides
95+
- name: Install Manim Slides
96+
run: |
97+
poetry config experimental.new-installer false
98+
poetry install
99+
100+
# Render slides
101+
- name: Render slides
93102
if: matrix.manim == 'manim'
94-
run: python -m manim -ql example.py Example ThreeDExample ConvertExample
95-
- name: Build slides with manimgl on Ubuntu
96-
if: matrix.manim == 'manimgl' && matrix.os == 'ubuntu-latest'
97-
run: xvfb-run -a -s "-screen 0 1400x900x24" manim-render -l example.py Example ThreeDExample
98-
- name: Build slides with manimgl on MacOS or Windows
99-
if: matrix.manim == 'manimgl' && (matrix.os == 'macos-latest' || matrix.os == 'windows-latest')
100-
run: manimgl -l example.py Example ThreeDExample
101-
- name: Test slides on Ubuntu
102-
if: matrix.os == 'ubuntu-latest'
103-
run: xvfb-run -a -s "-screen 0 1400x900x24" manim-slides Example ThreeDExample --skip-all
104-
- name: Test slides on MacOS or Windows
105-
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
106-
run: manim-slides Example ThreeDExample --skip-all
103+
run: poetry run manim -ql example.py Example ThreeDExample
104+
- name: Render slides
105+
if: matrix.manim == 'manimgl'
106+
run: poetry run -v manimgl -l example.py Example ThreeDExample
107+
108+
# Play slides
109+
- name: Test slides
110+
run: poetry run manim-slides Example ThreeDExample --skip-all
111+
112+
# Test slides to html
107113
- name: Test convert on Ubuntu
108114
if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manim'
109-
run: manim-slides convert --to=html ConvertExample index.html
115+
run: |
116+
poetry run manim -ql example.py ConvertExample
117+
poetry run manim-slides convert --to=html ConvertExample index.html

0 commit comments

Comments
 (0)