diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d56c4fab0e..5993023290a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI Linux +name: CI on: push: @@ -13,7 +13,7 @@ on: # Allow to run manually jobs: - build: + linux: name: Build and Test runs-on: ubuntu-latest strategy: @@ -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/ diff --git a/pyproject.toml b/pyproject.toml index d4d023ae190..3fd80e54742 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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