1
1
name : CI
2
2
on :
3
3
push :
4
- branches :
5
- - master
4
+ branches :
5
+ - master
6
6
pull_request :
7
- branches :
8
- - master
7
+ branches :
8
+ - master
9
9
10
10
jobs :
11
11
test :
12
12
runs-on : ${{ matrix.os }}
13
13
env :
14
- POETRY_VIRTUALENVS_CREATE : false
14
+ POETRY_VIRTUALENVS_CREATE : false
15
15
strategy :
16
16
fail-fast : false
17
17
matrix :
18
18
os : [ubuntu-latest, macos-latest, windows-latest]
19
- python : [3.6,3.7, 3.8]
19
+ python : [3.6, 3.7, 3.8]
20
20
21
21
steps :
22
22
- name : Checkout the repository
36
36
shell : bash
37
37
id : pip-cache-and-time
38
38
run : |
39
- echo "::set-output name=dir::$(pip cache dir)"
40
- echo "::set-output name=date::$(/bin/date -u "+%m%Y")"
39
+ echo "::set-output name=dir::$(pip cache dir)"
40
+ echo "::set-output name=date::$(/bin/date -u "+%m%Y")"
41
41
42
42
- name : pip cache
43
43
uses : actions/cache@v2
@@ -56,10 +56,14 @@ jobs:
56
56
- name : Install system dependencies (MacOS)
57
57
if : runner.os == 'macOS'
58
58
run : |
59
- brew install openssl readline ffmpeg sox pyenv pyenv-virtualenv
59
+ brew install openssl readline ffmpeg pyenv pyenv-virtualenv
60
60
brew cask install basictex
61
61
eval "$(/usr/libexec/path_helper -s)"
62
62
sudo tlmgr update --self
63
+ brew install pkg-config
64
+ brew install libffi
65
+ brew install pango
66
+ brew install glib
63
67
sudo tlmgr install standalone preview doublestroke relsize fundus-calligra wasysym physics dvisvgm.x86_64-darwin dvisvgm rsfs wasy cm-super
64
68
echo "::add-path::$HOME/.poetry/bin"
65
69
echo "::set-env name=PATH::$PATH"
@@ -69,37 +73,40 @@ jobs:
69
73
if : runner.os == 'Windows'
70
74
uses : actions/cache@v2
71
75
with :
72
- path : ${{ github.workspace }}\ManimCache
73
- key : ${{ runner.os }}-dependencies-ffmpeg-sox -tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.pip-cache-and-time.outputs.date }}
76
+ path : ${{ github.workspace }}\ManimCache
77
+ key : ${{ runner.os }}-dependencies-ffmpeg-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.pip-cache-and-time.outputs.date }}
74
78
75
79
- name : Download system dependencies (Windows)
76
80
if : runner.os == 'Windows' && steps.cache-windows.outputs.cache-hit != 'true'
77
81
run : |
78
- $soxVersion = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['sox'])"
79
- $soxVersionNumber = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['sox'].split('-')[1])"
80
- $ffmpegVersion = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['ffmpeg'])"
81
- $ffmpegVersionNumber = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['ffmpeg'].split('-')[1])"
82
+ $ffmpegUrl = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['ffmpeg'])"
83
+ $pangoVersion = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['pango'])"
84
+ $tinyTexPackages = $(python -c "import json;print(' '.join(json.load(open('.github/manimdependency.json'))['windows']['tinytex']))") -Split ' '
82
85
$OriPath = $env:PATH
83
86
echo "Install Tinytex"
84
87
Invoke-WebRequest "https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip?job=image:%20Visual%20Studio%202019" -O "$($env:TMP)\TinyTex.zip"
85
88
Expand-Archive -LiteralPath "$($env:TMP)\TinyTex.zip" -DestinationPath "$($PWD)\ManimCache\LatexWindows"
86
89
$env:Path = "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32;$($env:PATH)"
87
- tlmgr install standalone preview doublestroke ms setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english
90
+ tlmgr update --self
91
+ foreach ($c in $tinyTexPackages){
92
+ $c=$c.Trim()
93
+ tlmgr install $c
94
+ }
88
95
$env:PATH=$OriPath
89
- echo "Completed Latex Install Sox"
90
- Invoke-WebRequest "https://downloads.sourceforge.net/project/sox/sox/$($soxVersionNumber)/$($soxVersion).zip" -UserAgent "wget" -O "$($env:TMP)\SoX.zip"
91
- 7z x "$($env:TMP)\SoX.zip" -o"$($PWD)\ManimCache"
92
- Move-Item "ManimCache\sox-*" "ManimCache\SoX"
93
- Invoke-WebRequest "https://ffmpeg.zeranoe.com/builds/win64/static/$($ffmpegVersion).zip" -O "$($env:TMP)\$($ffmpegVersion).zip"
94
- 7z x "$($env:TMP)\$($ffmpegVersion).zip" -o"$($PWD)\ManimCache"
96
+ echo "Completed Latex"
97
+ Invoke-WebRequest "$ffmpegUrl" -O "$($env:TMP)\ffmpeg.zip"
98
+ 7z x "$($env:TMP)\ffmpeg.zip" -o"$($PWD)\ManimCache"
95
99
Move-Item "ManimCache\ffmpeg-*" "ManimCache\FFmpeg"
100
+ Invoke-WebRequest "https://github.com/ManimCommunity/pango-windows-binaries/releases/download/$($pangoVersion)/pango-windows-binaires-x64.zip" -O "$($env:TMP)\Pango.zip"
101
+ mkdir "$($PWD)\ManimCache\Pango"
102
+ 7z x "$($env:TMP)\Pango.zip" -o"$($PWD)\ManimCache\Pango"
96
103
97
104
- name : Add Windows dependecies to path
98
105
if : runner.os == 'Windows'
99
106
run : |
100
107
$env:Path += ";" + "$($PWD)\ManimCache\FFmpeg\bin"
101
108
$env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32"
102
- $env:Path += ";" + "$($PWD)\ManimCache\SoX"
109
+ $env:Path += ";" + "$($PWD)\ManimCache\Pango\pango"
103
110
$env:Path = "$env:USERPROFILE\.poetry\bin;$($env:PATH)"
104
111
echo "::set-env name=Path::$env:Path"
105
112
0 commit comments