Skip to content

Commit 9d08a37

Browse files
author
delfanbaum
committed
Drop 3.8, install cairo as as build step
It appears that's necessary now; I am not sure about this windows solution (if nothing else: it takes forever to build), but I've verified Linux and MacOS.
1 parent 4f8390f commit 9d08a37

File tree

5 files changed

+105
-8
lines changed

5 files changed

+105
-8
lines changed

.github/workflows/ci-macos.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Run Matrix Tests on MacOS
2+
on: [push, pull_request, workflow_dispatch]
3+
jobs:
4+
tests:
5+
name: "Python ${{ matrix.python-version }} on MacOs"
6+
runs-on: "macos-latest"
7+
strategy:
8+
matrix:
9+
python-version: ["3.9", "3.10", "3.11", "pypy-3.9"]
10+
steps:
11+
- uses: "actions/checkout@v4"
12+
13+
- name: Set up Homebrew
14+
id: set-up-homebrew
15+
uses: Homebrew/actions/setup-homebrew@main
16+
17+
- name: Setup Cairo
18+
run: |
19+
brew install cairo pkg-config
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: "Cache for wikipedia flags"
27+
uses: actions/cache@v3
28+
env:
29+
cache-name: "cache-wikipedia-flags"
30+
with:
31+
path: "tests/samples/wikipedia/flags"
32+
key: "wikipedia-flags-${{ matrix.python-version }}-${{ matrix.os }}"
33+
- name: "Cache for wikipedia symbols"
34+
uses: actions/cache@v3
35+
env:
36+
cache-name: "cache-wikipedia-symbols"
37+
with:
38+
path: "tests/samples/wikipedia/symbols"
39+
key: "wikipedia-symbols-${{ matrix.python-version }}-${{ matrix.os }}"
40+
- name: "Cache for w3c svg12 tinytestsuite"
41+
uses: actions/cache@v3
42+
env:
43+
cache-name: "cache-w3c-svg12-tinytestsuite"
44+
with:
45+
path: "tests/samples/W3C_SVG_12_TinyTestSuite"
46+
key: "w3c-svg12-tinytestsuite-${{ matrix.python-version }}-${{ matrix.os }}"
47+
- name: "Run tests for ${{ matrix.python-version }}"
48+
run: uv run pytest
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
name: CI
1+
name: Run Matrix Tests on Ubuntu
22
on: [push, pull_request, workflow_dispatch]
33
jobs:
44
tests:
5-
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
6-
runs-on: "${{ matrix.os }}"
5+
name: "Python ${{ matrix.python-version }} on Ubuntu"
6+
runs-on: "ubuntu-latest"
77
strategy:
88
matrix:
9-
python-version: ["3.8", "3.9", "3.10", "3.11", "pypy-3.9"]
10-
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
9+
python-version: ["3.9", "3.10", "3.11", "pypy-3.9"]
1110
steps:
1211
- uses: "actions/checkout@v4"
1312

13+
- name: Setup Cairo
14+
run: |
15+
sudo apt-get update && \
16+
sudo apt-get install -y libcairo2-dev libffi-dev pkg-config
17+
1418
- name: Install uv
1519
uses: astral-sh/setup-uv@v6
1620
with:

.github/workflows/ci-windows.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Run Matrix Tests on Windows
2+
on: [push, pull_request, workflow_dispatch]
3+
jobs:
4+
tests:
5+
name: "Python ${{ matrix.python-version }} on Windows"
6+
runs-on: "windows-latest"
7+
strategy:
8+
matrix:
9+
python-version: ["3.9", "3.10", "3.11", "pypy-3.9"]
10+
steps:
11+
- uses: "actions/checkout@v4"
12+
13+
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v6
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
19+
- name: Install gvsbuild
20+
run: uv tool install gvsbuild
21+
22+
- name: Install gtk3 (includes Cairo)
23+
run: gvsbuild build gtk3
24+
25+
- name: "Cache for wikipedia flags"
26+
uses: actions/cache@v3
27+
env:
28+
cache-name: "cache-wikipedia-flags"
29+
with:
30+
path: "tests/samples/wikipedia/flags"
31+
key: "wikipedia-flags-${{ matrix.python-version }}-${{ matrix.os }}"
32+
- name: "Cache for wikipedia symbols"
33+
uses: actions/cache@v3
34+
env:
35+
cache-name: "cache-wikipedia-symbols"
36+
with:
37+
path: "tests/samples/wikipedia/symbols"
38+
key: "wikipedia-symbols-${{ matrix.python-version }}-${{ matrix.os }}"
39+
- name: "Cache for w3c svg12 tinytestsuite"
40+
uses: actions/cache@v3
41+
env:
42+
cache-name: "cache-w3c-svg12-tinytestsuite"
43+
with:
44+
path: "tests/samples/W3C_SVG_12_TinyTestSuite"
45+
key: "w3c-svg12-tinytestsuite-${{ matrix.python-version }}-${{ matrix.os }}"
46+
- name: "Run tests for ${{ matrix.python-version }}"
47+
run: uv run pytest

tox.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ envlist =
33
py311
44
py310
55
py39
6-
py38
76
flake8
87

98
[testenv]
@@ -20,7 +19,6 @@ commands =
2019

2120
[gh-actions]
2221
python =
23-
3.8: py38
2422
3.9: py39
2523
3.10: py310
2624
3.11: py311

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)