Skip to content

Commit

Permalink
Backport #1757 to the release branch and bring CI workflows in line w…
Browse files Browse the repository at this point in the history
…ith main
  • Loading branch information
mdickinson committed Sep 11, 2023
1 parent 20f6a3f commit 8ec1d65
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 43 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: Install Python packages needed for wheel build and upload
run: |
python -m pip install --upgrade pip setuptools
python -m pip install twine wheel
run: python -m pip install twine

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: 'pp*'
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "auto universal2"
uses: pypa/[email protected]

- name: Check and upload wheels
env:
Expand All @@ -60,21 +54,18 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: Install Python packages needed for sdist build and upload
run: |
python -m pip install --upgrade pip setuptools
python -m pip install twine
run: python -m pip install build twine

- name: Build sdist
run: |
python setup.py sdist
run: python -m build --sdist

- name: Publish sdist to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m twine check --strict dist/*.tar.gz
python -m twine upload dist/*.tar.gz
python -m twine check --strict dist/*
python -m twine upload dist/*
4 changes: 2 additions & 2 deletions .github/workflows/run-core-traits-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

runs-on: ${{ matrix.os }}

Expand All @@ -21,9 +21,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install local package
run: |
python -m pip install --upgrade pip
# Uninstall setuptools so that the tests will catch any accidental
# dependence of the Traits source on setuptools. Note that in future
# setuptools may not exist in a newly-created venv
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/run-style-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@ on:

jobs:
style:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8']

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: '3.10'
- name: Install dependencies and local packages
run: |
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip install flake8-ets
- name: Run style checks
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-traits-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- workflow_dispatch

env:
# Temporary workaround prior to release of Traits 8.0
# Temporary workaround prior to release of TraitsUI 8.0
# xref: enthought/traits#1742
ETS_QT4_IMPORTS: 1

Expand All @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

runs-on: ${{ matrix.os }}

Expand All @@ -37,9 +37,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies and local packages
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
python -m pip install traits-stubs/[test]
- name: Create clean test directory
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/test-documentation-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,16 @@ on:

jobs:
docs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8']

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: '3.10'
- name: Install dependencies and local packages
run: |
python -m pip install --upgrade pip
python -m pip install ".[docs]"
run: python -m pip install .[docs]
- name: Build HTML documentation with Sphinx
run: |
cd docs
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test-from-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ on:
# Run at 03:27 UTC on the 8th and 22nd of every month
- cron: '27 3 8,22 * *'

env:
# Temporary workaround prior to release of Traits 8.0
# xref: enthought/traits#1742
ETS_QT4_IMPORTS: 1

jobs:
test-pypi-sdist:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-architecture: [x86, x64]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -40,6 +45,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-architecture }}
allow-prereleases: true
- name: Install prerequisites
run: |
python -m pip install --upgrade pip setuptools wheel
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,14 @@ profile = 'black'
line_length = 79
order_by_type = 'False'

[tool.cibuildwheel]
skip = 'pp*'

[tool.cibuildwheel.macos]
archs = ['auto', 'universal2']

[tool.cibuildwheel.linux]
archs = ['auto', 'aarch64']

[tool.pytest.ini_options]
addopts = '--ignore=traits-stubs'

0 comments on commit 8ec1d65

Please sign in to comment.