Skip to content

Do some CI cleanup to make reports clearer and future changes easier #1989

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

Merged
merged 3 commits into from
Jan 4, 2025
Merged
Changes from 1 commit
Commits
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
Next Next commit
Tune CI matrix adjustments so reports are clearer
Since #1987, test jobs from `pythonpackage.yml` appear in an
unintuitive order, and some show an extra bool matrix variable in
their names while others don't (this corresponds to `experimental`,
which was always set to some value, but was set in different ways).

This fixes that by:

- Listing all tested versions, rather than introducing some in an
  `include` key. (The `include:`-introduced jobs didn't distinguish
  between originally-present matrix variables and those that are
  introduced based on the values of the original ones.)

- Replacing `os` with `os-type`, which has only the first part of
  the value for `runs-on:` (e.g., `ubuntu`), and adding `os-ver`
  to each matrix job, defaulting it to `latest`, but using `22.04`
  for Python 3.7 on Ubuntu.

This should also naturally extend to adding 3.13, with or without
setting `continue-on-error` to temporarily work around the problems
obseved in #1955, but nothing 3.13-related is done in this commit.
  • Loading branch information
EliahKagan committed Jan 4, 2025
commit 8a05390925ef416736ce9c0be8569977ca48fa07
23 changes: 12 additions & 11 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- experimental: false
- os: ubuntu-22.04
os-type: [ubuntu, macos, windows]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
- os-type: macos
python-version: "3.7"
experimental: false
- os: windows-latest
include:
- os-ver: latest
- os-type: ubuntu
python-version: "3.7"
experimental: false
os-ver: "22.04"
- experimental: false

fail-fast: false

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

defaults:
run:
Expand All @@ -43,7 +44,7 @@ jobs:
allow-prereleases: ${{ matrix.experimental }}

- name: Set up WSL (Windows)
if: startsWith(matrix.os, 'windows')
if: matrix.os-type == 'windows'
uses: Vampire/[email protected]
with:
distribution: Alpine
Expand Down Expand Up @@ -80,7 +81,7 @@ jobs:

# For debugging hook tests on native Windows systems that may have WSL.
- name: Show bash.exe candidates (Windows)
if: startsWith(matrix.os, 'windows')
if: matrix.os-type == 'windows'
run: |
set +e
bash.exe -c 'printenv WSL_DISTRO_NAME; uname -a'
Expand Down