Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Updating ci syntax for runner version >=2.298.2 (#3079)

Tristan Schulz2afe74d13ac4
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4bfb2a8ba..0cac97815 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,8 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- # TODO: test on 3.8 and 3.11
- python: ['3.10.7']
+ python: ["3.8.16", "3.11.1"]
steps:
- name: Checkout the repository
uses: actions/checkout@v3
@@ -61,6 +60,9 @@ jobs:
run: |
cd docs && poetry run make doctest O=-tskip-manim
+ # upload coverage report
+ - name: Upload coverage
+ uses: codecov/codecov-action@v3
test:
runs-on: ${{ matrix.os }}
@@ -71,22 +73,23 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-latest, windows-latest]
- python: ['3.8', '3.9', '3.10', '3.11']
+ python: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- - name: Setup Python ${{ matrix.python }}
- uses: actions/setup-python@v4
- with:
- python-version: ${{ matrix.python }}
-
- name: Install Poetry
run: |
pipx install poetry
poetry config virtualenvs.prefer-active-python true
+ - name: Setup Python ${{ matrix.python }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python }}
+ cache: "poetry"
+
- name: Setup macOS PATH
if: runner.os == 'macOS'
run: |
@@ -96,14 +99,7 @@ jobs:
shell: bash
id: cache-vars
run: |
- echo "::set-output name=poetry-venv-dir::$(poetry config virtualenvs.path)"
- echo "::set-output name=date::$(/bin/date -u "+%m%w%Y")"
-
- - name: Setup Poetry cache
- uses: actions/cache@v3
- with:
- path: ${{ steps.cache-vars.outputs.poetry-venv-dir }}
- key: ${{ runner.os }}-poetry-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}-1
+ echo "date=$(/bin/date -u "+%m%w%Y")" >> $GITHUB_OUTPUT
- name: Install and cache ffmpeg (all OS)
uses: FedericoCarboni/setup-ffmpeg@v2
@@ -112,17 +108,29 @@ jobs:
id: setup-ffmpeg
- name: Install system dependencies (Linux)
+ if: runner.os == 'Linux'
+ uses: awalsh128/cache-apt-pkgs-action@latest
+ with:
+ packages: python3-opengl libpango1.0-dev xvfb
+ version: 1.0
+
+ - name: Install Texlive (Linux)
+ if: runner.os == 'Linux'
+ uses: teatimeguest/setup-texlive-action@v2
+ with:
+ cache: true
+ 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
+
+ - name: Start virtual display (Linux)
if: runner.os == 'Linux'
run: |
- sudo apt update
- sudo apt-get -y install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa python3-opengl libpango1.0-dev xvfb
# start xvfb in background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Setup macOS cache
+ uses: actions/cache@v3
id: cache-macos
if: runner.os == 'macOS'
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/macos-cache
key: ${{ runner.os }}-dependencies-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.cache-vars.outputs.date }}-1
@@ -207,7 +215,4 @@ jobs:
- name: Run doctests in rst files
run: |
- cd docs && pip install -r requirements.txt && poetry run make doctest O=-tskip-manim
-
- - name: Upload coverage
- uses: codecov/codecov-action@v3
+ cd docs && poetry run make doctest O=-tskip-manim