Skip to content

Commit f508131

Browse files
author
Release Manager
committed
gh-40516: Simplify macos CI and make it more robust <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> The macos workflow currently uses various interconnected levels of abstraction: ci-macos.yml > meson.yml > tox > make. But in the end, its simply calling the usual `bootstrap + configure + make build` commands. So we simplify the whole construction in the CI, to do exactly that and nothing more. (Note that it currently is supposed to also install certain optional and experimental packages; but looking at the log this is actually not working https://github.com/sagemath/sage/actions/runs/16538105107/job/46 778843389 - so this is left for a followup PR) ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #40516 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
2 parents c78cd54 + 50d26d4 commit f508131

File tree

3 files changed

+38
-210
lines changed

3 files changed

+38
-210
lines changed

.github/workflows/ci-macos.yml

Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -21,56 +21,51 @@ on:
2121
pull_request:
2222
paths:
2323
- '.github/workflows/ci-macos.yml'
24-
- '.github/workflows/macos.yml'
2524
push:
2625
tags:
2726
- '*'
2827
workflow_dispatch:
2928
# Allow to run manually
3029

31-
env:
32-
TARGETS_PRE: all-sage-local
33-
TARGETS: build
34-
TARGETS_OPTIONAL: ptest
35-
3630
jobs:
37-
stage-1:
38-
uses: ./.github/workflows/macos.yml
39-
with:
40-
stage: "1"
41-
timeout: 14400
42-
43-
stage-2:
44-
uses: ./.github/workflows/macos.yml
45-
with:
46-
stage: "2"
47-
needs: [stage-1]
48-
if: ${{ success() || failure() }}
31+
macos:
32+
name: Build and Test (macos-${{ matrix.version }})
33+
runs-on: macos-${{ matrix.version }}
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
version:
38+
- '13'
39+
- '14'
40+
- '15'
4941

50-
stage-2-optional-0-o:
51-
uses: ./.github/workflows/macos.yml
52-
with:
53-
stage: "2-optional-0-o"
54-
needs: [stage-2]
55-
if: ${{ success() || failure() }}
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
5645

57-
stage-2-optional-p-z:
58-
uses: ./.github/workflows/macos.yml
59-
with:
60-
stage: "2-optional-p-z"
61-
needs: [stage-2-optional-0-o]
62-
if: ${{ success() || failure() }}
46+
- uses: actions/setup-python@v5
47+
with:
48+
python-version: "3.13"
49+
50+
- name: Install test prerequisites
51+
run: python -m pip install tox
6352

64-
stage-2-experimental-0-o:
65-
uses: ./.github/workflows/macos.yml
66-
with:
67-
stage: "2-experimental-0-o"
68-
needs: [stage-2-optional-p-z]
69-
if: ${{ success() || failure() }}
53+
- name: Install dependencies
54+
run: |
55+
eval $(build/bin/sage-print-system-package-command homebrew update)
56+
eval $(build/bin/sage-print-system-package-command homebrew --yes --ignore-missing install $(build/bin/sage-get-system-packages homebrew _bootstrap _prereq $(build/bin/sage-package list :standard:)))
7057
71-
stage-2-experimental-p-z:
72-
uses: ./.github/workflows/macos.yml
73-
with:
74-
stage: "2-experimental-p-z"
75-
needs: [stage-2-experimental-0-o]
76-
if: ${{ success() || failure() }}
58+
- name: Build
59+
run: |
60+
source ./.homebrew-build-env
61+
./bootstrap
62+
./configure --enable-download-from-upstream-url
63+
make build V=0
64+
env:
65+
MAKE: 'make -j6'
66+
67+
- name: Test
68+
run: |
69+
source ./.homebrew-build-env # Needed so that runtime cython can find the dependencies
70+
./sage -t --all -p4
71+

.github/workflows/macos.yml

Lines changed: 0 additions & 166 deletions
This file was deleted.

src/doc/en/developer/portability_testing.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,7 @@ This is defined in the files
10061006
- :sage_root:`.github/workflows/ci-distro.yml`
10071007
(which calls :sage_root:`.github/workflows/docker.yml`) and
10081008

1009-
- :sage_root:`.github/workflows/ci-macos.yml`
1010-
(which calls :sage_root:`.github/workflows/macos.yml`).
1009+
- :sage_root:`.github/workflows/ci-macos.yml`.
10111010

10121011
GitHub Actions runs these build jobs on 2-core machines with 7 GB of
10131012
RAM memory and 14 GB of SSD disk space, cf.

0 commit comments

Comments
 (0)