-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This gets a reasonable baseline CI working for Kiva and Enable. It covers Python 3.8 and 3.10 with a reasonable set of Kiva backends and ETS toolkits. It splits out the Linux Qt dependency installation into a separate action as is done in other ETS projects so it can be re-used across workflows. There are a number of test cases skipped: - WxPython on MacOS and Linux due to lack of appropriate wheels - PyQt5 on Python 3.10 due to #1037 - PyQt5 on Windows due to #1038 This also adds a skip to a Cairo backend test case due to #1035 and a couple of drive-by fixes to the Cairo Kiva backend (Cairo was previously not being tested).
- Loading branch information
1 parent
5088b72
commit 1565976
Showing
9 changed files
with
257 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Install Qt dependencies | ||
|
||
This action calls `apt-get` to install packages required for running Qt on Ubuntu. | ||
|
||
## Inputs | ||
|
||
There are no inputs. | ||
|
||
## Outputs | ||
|
||
There are no outputs. | ||
|
||
## Example usage | ||
|
||
```yml | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Qt dependencies | ||
uses: ./.github/actions/install-qt-support | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: install-qt-support | ||
description: 'Install supporting OS packages for Qt-using code' | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Linux packages for Qt | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install qtbase5-dev | ||
sudo apt-get install qtchooser | ||
sudo apt-get install qt5-qmake | ||
sudo apt-get install qtbase5-dev-tools | ||
sudo apt-get install libegl1 | ||
sudo apt-get install libxkbcommon-x11-0 | ||
sudo apt-get install libxcb-icccm4 | ||
sudo apt-get install libxcb-image0 | ||
sudo apt-get install libxcb-keysyms1 | ||
sudo apt-get install libxcb-randr0 | ||
sudo apt-get install libxcb-render-util0 | ||
sudo apt-get install libxcb-xinerama0 | ||
sudo apt-get install libxcb-shape0 | ||
sudo apt-get install libxcb-cursor0 | ||
sudo apt-get install pulseaudio | ||
sudo apt-get install libpulse-mainloop-glib0 | ||
# Needed to work around https://bugreports.qt.io/browse/PYSIDE-1547 | ||
sudo apt-get install libopengl0 | ||
# Needed for Qt6 video playback | ||
sudo apt-get install libgstreamer-gl1.0-0 | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
|
||
# This workflow installs dependencies from main branch | ||
|
||
name: Test with pip | ||
|
||
on: | ||
pull_request: | ||
# Make it possible to manually trigger the workflow | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-ets: | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
toolkit: ['null', 'pyside2', 'pyside6', 'pyqt5', 'wx'] | ||
python-version: ['3.8', '3.10'] | ||
exclude: | ||
# No Wx wheels available for ubuntu or macos | ||
- os: 'ubuntu-latest' | ||
toolkit: 'wx' | ||
- os: 'macos-latest' | ||
toolkit: 'wx' | ||
# PyQt5 API doesn't automatically cast float -> int, see #1037 | ||
- toolkit: 'pyqt5' | ||
python-version: '3.10' | ||
# Kiva tests hanging on windows, see #1038 | ||
- os: 'windows-latest' | ||
toolkit: 'pyqt5' | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Qt dependencies | ||
uses: ./.github/actions/install-qt-support | ||
if: matrix.toolkit != 'wx' && matrix.toolkit != 'null' | ||
- name: Install dependencies for Linux | ||
run: | | ||
# needed for GL | ||
sudo apt-get install libglu1-mesa-dev | ||
# needed for Celiagg | ||
sudo apt-get install libfreetype-dev libharfbuzz-dev | ||
# needed for Cairo | ||
sudo apt-get install libcairo2-dev | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Install dependencies for Mac | ||
run: | | ||
brew install cairo | ||
if: matrix.os == 'macos-latest' | ||
- name: Install build dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
- name: Install local packages | ||
run: pip install ".[cairo,gl,layout,pdf,svg,test,${{ matrix.toolkit }}]" | ||
- name: Install celiagg manually | ||
# This is needed until new release of celiagg | ||
# - numpy is needed for install in current released version | ||
run: pip install celiagg | ||
- name: Sanity check package version | ||
run: pip list | ||
- name: Run kiva test suite (Linux) | ||
env: | ||
PYTHONFAULTHANDLER: 1 | ||
ETS_QT4_IMPORTS: 1 | ||
run: xvfb-run python -m unittest discover -v kiva | ||
if: matrix.os == 'ubuntu-latest' | ||
working-directory: ${{ runner.temp }} | ||
- name: Run kiva test suite (not Linux) | ||
env: | ||
PYTHONFAULTHANDLER: 1 | ||
ETS_QT4_IMPORTS: 1 | ||
run: python -m unittest discover -v kiva | ||
if: matrix.os != 'ubuntu-latest' | ||
working-directory: ${{ runner.temp }} | ||
- name: Run enable test suite (Linux) | ||
env: | ||
PYTHONFAULTHANDLER: 1 | ||
ETS_QT4_IMPORTS: 1 | ||
# kiva agg requires at least 15-bit color depth. | ||
run: xvfb-run --server-args="-screen 0 1024x768x24" python -m unittest discover -v enable | ||
if: matrix.os == 'ubuntu-latest' | ||
working-directory: ${{ runner.temp }} | ||
- name: Run enable test suite (not Linux) | ||
env: | ||
PYTHONFAULTHANDLER: 1 | ||
ETS_QT4_IMPORTS: 1 | ||
run: python -m unittest discover -v enable | ||
if: matrix.os != 'ubuntu-latest' | ||
working-directory: ${{ runner.temp }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.