From fecd8cc4389b03a958966ba7ec36507d7edf1028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Prpi=C4=8D?= Date: Thu, 19 Nov 2026 09:40:12 -0500 Subject: [PATCH] ci(github): run only one macOS job per CI run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub cancels macOS jobs that wait too long for a runner, and each run queued nine of them. Run e2e suites on Ubuntu only and macOS unit tests on Python 3.14 only, and update the Mergify rules and lint to match. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Martin Prpič --- .github/workflows/test.yaml | 15 +++++++-------- .mergify.yml | 10 +--------- e2e/common.sh | 1 + e2e/mergify_lint.py | 13 ------------- e2e/test_build.sh | 1 + 5 files changed, 10 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8c53f6242..ab84b5b47 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,6 +30,13 @@ jobs: os: - ubuntu-latest - macos-latest + exclude: + # macOS runners are congested and limited in number + # only run macOS tests on latest stable Python version + - os: macos-latest + python-version: "3.12" + - os: macos-latest + python-version: "3.13" steps: - name: Get source @@ -96,14 +103,6 @@ jobs: - ci_workflow_suite os: - ubuntu-latest - - macos-latest - exclude: - # macOS tests are slower and congested - # only run macOS tests on latest stable Python version - - os: macos-latest - python-version: "3.12" - - os: macos-latest - python-version: "3.13" steps: - name: Get source diff --git a/.mergify.yml b/.mergify.yml index 14d9fba3d..da9af3c47 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -30,9 +30,7 @@ pull_request_rules: # Unit tests - check-success=unit (3.12, 1.75, ubuntu-latest) - - check-success=unit (3.12, 1.75, macos-latest) - check-success=unit (3.13, 1.75, ubuntu-latest) - - check-success=unit (3.13, 1.75, macos-latest) - check-success=unit (3.14, 1.75, ubuntu-latest) - check-success=unit (3.14, 1.75, macos-latest) @@ -56,19 +54,13 @@ pull_request_rules: - check-success=e2e (3.13, 1.75, ci_config_suite, ubuntu-latest) - check-success=e2e (3.13, 1.75, ci_specialized_suite, ubuntu-latest) - check-success=e2e (3.13, 1.75, ci_workflow_suite, ubuntu-latest) - # Python 3.14 - Ubuntu + macOS (latest stable) + # Python 3.14 - Ubuntu only (macOS excluded) - check-success=e2e (3.14, 1.75, ci_bootstrap_parallel_suite, ubuntu-latest) - - check-success=e2e (3.14, 1.75, ci_bootstrap_parallel_suite, macos-latest) - check-success=e2e (3.14, 1.75, ci_bootstrap_suite, ubuntu-latest) - - check-success=e2e (3.14, 1.75, ci_bootstrap_suite, macos-latest) - check-success=e2e (3.14, 1.75, ci_build_suite, ubuntu-latest) - - check-success=e2e (3.14, 1.75, ci_build_suite, macos-latest) - check-success=e2e (3.14, 1.75, ci_config_suite, ubuntu-latest) - - check-success=e2e (3.14, 1.75, ci_config_suite, macos-latest) - check-success=e2e (3.14, 1.75, ci_specialized_suite, ubuntu-latest) - - check-success=e2e (3.14, 1.75, ci_specialized_suite, macos-latest) - check-success=e2e (3.14, 1.75, ci_workflow_suite, ubuntu-latest) - - check-success=e2e (3.14, 1.75, ci_workflow_suite, macos-latest) # At least 1 reviewer from maintainers - and: diff --git a/e2e/common.sh b/e2e/common.sh index 9f5a301df..a29ed18bb 100644 --- a/e2e/common.sh +++ b/e2e/common.sh @@ -40,6 +40,7 @@ source "$(hatch env find e2e)/bin/activate" export FROMAGER_CONSTRAINTS_FILE="${SCRIPTDIR}/constraints.txt" OS=$(uname) +# CI runs e2e tests on Linux only; the macOS branch is for local runs. if [ "$OS" = "Darwin" ]; then NETWORK_ISOLATION="" # The tag comes back as something like "macosx-10.9-universal2" but the diff --git a/e2e/mergify_lint.py b/e2e/mergify_lint.py index 4319ee168..dcd50414c 100644 --- a/e2e/mergify_lint.py +++ b/e2e/mergify_lint.py @@ -36,7 +36,6 @@ test_scripts = set(matrix["test-script"]) print("found test scripts:\n ", "\n ".join(sorted(test_scripts)), sep="") os_versions = list(sorted(matrix["os"])) -os_versions.remove("macos-latest") e2e_dir = pathlib.Path("e2e") # Look for CI suite scripts instead of individual test scripts @@ -106,18 +105,6 @@ os_versions, ) ) -# for macOS, only expect latest Python version and latest Rust version -expected_jobs.update( - set( - str(combo).replace("'", "") - for combo in itertools.product( - python_versions[-1:], - rust_versions[-1:], - test_scripts, - ["macos-latest"], - ) - ) -) if not expected_jobs.difference(existing_jobs): print("found rules for all expected jobs!") for job_name in sorted(expected_jobs.difference(existing_jobs)): diff --git a/e2e/test_build.sh b/e2e/test_build.sh index 8b96b0623..19bde9a59 100755 --- a/e2e/test_build.sh +++ b/e2e/test_build.sh @@ -15,6 +15,7 @@ VERSION="5.2.0" pip install e2e/fromager_hooks OS=$(uname) +# CI runs e2e tests on Linux only; the macOS branch is for local runs. if [ "$OS" = "Darwin" ]; then NETWORK_ISOLATION="" else