Skip to content

Commit

Permalink
Merge branch 'develop' into pyproject-sagelib
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Apr 28, 2024
2 parents 744da89 + c4363fc commit e8a5733
Show file tree
Hide file tree
Showing 386 changed files with 12,370 additions and 6,765 deletions.
2 changes: 0 additions & 2 deletions .devcontainer/onCreate-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ conda init bash

# Build sage
conda run -n sage-dev ./bootstrap
conda run -n sage-dev ./configure --with-python=/opt/conda/envs/sage-dev/bin/python --prefix=/opt/conda/envs/sage-dev
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// from .devcontainer/portability-devcontainer.json.in
// See https://aka.ms/devcontainer.json for format details.
{
"name": "ubuntu-trusty-toolchain-gcc_9-minimal (≥ 8-core)",
"name": "fedora-40-minimal (≥ 8-core)",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "ubuntu-trusty-toolchain-gcc_9",
"SYSTEM_FACTOR": "fedora-40",
"PACKAGE_FACTOR": "minimal",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// from .devcontainer/portability-devcontainer.json.in
// See https://aka.ms/devcontainer.json for format details.
{
"name": "ubuntu-trusty-toolchain-gcc_9-standard (≥ 8-core)",
"name": "fedora-40-standard (≥ 8-core)",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "ubuntu-trusty-toolchain-gcc_9",
"SYSTEM_FACTOR": "fedora-40",
"PACKAGE_FACTOR": "standard",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// from .devcontainer/portability-devcontainer.json.in
// See https://aka.ms/devcontainer.json for format details.
{
"name": "opensuse-15.3-gcc_11-python3.9-minimal (≥ 8-core)",
"name": "gentoo-python3.12-minimal (≥ 8-core)",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "opensuse-15.3-gcc_11-python3.9",
"SYSTEM_FACTOR": "gentoo-python3.12",
"PACKAGE_FACTOR": "minimal",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// from .devcontainer/portability-devcontainer.json.in
// See https://aka.ms/devcontainer.json for format details.
{
"name": "opensuse-15.3-gcc_11-python3.9-standard (≥ 8-core)",
"name": "gentoo-python3.12-standard (≥ 8-core)",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "opensuse-15.3-gcc_11-python3.9",
"SYSTEM_FACTOR": "gentoo-python3.12",
"PACKAGE_FACTOR": "standard",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// from .devcontainer/portability-devcontainer.json.in
// See https://aka.ms/devcontainer.json for format details.
{
"name": "opensuse-15.4-gcc_11-python3.10-minimal (≥ 8-core)",
"name": "linuxmint-21.3-minimal (≥ 8-core)",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "opensuse-15.4-gcc_11-python3.10",
"SYSTEM_FACTOR": "linuxmint-21.3",
"PACKAGE_FACTOR": "minimal",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// from .devcontainer/portability-devcontainer.json.in
// See https://aka.ms/devcontainer.json for format details.
{
"name": "opensuse-15.4-gcc_11-python3.10-standard (≥ 8-core)",
"name": "linuxmint-21.3-standard (≥ 8-core)",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "opensuse-15.4-gcc_11-python3.10",
"SYSTEM_FACTOR": "linuxmint-21.3",
"PACKAGE_FACTOR": "standard",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
Expand Down
25 changes: 25 additions & 0 deletions .devcontainer/portability-ubuntu-noble-minimal/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// The command "tox -e update_docker_platforms"
// creates .devcontainer/portability-*-*/devcontainer.json
// from .devcontainer/portability-devcontainer.json.in
// See https://aka.ms/devcontainer.json for format details.
{
"name": "ubuntu-noble-minimal (≥ 8-core)",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "ubuntu-noble",
"PACKAGE_FACTOR": "minimal",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
}
},
"containerEnv": {
"MAKE": "make -j4"
},
"onCreateCommand": ".devcontainer/onCreate.sh",
"updateContentCommand": ".devcontainer/portability-updateContent.sh",
"extensions": [
"ms-python.python"
]
}
25 changes: 25 additions & 0 deletions .devcontainer/portability-ubuntu-noble-standard/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// The command "tox -e update_docker_platforms"
// creates .devcontainer/portability-*-*/devcontainer.json
// from .devcontainer/portability-devcontainer.json.in
// See https://aka.ms/devcontainer.json for format details.
{
"name": "ubuntu-noble-standard (≥ 8-core)",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "ubuntu-noble",
"PACKAGE_FACTOR": "standard",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
}
},
"containerEnv": {
"MAKE": "make -j4"
},
"onCreateCommand": ".devcontainer/onCreate.sh",
"updateContentCommand": ".devcontainer/portability-updateContent.sh",
"extensions": [
"ms-python.python"
]
}
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- [ ] 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 accordingly.
- [ ] I have updated the documentation and checked the documentation preview.

### :hourglass: Dependencies

Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
platform:
description: 'Platform'
required: true
default: 'ubuntu-focal-standard'
default: 'ubuntu-jammy-standard'
docker_tag:
description: 'Docker tag'
required: true
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:

build:
runs-on: ubuntu-latest
container: ghcr.io/sagemath/sage/sage-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
container: ghcr.io/sagemath/sage/sage-${{ github.event.inputs.platform || 'ubuntu-jammy-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
needs: [get_ci_fixes]
steps:
- name: Checkout
Expand Down Expand Up @@ -93,16 +93,16 @@ jobs:
./bootstrap && make build
working-directory: ./worktree-image
env:
MAKE: make -j2 --output-sync=recurse
SAGE_NUM_THREADS: 2
MAKE: make -j4 --output-sync=recurse
SAGE_NUM_THREADS: 4

- name: Build modularized distributions
if: (success() || failure()) && steps.worktree.outcome == 'success'
run: make V=0 tox && make SAGE_CHECK=no pypi-wheels
working-directory: ./worktree-image
env:
MAKE: make -j2 --output-sync=recurse
SAGE_NUM_THREADS: 2
MAKE: make -j4 --output-sync=recurse
SAGE_NUM_THREADS: 4

- name: Static code check with pyright
if: (success() || failure()) && steps.worktree.outcome == 'success'
Expand Down Expand Up @@ -137,8 +137,8 @@ jobs:
./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status
working-directory: ./worktree-image
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2
MAKE: make -j4
SAGE_NUM_THREADS: 4

- name: Build
# This step is needed because building the modularized distributions installs some optional packages,
Expand All @@ -149,8 +149,8 @@ jobs:
make build
working-directory: ./worktree-image
env:
MAKE: make -j2 --output-sync=recurse
SAGE_NUM_THREADS: 2
MAKE: make -j4 --output-sync=recurse
SAGE_NUM_THREADS: 4

# Testing

Expand All @@ -161,16 +161,16 @@ jobs:
./sage -t --new -p2
working-directory: ./worktree-image
env:
MAKE: make -j2 --output-sync=recurse
SAGE_NUM_THREADS: 2
MAKE: make -j4 --output-sync=recurse
SAGE_NUM_THREADS: 4

- name: Test modularized distributions
if: (success() || failure()) && steps.build.outcome == 'success'
run: make V=0 tox && make pypi-wheels-check
working-directory: ./worktree-image
env:
MAKE: make -j2 --output-sync=recurse
SAGE_NUM_THREADS: 2
MAKE: make -j4 --output-sync=recurse
SAGE_NUM_THREADS: 4

- name: Check that all modules can be imported
run: |
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
# environment: [environment, environment-optional]
conda-env: [environment]
# On pull requests, only test two jobs:
# Ubuntu with Python 3.9, macOS with Python 3.10.
# Build & Test currently uses Python 3.11 (on ubuntu-focal).
# Ubuntu with Python 3.9, macOS with Python 3.11.
# Build & Test currently uses Python 3.10 (on ubuntu-jammy).
# Together, they cover the supported minor Python versions.
include: >-
${{ github.event_name == 'pull_request'
&& fromJson('[{"os": "macos", "python": "3.10", "conda-env": "environment"}]')
&& fromJson('[{"os": "macos", "python": "3.11", "conda-env": "environment"}]')
|| fromJson('[]') }}
steps:
Expand All @@ -54,7 +54,7 @@ jobs:
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}

- name: Cache conda packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/conda_pkgs_dir
key:
Expand All @@ -77,21 +77,16 @@ jobs:
conda info
conda list
- name: Configure
- name: Bootstrap
shell: bash -l {0}
continue-on-error: true
run: |
./bootstrap
echo "::add-matcher::.github/workflows/configure-systempackage-problem-matcher.json"
./configure --enable-build-as-root --with-python=$CONDA_PREFIX/bin/python --prefix=$CONDA_PREFIX --enable-system-site-packages $(for pkg in $(./sage -package list :standard: --has-file spkg-configure.m4 --has-file distros/conda.txt --exclude rpy2); do echo --with-system-$pkg=force; done)
echo "::remove-matcher owner=configure-system-package-warning::"
echo "::remove-matcher owner=configure-system-package-error::"
- name: Build
shell: bash -l {0}
run: |
# Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda.
pip install --no-build-isolation --no-deps -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup
pip install --no-build-isolation --no-deps --config-settings editable_mode=compat -v -v -e ./src
env:
SAGE_NUM_THREADS: 2
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
targets: build doc-html
targets_optional: ptest
tox_system_factors: >-
["ubuntu-focal"]
["ubuntu-jammy"]
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/
Expand Down Expand Up @@ -111,18 +111,11 @@ jobs:
["ubuntu-jammy",
"ubuntu-lunar",
"ubuntu-mantic",
"debian-bullseye",
"debian-bookworm",
"debian-trixie",
"debian-sid",
"linuxmint-21",
"linuxmint-21.1",
"linuxmint-21.2",
"fedora-33",
"fedora-34",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"fedora-39",
"centos-stream-8-python3.9",
Expand All @@ -131,11 +124,9 @@ jobs:
"gentoo-python3.10",
"gentoo-python3.11",
"archlinux-latest",
"opensuse-15.4-gcc_11-python3.10",
"opensuse-15.5-gcc_11-python3.11",
"opensuse-tumbleweed-python3.10",
"opensuse-tumbleweed",
"debian-bullseye-i386"]
"opensuse-tumbleweed"]
docker_push_repository: ghcr.io/${{ github.repository }}/
max_parallel: 8

Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ jobs:
- os: ubuntu-latest
arch: i686
- os: macos-latest
arch: auto
arch: x86_64
- os: macos-14
arch: arm64
env:
# SPKGs to install as system packages
SPKGS: _bootstrap _prereq
Expand All @@ -141,6 +143,14 @@ jobs:
name: dist
path: dist

- uses: actions/setup-python@v5
# As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx.
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
id: python
with:
python-version: "3.8 - 3.12"
update-environment: false

- name: Build platform wheels
# We build the wheels from the sdists so that MANIFEST filtering becomes effective.
# But we must run cibuildwheel with the unpacked source directory, not a tarball,
Expand All @@ -151,12 +161,13 @@ jobs:
# This is unfortunately repeated for each of the packages that we build wheels for
# because CIBW starts with a fresh container on each invocation.
run: |
"${{ steps.python.outputs.python-path }}" -m pip install pipx
export PATH=build/bin:$PATH
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root && make -j4 V=0 $TARGETS_PRE"
mkdir -p unpacked
for pkg in sagemath-objects sagemath-categories; do
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
pipx run cibuildwheel==2.16.2 unpacked/$pkg*
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg*
done
- uses: actions/upload-artifact@v3
Expand Down
Loading

0 comments on commit e8a5733

Please sign in to comment.