Skip to content

Commit 2afe74d

Browse files
MrDivernaveen521kk
andauthored
Updating ci syntax for runner version >=2.298.2 (#3079)
* fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * fix for runner version >=2.298.2 * testing out texlive action * installing basic packages add missing * adding packages * remove tipa * remove amssymb * remove MOAR packages * add preview package * add more packages * add fontspec * cache pip installs for doctests in rst files * fix yaml issue * add cache depency path * CI: (test-arm) use python 3.8.16 and 3.11.1 * CI: upload coverage only on arm runners * CI: use cache from actions/setup-python previously we had our own method of caching, this simplifies... * Update .github/workflows/ci.yml * CI: install poetry first before setting up python Co-authored-by: Naveen M K <[email protected]>
1 parent 4b576e0 commit 2afe74d

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
# TODO: test on 3.8 and 3.11
25-
python: ['3.10.7']
24+
python: ["3.8.16", "3.11.1"]
2625
steps:
2726
- name: Checkout the repository
2827
uses: actions/checkout@v3
@@ -61,6 +60,9 @@ jobs:
6160
run: |
6261
cd docs && poetry run make doctest O=-tskip-manim
6362
63+
# upload coverage report
64+
- name: Upload coverage
65+
uses: codecov/codecov-action@v3
6466

6567
test:
6668
runs-on: ${{ matrix.os }}
@@ -71,22 +73,23 @@ jobs:
7173
fail-fast: false
7274
matrix:
7375
os: [ubuntu-22.04, macos-latest, windows-latest]
74-
python: ['3.8', '3.9', '3.10', '3.11']
76+
python: ["3.8", "3.9", "3.10", "3.11"]
7577

7678
steps:
7779
- name: Checkout the repository
7880
uses: actions/checkout@v3
7981

80-
- name: Setup Python ${{ matrix.python }}
81-
uses: actions/setup-python@v4
82-
with:
83-
python-version: ${{ matrix.python }}
84-
8582
- name: Install Poetry
8683
run: |
8784
pipx install poetry
8885
poetry config virtualenvs.prefer-active-python true
8986
87+
- name: Setup Python ${{ matrix.python }}
88+
uses: actions/setup-python@v4
89+
with:
90+
python-version: ${{ matrix.python }}
91+
cache: "poetry"
92+
9093
- name: Setup macOS PATH
9194
if: runner.os == 'macOS'
9295
run: |
@@ -96,14 +99,7 @@ jobs:
9699
shell: bash
97100
id: cache-vars
98101
run: |
99-
echo "::set-output name=poetry-venv-dir::$(poetry config virtualenvs.path)"
100-
echo "::set-output name=date::$(/bin/date -u "+%m%w%Y")"
101-
102-
- name: Setup Poetry cache
103-
uses: actions/cache@v3
104-
with:
105-
path: ${{ steps.cache-vars.outputs.poetry-venv-dir }}
106-
key: ${{ runner.os }}-poetry-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}-1
102+
echo "date=$(/bin/date -u "+%m%w%Y")" >> $GITHUB_OUTPUT
107103
108104
- name: Install and cache ffmpeg (all OS)
109105
uses: FedericoCarboni/setup-ffmpeg@v2
@@ -112,17 +108,29 @@ jobs:
112108
id: setup-ffmpeg
113109

114110
- name: Install system dependencies (Linux)
111+
if: runner.os == 'Linux'
112+
uses: awalsh128/cache-apt-pkgs-action@latest
113+
with:
114+
packages: python3-opengl libpango1.0-dev xvfb
115+
version: 1.0
116+
117+
- name: Install Texlive (Linux)
118+
if: runner.os == 'Linux'
119+
uses: teatimeguest/setup-texlive-action@v2
120+
with:
121+
cache: true
122+
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
123+
124+
- name: Start virtual display (Linux)
115125
if: runner.os == 'Linux'
116126
run: |
117-
sudo apt update
118-
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
119127
# start xvfb in background
120128
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
121129
122130
- name: Setup macOS cache
131+
uses: actions/cache@v3
123132
id: cache-macos
124133
if: runner.os == 'macOS'
125-
uses: actions/cache@v3
126134
with:
127135
path: ${{ github.workspace }}/macos-cache
128136
key: ${{ runner.os }}-dependencies-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.cache-vars.outputs.date }}-1
@@ -207,7 +215,4 @@ jobs:
207215
208216
- name: Run doctests in rst files
209217
run: |
210-
cd docs && pip install -r requirements.txt && poetry run make doctest O=-tskip-manim
211-
212-
- name: Upload coverage
213-
uses: codecov/codecov-action@v3
218+
cd docs && poetry run make doctest O=-tskip-manim

0 commit comments

Comments
 (0)