Skip to content

Commit 8e2deb1

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into union-enumerate-inf
2 parents cfa8d37 + 7d83063 commit 8e2deb1

File tree

231 files changed

+3124
-2138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+3124
-2138
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ jobs:
107107
uses: tj-actions/changed-files@v45
108108
with:
109109
# File extensions for doctests per sage.doctest.control.skipfile
110+
# Also src/sage/doctests/tests/ are excluded because of nodoctest file
111+
# which would make sage.doctest.control.skipdir return True
110112
files_yaml: |
111113
configures:
112114
- 'build/pkgs/*/spkg-configure.m4'
@@ -118,6 +120,7 @@ jobs:
118120
doctests:
119121
- 'src/**/*.{py,pyx,pxd,pxi,sage,spyx,rst,tex}'
120122
- '!src/{setup,conftest*}.py'
123+
- '!src/sage/doctest/tests/*'
121124
122125
- name: Determine targets to build
123126
id: build-targets
@@ -246,7 +249,7 @@ jobs:
246249
./sage -python -m pytest -c tox.ini -qq --doctest --collect-only || true
247250
shell: sh .ci/docker-exec-script.sh BUILD /sage {0}
248251

249-
- name: Test changed files (sage -t --new)
252+
- name: Test changed files
250253
if: (success() || failure()) && steps.container.outcome == 'success' && steps.changed-files.outputs.doctests_all_changed_files
251254
run: |
252255
export MAKE="make -j2 --output-sync=recurse" SAGE_NUM_THREADS=4

.github/workflows/ci-linux-incremental.yml

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CI Linux incremental
22

3-
## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
3+
## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with selected environments,
44
## whenever a GitHub pull request is opened or synchronized in a repository
55
## where GitHub Actions are enabled.
66
##
@@ -99,56 +99,9 @@ jobs:
9999
"debian-bullseye",
100100
"debian-bookworm",
101101
"fedora-30",
102-
"fedora-40",
103-
"gentoo-python3.11",
104-
"debian-bullseye-i386"]
102+
"fedora-40",]
105103
tox_packages_factors: >-
106104
["standard",
107105
"minimal"]
108106
docker_push_repository: ghcr.io/${{ github.repository }}/
109107
max_parallel: 8
110-
111-
constraints_pkgs-norequirements:
112-
needs: [changed_files]
113-
uses: ./.github/workflows/docker.yml
114-
with:
115-
# Build incrementally from published Docker image
116-
incremental: true
117-
free_disk_space: true
118-
from_docker_repository: ghcr.io/sagemath/sage/
119-
from_docker_target: "with-targets-pre"
120-
from_docker_tag: "dev"
121-
docker_targets: "with-targets-pre"
122-
targets_pre: "${{needs.changed_files.outputs.build_targets}} all-sage-local python3-ensure tox-ensure sagelib-tox-sagepython-constraints_pkgs-norequirements"
123-
tox_system_factors: >-
124-
["ubuntu-focal",
125-
"ubuntu-noble",
126-
"debian-bookworm",
127-
"fedora-40",
128-
"debian-bullseye-i386"]
129-
tox_packages_factors: >-
130-
["standard"]
131-
docker_push_repository: ghcr.io/${{ github.repository }}/
132-
max_parallel: 16
133-
134-
site:
135-
needs: [changed_files]
136-
uses: ./.github/workflows/docker.yml
137-
with:
138-
# Build incrementally from published Docker image
139-
incremental: true
140-
free_disk_space: true
141-
from_docker_repository: ghcr.io/sagemath/sage/
142-
from_docker_target: "with-targets"
143-
from_docker_tag: "dev"
144-
docker_targets: "with-targets"
145-
targets: "${{needs.changed_files.outputs.build_targets}} doc-html ptest-nodoc"
146-
# Only test systems with a usable system python (>= 3.9)
147-
# with only a small number of test failures as of 10.2.rc0
148-
tox_system_factors: >-
149-
["gentoo-python3.11",
150-
"archlinux-latest",
151-
"fedora-40"]
152-
tox_packages_factors: >-
153-
["standard-sitepackages"]
154-
docker_push_repository: ghcr.io/${{ github.repository }}/

.github/workflows/ci-linux.yml

Lines changed: 8 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: CI Linux
22

3-
## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
4-
## whenever a GitHub pull request is opened or synchronized in a repository
5-
## where GitHub Actions are enabled.
3+
## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with selected environments,
4+
## whenever a tag is pushed.
65
##
76
## It builds and checks some sage spkgs as defined in TARGETS.
87
##
@@ -33,29 +32,7 @@ permissions:
3332
packages: write
3433

3534
jobs:
36-
37-
# standard (without ptest) for the default platform (used by build.yml etc.)
38-
default:
39-
uses: ./.github/workflows/docker.yml
40-
with:
41-
# Build from scratch
42-
free_disk_space: true
43-
docker_targets: "with-system-packages configured with-targets-pre with-targets"
44-
# FIXME: duplicated from env.TARGETS
45-
targets_pre: all-sage-local
46-
targets: build doc-html
47-
targets_optional: ptest
48-
tox_system_factors: >-
49-
["ubuntu-jammy"]
50-
tox_packages_factors: >-
51-
["standard"]
52-
docker_push_repository: ghcr.io/${{ github.repository }}/
53-
logs_artifact: false
54-
55-
# All platforms. This duplicates the default platform, but why not,
56-
# it makes it more robust regarding random timeouts.
57-
58-
standard:
35+
minimal:
5936
if: ${{ success() || failure() }}
6037
uses: ./.github/workflows/docker.yml
6138
with:
@@ -66,124 +43,21 @@ jobs:
6643
targets_pre: all-sage-local
6744
targets: build doc-html
6845
targets_optional: ptest
46+
tox_system_factors: >-
47+
["ubuntu-jammy"]
6948
tox_packages_factors: >-
70-
["standard"]
49+
["minimal"]
7150
docker_push_repository: ghcr.io/${{ github.repository }}/
72-
# Make sure that all "standard" jobs can start simultaneously,
73-
# so that runners are available by the time that "default" starts.
74-
max_parallel: 50
75-
76-
standard-constraints_pkgs-norequirements:
77-
if: ${{ success() || failure() }}
78-
needs: [standard]
79-
uses: ./.github/workflows/docker.yml
80-
with:
81-
# Build incrementally from previous stage (pre)
82-
incremental: true
83-
free_disk_space: true
84-
from_docker_repository: ghcr.io/${{ github.repository }}/
85-
from_docker_target: "with-targets-pre"
86-
docker_targets: "with-targets-pre"
87-
targets_pre: all-sage-local python3-ensure tox-ensure sagelib-tox-sagepython-constraints_pkgs-norequirements
88-
tox_packages_factors: >-
89-
["standard"]
90-
max_parallel: 15
9151

92-
standard-sitepackages:
93-
if: ${{ success() || failure() }}
94-
needs: [standard]
52+
standard:
9553
uses: ./.github/workflows/docker.yml
9654
with:
97-
# Build incrementally from previous stage (pre)
98-
incremental: true
9955
free_disk_space: true
100-
from_docker_repository: ghcr.io/${{ github.repository }}/
101-
from_docker_target: "with-targets-pre"
102-
docker_targets: "with-targets with-targets-optional"
103-
# FIXME: duplicated from env.TARGETS
104-
targets: build doc-html
105-
targets_optional: ptest
106-
tox_packages_factors: >-
107-
["standard-sitepackages"]
108-
# Only test systems with a usable system python (>= 3.9)
109-
tox_system_factors: >-
110-
["ubuntu-jammy",
111-
"ubuntu-lunar",
112-
"ubuntu-mantic",
113-
"debian-bookworm",
114-
"debian-trixie",
115-
"debian-sid",
116-
"linuxmint-21.1",
117-
"linuxmint-21.2",
118-
"fedora-40",
119-
"centos-stream-9-python3.9",
120-
"almalinux-8-python3.9",
121-
"gentoo-python3.10",
122-
"gentoo-python3.11",
123-
"archlinux-latest",
124-
"opensuse-15.5-gcc_11-python3.11",
125-
"opensuse-tumbleweed-python3.10",
126-
"opensuse-tumbleweed"]
127-
docker_push_repository: ghcr.io/${{ github.repository }}/
128-
max_parallel: 8
129-
130-
minimal:
131-
if: ${{ success() || failure() }}
132-
uses: ./.github/workflows/docker.yml
133-
with:
13456
# Build from scratch
135-
free_disk_space: true
13657
docker_targets: "with-system-packages configured with-targets-pre with-targets with-targets-optional"
137-
# FIXME: duplicated from env.TARGETS
13858
targets_pre: all-sage-local
13959
targets: build doc-html
14060
targets_optional: ptest
14161
tox_packages_factors: >-
142-
["minimal"]
143-
docker_push_repository: ghcr.io/${{ github.repository }}/
144-
# Reduced from 30 because it may run in parallel with 'standard' and 'standard-sitepackages' above.
145-
# Calibrated for clogging the job pipeline until the "default" job has finished.
146-
max_parallel: 24
147-
148-
maximal-pre:
149-
if: ${{ success() || failure() }}
150-
needs: [minimal]
151-
uses: ./.github/workflows/docker.yml
152-
with:
153-
free_disk_space: true
154-
# Build from scratch
155-
docker_targets: "with-system-packages configured with-targets-pre"
156-
# FIXME: duplicated from env.TARGETS
157-
targets_pre: all-sage-local
158-
tox_packages_factors: >-
159-
["maximal"]
62+
["standard"]
16063
docker_push_repository: ghcr.io/${{ github.repository }}/
161-
162-
optional:
163-
if: ${{ success() || failure() }}
164-
needs: [maximal-pre]
165-
uses: ./.github/workflows/docker.yml
166-
with:
167-
incremental: true
168-
free_disk_space: true
169-
from_docker_repository: ghcr.io/${{ github.repository }}/
170-
from_docker_target: "with-targets-pre"
171-
tox_packages_factors: >-
172-
["maximal"]
173-
docker_targets: "with-targets-optional"
174-
# We remove packages starting with _, in particular package _develop
175-
targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :optional: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc | grep -v ^_))'
176-
177-
experimental:
178-
if: ${{ success() || failure() }}
179-
needs: [optional]
180-
uses: ./.github/workflows/docker.yml
181-
with:
182-
incremental: true
183-
free_disk_space: true
184-
from_docker_repository: ghcr.io/${{ github.repository }}/
185-
from_docker_target: "with-targets-pre"
186-
tox_packages_factors: >-
187-
["maximal"]
188-
docker_targets: "with-targets-optional"
189-
targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :experimental: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc))'

.github/workflows/ci-macos.yml

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -99,61 +99,3 @@ jobs:
9999
with:
100100
path: "dist/*.tar.gz"
101101
name: dist
102-
103-
local-macos-nohomebrew:
104-
105-
needs: [dist]
106-
107-
runs-on: ${{ matrix.os }}
108-
strategy:
109-
fail-fast: false
110-
max-parallel: 4
111-
matrix:
112-
os: [ macos-12, macos-13, macos-14 ]
113-
tox_system_factor: [macos-nobootstrap]
114-
tox_packages_factor: [minimal]
115-
xcode_version_factor: [default]
116-
env:
117-
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
118-
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}-xcode_${{ matrix.xcode_version_factor }}
119-
steps:
120-
- uses: actions/checkout@v4
121-
if: "!contains(matrix.tox_system_factor, 'nobootstrap')"
122-
- uses: actions/download-artifact@v4
123-
with:
124-
path: .
125-
name: dist
126-
if: contains(matrix.tox_system_factor, 'nobootstrap')
127-
- name: Unpack sage dist
128-
run: |
129-
tar xf sage*.tar.gz --strip-components=1
130-
if: contains(matrix.tox_system_factor, 'nobootstrap')
131-
- name: Move homebrew away
132-
run: |
133-
(cd $(brew --prefix) && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done)
134-
- name: Select Xcode version
135-
run: |
136-
if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi
137-
- name: Install test prerequisites
138-
run: |
139-
sudo /usr/bin/python3 -m pip install tox
140-
- name: Build and test with tox
141-
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
142-
# For doctesting, we use a lower parallelization to avoid timeouts.
143-
run: |
144-
(sleep 20000; pkill make) &
145-
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS
146-
- name: Prepare logs artifact
147-
run: |
148-
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
149-
if: always()
150-
- uses: actions/upload-artifact@v4
151-
with:
152-
path: artifacts
153-
name: ${{ env.LOGS_ARTIFACT_NAME }}
154-
if: always()
155-
- name: Print out logs for immediate inspection
156-
# and markup the output with GitHub Actions logging commands
157-
run: |
158-
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
159-
if: always()

.github/workflows/ci-meson.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,21 @@ concurrency:
1616

1717
jobs:
1818
test:
19-
name: Conda (${{ matrix.os }}, Python ${{ matrix.python }})
19+
name: Conda (${{ matrix.os }}, Python ${{ matrix.python }}${{ matrix.editable && ', editable' || '' }})
2020
runs-on: ${{ matrix.os }}-latest
2121

2222
strategy:
2323
fail-fast: false
2424
matrix:
2525
os: [ubuntu]
2626
python: ['3.11', '3.12']
27+
editable:
28+
${{ fromJson(github.event_name == 'pull_request' && '[false]' || '[false, true]') }}
29+
include:
30+
# one additional editable run in pull_request, this has no effect if not pull_request
31+
- os: ubuntu
32+
python: 3.12
33+
editable: true
2734

2835
steps:
2936
- uses: actions/checkout@v4
@@ -70,7 +77,7 @@ jobs:
7077
export CC="ccache $CC"
7178
export CXX="ccache $CXX"
7279
# Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda
73-
pip install --no-build-isolation --no-deps --config-settings=builddir=builddir . -v
80+
pip install --no-build-isolation --no-deps --config-settings=builddir=builddir ${{ matrix.editable && '--editable' || '' }} . -v
7481
7582
- name: Check update-meson
7683
# this step must be after build, because meson.build creates a number of __init__.py files
@@ -93,12 +100,14 @@ jobs:
93100
shell: bash -l {0}
94101
run: |
95102
# We don't install sage_setup, so don't try to test it
96-
rm -R ./src/sage_setup/
103+
# If editable then deleting the directory will cause sage to detect rebuild, which will cause ninja to fail
104+
# so we don't delete the directory in this case
105+
${{ matrix.editable && 'true' || 'rm -R ./src/sage_setup/' }}
97106
./sage -t --all -p4 --format github
98107
99108
- name: Upload log
100109
uses: actions/[email protected]
101110
if: failure()
102111
with:
103-
name: ${{ runner.os }}-meson-${{ matrix.python }}-log
112+
name: ${{ runner.os }}-meson-${{ matrix.python }}${{ matrix.editable && '-editable' || '' }}-log
104113
path: builddir/meson-logs/

0 commit comments

Comments
 (0)