Skip to content

Commit

Permalink
Move cibuildwheel config to pyproject.toml; other consistency fixes (#…
Browse files Browse the repository at this point in the history
…1717)

This PR has a few leftover consistency fixes for the various GitHub Actions workflows, bringing the Traits workflows in line with others in ETS

- Move config for `cibuildwheel` into `pyproject.toml`
- Use Python 3.10 instead of Python 3.8 for single-version workflows (style checks, doc build)
- Update and uniformise action versions
- Remove unnecessary package installs and updates (especially `pip` updates: the `setup-python` action already updates pip to the latest  version)
  • Loading branch information
mdickinson committed Sep 9, 2022
1 parent e18d44a commit 60b5011
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 43 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:

- name: Build wheels
uses: pypa/cibuildwheel@v2.9.0
env:
CIBW_SKIP: 'pp*'
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "auto universal2"

- name: Check and upload wheels
env:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/run-core-traits-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- 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
16 changes: 5 additions & 11 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@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- 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
5 changes: 2 additions & 3 deletions .github/workflows/run-traits-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Linux packages for Qt 5 support
run: |
sudo apt-get update
Expand All @@ -28,12 +28,11 @@ jobs:
sudo apt-get install libxcb-xinerama0
if: matrix.os == 'ubuntu-latest'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and local packages
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Create clean test directory
run: |
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/test-documentation-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +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@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- 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 Sphinx enthought_sphinx_theme sphinx-copybutton
python -m pip install .
run: python -m pip install .[docs]
- name: Build HTML documentation with Sphinx
run: |
cd docs
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/test-from-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ jobs:
sudo apt-get install libxcb-xinerama0
if: runner.os == 'Linux'
- name: Set up Python ${{ matrix.python-version }} (${{ matrix.python-architecture }})
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-architecture }}
- name: Install prerequisites
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install Traits and test dependencies from PyPI sdist
run: |
python -m pip install --no-binary traits traits[test]
Expand Down Expand Up @@ -82,13 +79,10 @@ jobs:
sudo apt-get install libxcb-xinerama0
if: runner.os == 'Linux'
- name: Set up Python ${{ matrix.python-version }} (${{ matrix.python-architecture }})
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-architecture }}
- name: Install prerequisites
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install Traits and test dependencies from PyPI wheel
run: |
python -m pip install --only-binary traits traits[test]
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ target-version = ['py36']
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']

0 comments on commit 60b5011

Please sign in to comment.