Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ffa6570
Make Python 3.8 the minimum version
mdickinson Feb 11, 2025
24d5752
Only run tests on 3.8 / pyside6 while debugging
mdickinson May 14, 2025
36b331c
Don't run EDM-based tests at all, while debugging
mdickinson May 14, 2025
0fa2b82
Don't run copyright header checks
mdickinson May 14, 2025
f7f2e6d
Update upload-artifact version
mdickinson May 14, 2025
e74c2cb
Fix race condition in a test (see #1257)
mdickinson May 15, 2025
2fef23f
More test race condition fixes
mdickinson May 15, 2025
f434484
Suppress and check expected error-level log message
mdickinson May 15, 2025
d6001b2
Merge branch 'main' into require-python-38
mdickinson May 15, 2025
4ecad27
Restore copyright check
mdickinson May 15, 2025
1206078
Merge remote-tracking branch 'origin/require-python-38' into require-…
mdickinson May 15, 2025
30a19d5
Re-enable tests on 3.10 and 3.11
mdickinson May 15, 2025
6b8dd17
Restore testing on pyside2
mdickinson May 15, 2025
4b8193c
Don't run PySide2 tests on Apple Silicon
mdickinson May 15, 2025
7b3c459
Skip PILImage tests on Qt 5 (support was dropped in https://github.co…
mdickinson May 15, 2025
36d6579
Fix: don't try to import from pyface.qt if we're using wxPython
mdickinson May 15, 2025
921be60
Fix bad name
mdickinson May 15, 2025
3c0b5d9
Restore pyqt5 tests
mdickinson May 15, 2025
50e027f
Restore EDM-based tests
mdickinson May 15, 2025
b0a5dc2
Merge branch 'main' into require-python-38
mdickinson May 15, 2025
3ba5bcf
Merge remote-tracking branch 'origin/require-python-38' into require-…
mdickinson May 15, 2025
3d66737
Merge branch 'main' into require-python-38
mdickinson May 15, 2025
5574fc0
Update EDM version used in test workflows
mdickinson May 15, 2025
3ee4dc9
Merge branch 'fix/update-edm' into require-python-38
mdickinson May 15, 2025
4517975
Try 4.1.0 instead
mdickinson May 15, 2025
b1889d9
Try specifying version 4.1 of the action explicitly
mdickinson May 15, 2025
a60efc2
Pass platform explicitly to EDM when creating the environment
mdickinson May 15, 2025
cd9db78
Use the right platform string for macOS / arm. Ideally we'd figure th…
mdickinson May 15, 2025
1544724
Don't try to ask an Apple Silicon machine whether it has AVX2. It doe…
mdickinson May 15, 2025
1dd7634
Use v4.1 of the action; drop macos-latest from test-with-edm
mdickinson May 15, 2025
952ffe8
As an experiment, add 3.11 runtimes
mdickinson May 15, 2025
c517be6
Exclude unsupported macos-latest / 3.8 combination
mdickinson May 15, 2025
2b3e4f3
Merge branch 'main' into require-python-38
mdickinson May 15, 2025
89d96fc
Fix another occurrence
mdickinson May 15, 2025
4ce0c31
Merge remote-tracking branch 'origin/main' into fix/update-edm
mdickinson May 15, 2025
ff55861
Better test for apple silicon
mdickinson May 15, 2025
37c6b8b
Fix accidental change to upload-artifact version
mdickinson May 15, 2025
40c6b0f
Merge branch 'fix/update-edm' into require-python-38
mdickinson May 15, 2025
cc46762
Revert to only running the workflow on Python 3.8
mdickinson May 15, 2025
68a458d
Fix platform string in comparison
mdickinson May 15, 2025
5b859e5
Merge branch 'main' into require-python-38
mdickinson May 15, 2025
c4cb506
Remove misleading comment about egg building
mdickinson May 15, 2025
66ca787
Merge remote-tracking branch 'origin/require-python-38' into require-…
mdickinson May 15, 2025
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
3 changes: 2 additions & 1 deletion .github/workflows/test-with-edm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
toolkit: ['pyside6']
runtime: ['3.8']
fail-fast: false
timeout-minutes: 20 # should be plenty, it's usually < 5
runs-on: ${{ matrix.os }}
Expand All @@ -44,7 +45,7 @@ jobs:
- name: Install click to the default EDM environment
run: edm install -y wheel click coverage
- name: Install test environment
run: edm run -- python etstool.py install --toolkit=${{ matrix.toolkit }}
run: edm run -- python etstool.py install --toolkit=${{ matrix.toolkit }} --runtime=${{ matrix.runtime }}
- name: Run tests (Linux)
if: matrix.os == 'ubuntu-latest'
run: xvfb-run -a edm run -- python etstool.py test --toolkit=${{ matrix.toolkit }}
Expand Down
40 changes: 35 additions & 5 deletions etstool.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

python etstool.py test-all

Currently supported runtime values include ``3.6``, and currently
Currently supported runtime values are ``3.8`` and ``3.11``, and currently
supported toolkits are ``null``, ``pyqt5``, ``pyqt6``, ``pyside2``, ``pyside6``
and ``wx``. Not all combinations of toolkits and runtimes will work, but the
tasks will fail with a clear error if that is the case.
Expand All @@ -74,6 +74,7 @@

import glob
import os
import platform
import subprocess
import sys
from shutil import rmtree, copy as copyfile
Expand All @@ -82,8 +83,37 @@

import click


def current_platform():
"""Return the current platform as a string."""
if sys.platform.startswith("win32"):
return "windows"
elif sys.platform.startswith("linux"):
return "linux"
elif sys.platform.startswith("darwin"):
if "RELEASE_ARM64" in platform.uname().version:
return "macos-arm"
else:
return "macos"
else:
raise click.ClickException(f"Platform {sys.platform} not supported")


# Supported toolkits for each runtime.
supported_combinations = {
"3.8": {"pyside6", "pyqt6"},
"3.11": {"pyside6", "pyqt6"},
}

# EDS platform strings, keyed by runtime and platform (as returned by current_platform()).
EDS_PLATFORMS = {
("3.8", "linux"): "rh7-x86_64",
("3.8", "windows"): "win-x86_64",
("3.8", "macos"): "osx-x86_64",
("3.11", "linux"): "rh8-x86_64",
("3.11", "windows"): "win-x86_64",
("3.11", "macos"): "osx-x86_64",
("3.11", "macos-arm"): "osx-arm64",
}

# Traits version requirement (empty string to mean no specific requirement).
Expand All @@ -102,8 +132,8 @@
"packaging",
}

# if on mac, see if we can handle pillow_simd - do we have AVX2? - see #1207
if sys.platform == "darwin":
# if on mac/Intel, see if we can handle pillow_simd - do we have AVX2? - see #1207
if current_platform() == "macos":
result = subprocess.run(
['sysctl', 'machdep.cpu.leaf7_features'],
capture_output=True,
Expand Down Expand Up @@ -206,7 +236,7 @@ def install(edm, runtime, toolkit, environment, editable, source):

# edm commands to setup the development environment
commands = [
"edm environments create {environment} --force --version={runtime}",
"edm environments create {environment} --force --version={runtime} --platform={platform}",
"{edm} install -y -e {environment} --add-repository enthought/lgpl --add-repository enthought/gpl " + packages, # noqa: E501
"{edm} run -e {environment} -- pip install -r ci-src-requirements.txt --no-dependencies", # noqa: E501
install_pyface,
Expand Down Expand Up @@ -485,7 +515,7 @@ def get_parameters(edm, runtime, toolkit, environment):
if edm is None:
edm = locate_edm()
parameters["edm"] = edm

parameters["platform"] = EDS_PLATFORMS[runtime, current_platform()]
return parameters


Expand Down
Loading