Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #1036

Merged
merged 34 commits into from
Apr 18, 2023
Merged

Fix CI #1036

Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4489ee7
Add testing with pip; remove MacOS EDM tests.
corranwebster Apr 17, 2023
30212a0
Versions are strings.
corranwebster Apr 17, 2023
ff405a6
Actuall install toolkits!
corranwebster Apr 17, 2023
114ba74
Use pyface.ui.qt4 imports for now.
corranwebster Apr 17, 2023
738257b
Celiagg isn't special
corranwebster Apr 17, 2023
a2a2a33
Ranges should be ints.
corranwebster Apr 17, 2023
fda6961
And position of scrollbar should also be an int.
corranwebster Apr 17, 2023
f75598f
Revert change to ScrollbarRange; fix linux dependencies.
corranwebster Apr 17, 2023
5fe2e2a
Merge branch 'main' into fix/update-ci
corranwebster Apr 17, 2023
f79c8fe
Didtch PyQt5 for now.
corranwebster Apr 17, 2023
a1f0df0
Add support for cairo tests.
corranwebster Apr 17, 2023
cccb89e
Fix typo in cairo backend
corranwebster Apr 17, 2023
90e5bf8
Fix quad Bezier on Cairo backend.
corranwebster Apr 17, 2023
9819033
Expect Cairo drawing to fail -see #1035
corranwebster Apr 17, 2023
6cd6b3f
Improve workflow and update steuptools version.
corranwebster Apr 17, 2023
6818f41
Separate celiagg install.
corranwebster Apr 17, 2023
5d8332d
Add Mac (celiagg may be problematic).
corranwebster Apr 17, 2023
9ffd788
Different tests for linux vs. not linux
corranwebster Apr 17, 2023
e16faff
Some fixes for test running in OS X and Windows
corranwebster Apr 17, 2023
53c9e7a
Add windows to test matrix.
corranwebster Apr 18, 2023
562ab77
Fiddle with pip upgrade - windows seems unhappy.
corranwebster Apr 18, 2023
37b9ca8
Windows needs python -m pip?
corranwebster Apr 18, 2023
a294751
Experiment with wx in the matrix.
corranwebster Apr 18, 2023
bed7561
Exclude old linux wx from matrix.
corranwebster Apr 18, 2023
ac213a7
`Exclude` is inside `matrix`
corranwebster Apr 18, 2023
fc175c9
Turn off wx on linux completely
corranwebster Apr 18, 2023
a11d58b
Drop Wx + MacOS (no wheels); add PyQt5 + Python 3.8
corranwebster Apr 18, 2023
199b3cb
Cant handle multiple cases in an exclude.
corranwebster Apr 18, 2023
2699c5c
Update all workflows; skip Windows/PyQt5 for now #1308
corranwebster Apr 18, 2023
f8d08dc
Don't test on EDM Mac due to AVX2 issue
corranwebster Apr 18, 2023
0a4be6f
Use https for git checkouts rather than http.
corranwebster Apr 18, 2023
210a3a5
Spell celiagg correctly
corranwebster Apr 18, 2023
35d098f
Update kiva/cairo.py
corranwebster Apr 18, 2023
0185b20
Normalize quotes.
corranwebster Apr 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/install-qt-support/README.md
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
```
30 changes: 30 additions & 0 deletions .github/actions/install-qt-support/action.yml
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
90 changes: 51 additions & 39 deletions .github/workflows/bleeding-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ jobs:
test-ets:
strategy:
matrix:
os: [ubuntu-latest]
toolkit: ['pyside6', 'pyside2']
python-version: [3.8]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
toolkit: ['null', 'pyside6', "wx"]
python-version: ["3.10"]
exclude:
# No Wx wheels available for ubuntu or macos
- os: 'ubuntu-latest'
toolkit: "wx"
- os: 'macos-latest'
toolkit: "wx"
jwiggins marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ${{ matrix.os }}
steps:
- name: Check out
Expand All @@ -23,57 +29,63 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install PySide2 (from PyPI) dependencies for Linux
- name: Install Qt dependencies
uses: ./.github/actions/install-qt-support
if: matrix.toolkit != 'wx' && matrix.toolkit != 'null'
- name: Install dependencies for 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
if: matrix.toolkit != 'wx'
- name: Install Wx dependencies for Linux
# 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: |
sudo apt-get update
sudo apt-get install libsdl2-2.0-0
if: matrix.toolkit == 'wx'
- name: Install GL dependencies for Linux
run: sudo apt-get install libglu1-mesa-dev
brew install cairo
if: matrix.os == 'macos-latest'
- name: Install build dependencies
run: |
python -m pip install -U pip wheel
- name: Install prebuilt wxPython
run: python -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython
if: matrix.toolkit == 'wx'
- name: Install prebuilt celiagg
run: python -m pip install celiagg
python -m pip install --upgrade pip wheel
- name: Install local packages
run: pip install ".[cairo,gl,layout,pdf,svg,test,${{ matrix.toolkit }}]"
- name: Install source dependencies
run: |
python -m pip install git+http://github.com/enthought/traits.git#egg=traits
python -m pip install git+http://github.com/enthought/pyface.git#egg=pyface[${{ matrix.toolkit }}]
python -m pip install git+http://github.com/enthought/traitsui.git#egg=traitsui[${{ matrix.toolkit }}]
- name: Install local packages
run: python -m pip install .[gl,layout,pdf,svg,test]
python -m pip install git+https://github.com/enthought/traits.git
python -m pip install git+https://github.com/enthought/pyface.git
python -m pip install git+https://github.com/enthought/traitsui.git
python -m pip install git+https://github.com/celiagg/celiagg.git
- name: Sanity check package version
run: python -m pip list
- name: Run enable test suite
- 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 kiva test suite
- name: Run enable test suite (not Linux)
env:
PYTHONFAULTHANDLER: 1
run: xvfb-run python -m unittest discover -v kiva
ETS_QT4_IMPORTS: 1
run: python -m unittest discover -v enable
if: matrix.os != 'ubuntu-latest'
working-directory: ${{ runner.temp }}

notify-on-failure:
Expand Down
47 changes: 9 additions & 38 deletions .github/workflows/test-with-edm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,14 @@ jobs:
test-edm-linux:
strategy:
matrix:
toolkit: ['null', 'pyqt5', 'pyside2']
runtime: ['3.6']
include:
- toolkit: 'pyside6'
runtime: '3.8'
runs-on: ubuntu-latest
toolkit: ['null', 'pyside6']
runtime: ['3.8']
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Install Qt dependencies for 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
- name: Install Qt dependencies
uses: ./.github/actions/install-qt-support
if: matrix.toolkit != 'wx'
- name: Install Wx dependencies for Linux
run: |
sudo apt-get update
sudo apt-get install libsdl1.2-dev
if: matrix.toolkit == 'wx'
- name: Install GL dependencies for Linux
run: sudo apt-get install libglu1-mesa-dev
- name: Cache EDM packages
Expand All @@ -64,20 +42,13 @@ jobs:
# kiva agg requires at least 15-bit color depth.
run: xvfb-run --server-args="-screen 0 1024x768x24" edm run -- python ci/edmtool.py test --toolkit=${{ matrix.toolkit }} --runtime=${{ matrix.runtime }}

# Test against EDM packages on Windows and OSX
# Test against EDM packages on Windows
test-with-edm:
strategy:
matrix:
os: [macos-latest, windows-latest]
toolkit: ['pyqt5', 'pyside2', 'wx']
runtime: ['3.6']
include:
- os: macos-latest
toolkit: 'pyside6'
runtime: '3.8'
- os: windows-latest
toolkit: 'pyside6'
runtime: '3.8'
os: ["windows-latest"]
toolkit: ['null', 'pyside6', 'wx']
runtime: ['3.8']
runs-on: ${{ matrix.os }}
env:
# Set root directory, mainly for Windows, so that the EDM Python
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/test-with-pip.yml
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 }}
16 changes: 16 additions & 0 deletions enable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,25 @@
"pdf": ["reportlab"],
# Dependencies for SVG backend
"svg": ["pyparsing"],
# Dependencies for Celiagg backend
"celiagg": ["celiagg"],
# Dependencies for Cairo backend
"cairo": ["pycairo"],
# Dependencies purely for running tests.
"test": [
"PyPDF2<3.0", # for pdf drawing tests in kiva.
"setuptools",
],
# Dependencies for PySide6
"pyside6": ['pyface[pyside6]', 'traitsui[pyside6]'],
# Dependencies for PySide2
"pyside2": ['pyface[pyside2]', 'traitsui[pyside2]'],
# Dependencies for PyQt6
"pyqt6": ['pyface[pyqt6]', 'traitsui[pyqt6]'],
# Dependencies for PyQt5
"pyqt5": ['pyface[pyqt5]', 'traitsui[pyqt5]'],
# Dependencies for WxPython
"wx": ['pyface[wx]', 'traitsui[wx]'],
jwiggins marked this conversation as resolved.
Show resolved Hide resolved
# Dependencies for null backend (nothing right now)
"null": [],
}
Loading