Skip to content

Add homebrew-based CI run for meson #40515

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

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from
Draft
61 changes: 59 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Linux
name: CI

on:
push:
Expand All @@ -13,7 +13,7 @@ on:
# Allow to run manually

jobs:
build:
linux:
name: Build and Test
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -98,3 +98,60 @@ jobs:
path: |
build/cp313/meson-logs/
build/cp313/meson-info/

macos:
name: Build and Test (macos-${{ matrix.version }})
runs-on: macos-${{ matrix.version }}
strategy:
fail-fast: false
matrix:
version:
- '13'
- '14'
- '15'

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6.3.1

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
eval $(build/bin/sage-print-system-package-command homebrew update)
eval $(build/bin/sage-print-system-package-command homebrew --yes --ignore-missing install $(build/bin/sage-get-system-packages homebrew $(uv run --no-project build/bin/sage-package list :standard:)))

- name: Build
run: |
uv venv
# Install build dependencies manually as workaround for https://github.com/astral-sh/uv/issues/1516
uv pip install \
meson-python \
"cypari2 >=2.2.1" \
"cysignals >=1.11.2, != 1.12.0" \
"cython >=3.0, != 3.0.3, < 3.1.0" \
"gmpy2 ~=2.1.b999" \
memory_allocator \
"numpy >=1.25" \
jinja2 \
setuptools
uv sync --frozen --inexact --no-build-isolation -v

- name: Test
run: |
uv run --frozen ./sage -t --all -p4 || true

- name: Upload log
uses: actions/upload-artifact@v4.5.0
if: failure() || success()
with:
name: macos-${{ matrix.version }}-log
path: |
build/cp312/meson-logs/
build/cp312/meson-info/
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ requires = [
'memory_allocator',
'numpy >=1.25',
'jinja2',
'meson-python',
'cypari2 >=2.2.1; sys_platform != "win32"',
# Exclude 1.12.0 because of https://github.com/sagemath/cysignals/issues/212
'cysignals >=1.11.2, != 1.12.0',
# Exclude 3.0.3 because of https://github.com/cython/cython/issues/5748
'cython >=3.0, != 3.0.3',
'gmpy2 ~=2.1.b999',
'memory_allocator',
'numpy >=1.25',
'jinja2',
]
[tool.meson-python.args]
# Prevent meson from trying to install the autoconf subprojects
Expand Down
Loading