Skip to content

Api mode cffi compile #126

Api mode cffi compile

Api mode cffi compile #126

Workflow file for this run

name: cairocffi's tests
on: [push, pull_request]
jobs:
tests:
name: ${{ matrix.os }} - ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.12']
include:
- os: ubuntu-latest
python-version: '3.8'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Start xvfb daemon (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- name: Installs XCB support (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: python -m pip install -e .[xcb]
- name: Install Cairo and GdkPixbuf (MacOS)
if: matrix.os == 'macos-latest'
run: brew install cairo gdk-pixbuf
- name: Install Gtk and DejaVu fonts (Windows)
if: matrix.os == 'windows-latest'
run: |
C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-ttf-dejavu mingw-w64-x86_64-gtk3 --noconfirm'
xcopy "C:\msys64\mingw64\share\fonts\TTF" "C:\Users\runneradmin\.fonts" /e /i
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH
rm C:\msys64\mingw64\bin\python.exe
- name: Install tests’ requirements
run: python -m pip install -e .[test]
- name: Launch tests
run: python -m pytest
env:
DYLD_FALLBACK_LIBRARY_PATH: /opt/homebrew/lib
- name: Check coding style
run: python -m ruff check