Skip to content

Added Output events, updated OutputState properties #1065

Added Output events, updated OutputState properties

Added Output events, updated OutputState properties #1065

Workflow file for this run

name: CI
on:
pull_request:
push:
schedule:
# Run at 17:29 every Saturday
- cron: '29 17 * * 6'
jobs:
build-wayland:
name: Build Wayland libraries
runs-on: ubuntu-24.04
env:
wayland-version: "1.23.0"
wayland-protocols-version: "1.36"
strategy:
fail-fast: false
matrix:
wlroots-version: ["0.17.4", master]
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y --no-install-recommends \
hwdata \
libdisplay-info-dev \
libdrm-dev \
libegl1-mesa-dev \
libepoxy-dev \
libgbm-dev \
libgles2-mesa-dev \
libinput-dev \
libpciaccess-dev \
libpixman-1-dev \
libseat-dev \
libtirpc-dev \
libxcb-composite0-dev \
libxcb-dri3-dev \
libxcb-ewmh-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-present-dev \
libxcb-render0-dev \
libxcb-render-util0-dev \
libxcb-res0-dev \
libxcb-xfixes0-dev \
libxcb-xinput-dev \
libxcb1-dev \
libxfont-dev \
libxkbcommon-dev \
libxshmfence-dev \
meson \
seatd \
xfonts-utils \
xserver-xorg-dev \
xwayland \
ninja-build
- name: Set environment variables
run: |
echo "CPATH=${HOME}/wayland/usr/include" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${HOME}/wayland/usr/lib" >> $GITHUB_ENV
echo "LIBRARY_PATH=${HOME}/wayland/usr/lib" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=${HOME}/wayland/usr/share/pkgconfig:${HOME}/wayland/usr/lib/pkgconfig" >> $GITHUB_ENV
- name: Download and unpack Wayland source
run: |
wget $WAYLAND_URL
wget $WAYLAND_PROTOCOLS_URL
wget -O wlroots.tar.gz $WLROOTS_URL
tar -xJf wayland-${{ env.wayland-version }}.tar.xz
tar -xJf wayland-protocols-${{ env.wayland-protocols-version }}.tar.xz
tar -xzf wlroots.tar.gz
env:
WAYLAND_URL: https://gitlab.freedesktop.org/wayland/wayland/-/releases/${{ env.wayland-version }}/downloads/wayland-${{ env.wayland-version }}.tar.xz
WAYLAND_PROTOCOLS_URL: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/${{ env.wayland-protocols-version }}/downloads/wayland-protocols-${{ env.wayland-protocols-version }}.tar.xz
WLROOTS_URL: https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/${{ matrix.wlroots-version }}/wlroots-${{ matrix.wlroots-version }}.tar.gz
- name: Build wayland
working-directory: wayland-${{ env.wayland-version }}
run: |
meson build --prefix=/usr -Ddocumentation=false
ninja -C build
DESTDIR=~/wayland ninja -C build install
sudo ninja -C build install
- name: Build wayland-protocols
working-directory: wayland-protocols-${{ env.wayland-protocols-version }}
run: |
meson build --prefix=/usr
ninja -C build
DESTDIR=~/wayland ninja -C build install
sudo ninja -C build install
- name: Build wlroots
working-directory: wlroots-${{ matrix.wlroots-version }}
continue-on-error: ${{ matrix.wlroots-version == 'master' }}
run: |
meson build --prefix=/usr -Dxwayland=enabled
ninja -C build
DESTDIR=~/wayland ninja -C build install
- name: Create artifact
run: tar czf ~/wayland.tar.gz -C ${HOME}/wayland/ .
- name: Upload built libraries
uses: actions/upload-artifact@v4
with:
name: wlroots-${{ matrix.wlroots-version }}
path: ~/wayland.tar.gz
if-no-files-found: error
unit-test:
name: Python ${{ matrix.python-version}} unit tests (${{ matrix.wlroots-version }})
runs-on: ubuntu-24.04
needs: build-wayland
strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "pypy-3.8"
- "pypy-3.9"
- "pypy-3.10"
wlroots-version: ["0.17.4"]
include:
- python-version: "3.12"
wlroots-version: master
steps:
- name: Download wayland libraries
uses: actions/download-artifact@v4
with:
name: wlroots-${{ matrix.wlroots-version }}
- name: Unpack wayland artifact
run: sudo tar xf wayland.tar.gz -C /
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y --no-install-recommends \
hwdata \
libdisplay-info-dev \
libdrm-dev \
libegl1-mesa-dev \
libepoxy-dev \
libgbm-dev \
libgles2-mesa-dev \
libinput-dev \
libpciaccess-dev \
libpixman-1-dev \
libseat-dev \
libtirpc-dev \
libxcb-composite0-dev \
libxcb-dri3-dev \
libxcb-ewmh-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-present-dev \
libxcb-render0-dev \
libxcb-render-util0-dev \
libxcb-res0-dev \
libxcb-xfixes0-dev \
libxcb-xinput-dev \
libxcb1-dev \
libxfont-dev \
libxkbcommon-dev \
libxshmfence-dev \
meson \
seatd \
xfonts-utils \
xserver-xorg-dev \
xwayland
- name: Set environment variables
run: |
echo "XDG_RUNTIME_DIR=/tmp" >> $GITHUB_ENV
- name: Install Python dependencies
continue-on-error: ${{ matrix.wlroots-version == 'master' }}
run: |
pip install -e .[test]
- name: Run unit tests
continue-on-error: ${{ matrix.wlroots-version == 'master' }}
run: pytest -Wall
env:
WLR_HEADLESS_OUTPUTS: '1'
WLR_LIBINPUT_NO_DEVICES: '1'
WLR_RENDERER: pixman
WLR_RENDERER_ALLOW_SOFTWARE: '1'
ruff-test:
name: Ruff tests
runs-on: ubuntu-24.04
env:
python-version: "3.10"
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Run ruff check
uses: chartboost/ruff-action@v1
mypy-test:
name: mypy tests
runs-on: ubuntu-24.04
env:
python-version: "3.12"
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y --no-install-recommends \
libxkbcommon-dev \
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Install Python dependencies
run: |
pip install wheel
pip install -r requirements.txt
pip install mypy types-cffi types-dataclasses
- name: Run mypy test
run: |
mypy -p wlroots
mypy -p tiny
mypy check_headers.py
black-test:
name: black tests
runs-on: ubuntu-24.04
env:
python-version: "3.12"
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Install Python dependencies
run: |
pip install black
- name: Run black test
run: black --check wlroots tiny check_headers.py
packaging-test:
name: packaging tests
runs-on: ubuntu-24.04
needs: build-wayland
env:
python-version: "3.12"
wlroots-version: "0.17.4"
steps:
- name: Download wayland libraries
uses: actions/download-artifact@v4
with:
name: wlroots-${{ env.wlroots-version }}
- name: Unpack wayland artifact
run: sudo tar xf wayland.tar.gz -C /
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y --no-install-recommends \
libxkbcommon-dev \
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Install Python dependencies
run: |
pip install wheel
pip install -r requirements.txt
pip install check-manifest twine
- name: Run packaging test
run: |
check-manifest
python setup.py check -m -s
python setup.py sdist
twine check dist/*
protocol-headers-test:
name: protocol headers test
runs-on: ubuntu-24.04
needs: build-wayland
env:
python-version: "3.12"
wlroots-version: "0.17.4"
steps:
- name: Download wayland libraries
uses: actions/download-artifact@v4
with:
name: wlroots-${{ env.wlroots-version }}
- name: Unpack wayland artifact
run: sudo tar xf wayland.tar.gz -C /
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Download and unpack Wlroots source
run: |
wget -O wlroots.tar.gz $WLROOTS_URL
tar -xzf wlroots.tar.gz
env:
WLROOTS_URL: https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/${{ env.wlroots-version }}/wlroots-${{ env.wlroots-version }}.tar.gz
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y --no-install-recommends pkgconf
- name: Run protocol test
run: python check_headers.py --wlroots-dir wlroots-${{ env.wlroots-version }}