13
13
- main
14
14
15
15
jobs :
16
- test-arm :
17
- runs-on : self-hosted
18
- env :
19
- DISPLAY : :0
20
- PYTEST_ADDOPTS : " --color=yes" # colors in pytest
21
- strategy :
22
- fail-fast : false
23
- matrix :
24
- python : ['3.7.12', '3.10.2']
25
- steps :
26
- - name : Checkout the repository
27
- uses : actions/checkout@v2
28
-
29
- - name : Check Runner
30
- run : |
31
- which latex
32
- which ffmpeg
33
- latex --version
34
- ffmpeg -version
35
- which python
36
- python --version
37
-
38
- - name : Activate Python ${{ matrix.python }}
39
- run : |
40
- echo "/root/.pyenv/versions/${{ matrix.python }}/bin:/root/.poetry/bin:$PATH" > $GITHUB_PATH
41
-
42
- - name : Show Python Version
43
- run : |
44
- python --version --version
45
-
46
- - name : Install Manim
47
- run : |
48
- poetry install
49
-
50
- - name : Run tests
51
- run : |
52
- poetry run pytest
53
-
54
- - name : Run module doctests
55
- run : |
56
- poetry run pytest --cov-append --doctest-modules --ignore-glob="*opengl*" manim
57
-
58
- - name : Run doctests in rst files
59
- run : |
60
- cd docs && pip install -r requirements.txt && poetry run make doctest O=-tskip-manim
61
-
62
-
63
16
test :
64
17
runs-on : ${{ matrix.os }}
65
18
env :
66
19
DISPLAY : :0
67
20
PYTEST_ADDOPTS : " --color=yes" # colors in pytest
68
- GLCONTEXT_WIN_LIBGL : C:\msys64\mingw64\bin\opengl32.dll
69
21
strategy :
70
22
fail-fast : false
71
23
matrix :
72
- os : [ubuntu-latest , macos-latest, windows-latest]
73
- python : ['3.7', '3.8', '3.9', '3.10' ]
24
+ os : [ubuntu-22.04 , macos-latest, windows-latest]
25
+ python : ["3.8", "3.9", "3.10", "3.11" ]
74
26
75
27
steps :
76
28
- name : Checkout the repository
77
- uses : actions/checkout@v2
29
+ uses : actions/checkout@v3
30
+
31
+ - name : Install Poetry
32
+ run : |
33
+ pipx install "poetry==1.5.*"
34
+ poetry config virtualenvs.prefer-active-python true
78
35
79
36
- name : Setup Python ${{ matrix.python }}
80
- uses : actions/setup-python@v2
37
+ uses : actions/setup-python@v4
81
38
with :
82
39
python-version : ${{ matrix.python }}
83
-
84
- - name : Install Poetry
85
- run : |
86
- pip install --user poetry
40
+ cache : " poetry"
87
41
88
42
- name : Setup macOS PATH
89
43
if : runner.os == 'macOS'
@@ -94,33 +48,38 @@ jobs:
94
48
shell : bash
95
49
id : cache-vars
96
50
run : |
97
- echo "::set-output name=poetry-venv-dir::$(poetry config virtualenvs.path)"
98
- echo "::set-output name=date::$(/bin/date -u "+%m%w%Y")"
99
-
100
- - name : Setup Poetry cache
101
- uses : actions/cache@v2
102
- with :
103
- path : ${{ steps.cache-vars.outputs.poetry-venv-dir }}
104
- key : ${{ runner.os }}-poetry-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
51
+ echo "date=$(/bin/date -u "+%m%w%Y")" >> $GITHUB_OUTPUT
105
52
106
53
- name : Install and cache ffmpeg (all OS)
107
- uses : FedericoCarboni/setup-ffmpeg@v1.1.0
54
+ uses : FedericoCarboni/setup-ffmpeg@v2
108
55
with :
109
56
token : ${{ secrets.GITHUB_TOKEN }}
110
57
id : setup-ffmpeg
111
58
112
59
- name : Install system dependencies (Linux)
60
+ if : runner.os == 'Linux'
61
+ uses : awalsh128/cache-apt-pkgs-action@latest
62
+ with :
63
+ packages : python3-opengl libpango1.0-dev xvfb
64
+ version : 1.0
65
+
66
+ - name : Install Texlive (Linux)
67
+ if : runner.os == 'Linux'
68
+ uses : teatimeguest/setup-texlive-action@v2
69
+ with :
70
+ cache : true
71
+ packages : scheme-basic fontspec inputenc fontenc tipa mathrsfs calligra xcolor standalone preview doublestroke ms everysel setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english gnu-freefont mathastext cbfonts-fd xetex
72
+
73
+ - name : Start virtual display (Linux)
113
74
if : runner.os == 'Linux'
114
75
run : |
115
- sudo apt update
116
- sudo apt-get -y install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa python-opengl libpango1.0-dev xvfb
117
76
# start xvfb in background
118
77
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
119
78
120
79
- name : Setup macOS cache
80
+ uses : actions/cache@v3
121
81
id : cache-macos
122
82
if : runner.os == 'macOS'
123
- uses : actions/cache@v2
124
83
with :
125
84
path : ${{ github.workspace }}/macos-cache
126
85
key : ${{ runner.os }}-dependencies-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.cache-vars.outputs.date }}-1
@@ -159,20 +118,12 @@ jobs:
159
118
- name : Setup Windows cache
160
119
id : cache-windows
161
120
if : runner.os == 'Windows'
162
- uses : actions/cache@v2
121
+ uses : actions/cache@v3
163
122
with :
164
123
path : ${{ github.workspace }}\ManimCache
165
124
key : ${{ runner.os }}-dependencies-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.cache-vars.outputs.date }}-1
166
125
167
- - name : Setup MSYS2 (Windows)
168
- if : runner.os == 'Windows'
169
- uses : msys2/setup-msys2@v2
170
- with :
171
- release : false
172
- msystem : MINGW64
173
- path-type : inherit
174
- install : >-
175
- mingw-w64-x86_64-mesa
126
+ - uses : ssciwr/setup-mesa-dist-win@v1
176
127
177
128
- name : Install system dependencies (Windows)
178
129
if : runner.os == 'Windows' && steps.cache-windows.outputs.cache-hit != 'true'
@@ -182,7 +133,7 @@ jobs:
182
133
echo "Install Tinytex"
183
134
Invoke-WebRequest "https://github.com/yihui/tinytex-releases/releases/download/daily/TinyTeX-1.zip" -O "$($env:TMP)\TinyTex.zip"
184
135
Expand-Archive -LiteralPath "$($env:TMP)\TinyTex.zip" -DestinationPath "$($PWD)\ManimCache\LatexWindows"
185
- $env:Path = "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32 ;$($env:PATH)"
136
+ $env:Path = "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\windows ;$($env:PATH)"
186
137
tlmgr update --self
187
138
foreach ($c in $tinyTexPackages){
188
139
$c=$c.Trim()
@@ -194,27 +145,23 @@ jobs:
194
145
- name : Add Windows dependencies to PATH
195
146
if : runner.os == 'Windows'
196
147
run : |
197
- $env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32 "
148
+ $env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\windows "
198
149
$env:Path = "$env:USERPROFILE\.poetry\bin;$($env:PATH)"
199
- $env:PATH = "C:\msys64\mingw64\bin;$($env:PATH)"
200
150
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
201
151
202
152
- name : Install manim
203
153
run : |
204
- poetry config experimental.new-installer false
154
+ poetry config installer.modern-installation false
205
155
poetry install
206
156
207
157
- name : Run tests
208
158
run : |
209
- poetry run pytest
159
+ poetry run python -m pytest
210
160
211
161
- name : Run module doctests
212
162
run : |
213
- poetry run pytest -- cov-append --doctest-modules -- ignore-glob="*opengl*" manim
163
+ poetry run python -m pytest -v -- cov-append --ignore-glob="*opengl*" --doctest-modules manim
214
164
215
165
- name : Run doctests in rst files
216
166
run : |
217
- cd docs && pip install -r requirements.txt && poetry run make doctest O=-tskip-manim
218
-
219
- - name : Upload coverage
220
- uses : codecov/codecov-action@v1
167
+ cd docs && poetry run make doctest O=-tskip-manim
0 commit comments