Skip to content

Commit e1a1704

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into typing-infinity
2 parents f9be16d + 28b7af0 commit e1a1704

File tree

743 files changed

+14922
-6627
lines changed

Some content is hidden

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

743 files changed

+14922
-6627
lines changed

.github/workflows/ci-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252

5353
- name: Install dependencies
5454
run: |
55+
brew uninstall --force cmake || true
5556
eval $(build/bin/sage-print-system-package-command homebrew update)
5657
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:)))
5758
@@ -68,4 +69,3 @@ jobs:
6869
run: |
6970
source ./.homebrew-build-env # Needed so that runtime cython can find the dependencies
7071
./sage -t --all -p4
71-

.github/workflows/ci-meson.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
# this step must be after build, because meson.build creates a number of __init__.py files
143143
# that is needed to make tools/update-meson.py run correctly
144144
shell: bash -l {0}
145-
if: matrix.tests == 'all'
145+
if: matrix.tests == 'all' && matrix.python == '3.12'
146146
run: |
147147
python tools/update-meson.py
148148
if ! ./tools/test-git-no-uncommitted-changes; then

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
paths:
99
- '**.build'
10+
- 'uv.lock'
1011
- 'subprojects/**'
1112
- '.github/workflows/ci.yml'
1213
workflow_dispatch:
@@ -50,7 +51,7 @@ jobs:
5051
uses: actions/checkout@v3
5152

5253
- name: Install uv
53-
uses: astral-sh/setup-uv@v6.4.3
54+
uses: astral-sh/setup-uv@v6.6.1
5455

5556
# We cannot use the setup python action because it doesn't support all containers
5657
# https://github.com/actions/setup-python/issues/527

.github/workflows/dist.yml

Lines changed: 13 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
upstream
7979
name: release_dist
8080

81-
sdists_for_pypi:
81+
sdists:
8282

8383
runs-on: ubuntu-latest
8484
env:
@@ -102,15 +102,6 @@ jobs:
102102
run: |
103103
conda install --yes python-build
104104
python -m build --sdist --no-isolation --outdir dist .
105-
106-
- name: Old sagemath-standard
107-
run: |
108-
sudo DEBIAN_FRONTEND=noninteractive apt-get update
109-
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap _prereq)
110-
./bootstrap
111-
./configure
112-
make pypi-sdists V=0
113-
mv upstream/sage*.tar.gz dist/
114105
ls -l dist
115106
116107
- uses: actions/upload-artifact@v4
@@ -127,92 +118,37 @@ jobs:
127118
if: env.CAN_DEPLOY == 'true'
128119

129120
release:
130-
131-
needs: [release_dist, sdists_for_pypi]
121+
needs: [release_dist, sdists]
132122
runs-on: ubuntu-latest
133-
if: (success() || failure()) && github.repository == 'sagemath/sage' && startsWith(github.ref, 'refs/tags/')
123+
if: github.ref_type == 'tag'
124+
permissions:
125+
contents: write
134126
steps:
135127
- uses: actions/download-artifact@v4
136128
with:
137129
name: release_dist
130+
138131
- uses: actions/download-artifact@v4
139132
with:
140133
name: dist
141134
path: dist
142-
- name: Create release
143-
env:
144-
GITHUB_PAT: ${{ secrets.RELEASE_CREATION_TOKEN }}
145-
run: |
146-
latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
147-
| jq -r 'sort_by(.created_at) | last(.[]).tag_name')
148-
release_notes=$(curl -s \
149-
-X POST \
150-
-H "Accept: application/vnd.github+json" \
151-
-H "Authorization: Bearer $GITHUB_PAT" \
152-
-H "X-GitHub-Api-Version: 2022-11-28" \
153-
https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \
154-
-d "{
155-
\"tag_name\": \"${{ github.ref_name }}\",
156-
\"previous_tag_name\": \"$latest_release_tag\"
157-
}" | jq -r '.body')
158-
# escape special characters for json
159-
release_notes=$(jq -R -s '.' <<< "$release_notes")
160-
curl -L \
161-
-X POST \
162-
-H "Accept: application/vnd.github+json" \
163-
-H "Authorization: Bearer $GITHUB_PAT" \
164-
-H "X-GitHub-Api-Version: 2022-11-28" \
165-
https://api.github.com/repos/${{ github.repository }}/releases \
166-
-d "{
167-
\"tag_name\": \"${{ github.ref_name }}\",
168-
\"prerelease\": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }},
169-
\"body\": $release_notes
170-
}"
135+
171136
- name: Create release assets
172137
uses: softprops/action-gh-release@v2
173138
with:
174139
files: |
175140
dist/*
176141
upstream/*
177-
token: ${{ secrets.GITHUB_TOKEN }}
178-
tag_name: ${{ github.ref_name }}
179-
permissions:
180-
contents: write
181-
182-
noarch_wheels_for_pypi:
183-
184-
runs-on: ubuntu-latest
185-
env:
186-
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' && github.event_name != 'pull_request' }}
187-
steps:
188-
- uses: actions/checkout@v4
189-
- name: Install bootstrap prerequisites
190-
run: |
191-
sudo DEBIAN_FRONTEND=noninteractive apt-get update
192-
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap _prereq)
193-
- name: make pypi-noarch-wheels
194-
run: |
195-
./bootstrap
196-
./configure
197-
make pypi-noarch-wheels V=0
198-
(mkdir dist && mv venv/var/lib/sage/wheels/sage*-none-any.whl dist/)
199-
ls -l dist
200-
- uses: actions/upload-artifact@v4
201-
with:
202-
path: "dist/*.whl"
203-
name: noarch-wheels
204-
- uses: pypa/gh-action-pypi-publish@release/v1
205-
with:
206-
user: __token__
207-
password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }}
208-
skip-existing: true
209-
verbose: true
210-
if: env.CAN_DEPLOY == 'true'
142+
token: ${{ secrets.RELEASE_CREATION_TOKEN }}
143+
generate_release_notes: true
144+
prerelease: ${{ contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
211145

212146
build_wheels:
147+
# Temporarily disabled due to build errors
148+
if: false
213149
name: wheels ${{ matrix.build }}*_${{ matrix.arch }}
214150
runs-on: ${{ matrix.os }}
215-
needs: sdists_for_pypi
151+
needs: sdists
216152
strategy:
217153
fail-fast: false
218154
matrix:
@@ -293,10 +229,6 @@ jobs:
293229
(cd unpacked && tar xfz - ) < $sdist
294230
done
295231
296-
- name: sagemath-objects
297-
run: |
298-
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*objects*
299-
300232
- name: sagemath-bliss
301233
run: |
302234
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*bliss*
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build live documentation
2+
3+
on:
4+
push:
5+
tags:
6+
# Match all release tags including beta, rc
7+
- '[0-9]+.[0-9]+'
8+
- '[0-9]+.[0-9]+.[0-9]+'
9+
- '[0-9]+.[0-9]+.beta[0-9]+'
10+
- '[0-9]+.[0-9]+.[0-9]+.beta[0-9]+'
11+
- '[0-9]+.[0-9]+.rc[0-9]+'
12+
- '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+'
13+
workflow_dispatch:
14+
15+
env:
16+
PYTHON_VERSION: 3.11
17+
18+
jobs:
19+
livedoc:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Cache conda packages
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/conda_pkgs_dir
29+
key:
30+
${{ runner.os }}-conda-${{ hashFiles('environment-${{ env.PYTHON_VERSION }}-linux.yml') }}
31+
32+
- name: Compiler cache
33+
uses: hendrikmuhs/[email protected]
34+
with:
35+
key: ${{ runner.os }}-meson-${{ env.PYTHON_VERSION }}
36+
37+
- name: Setup Conda environment
38+
uses: conda-incubator/setup-miniconda@v3
39+
with:
40+
python-version: ${{ env.PYTHON_VERSION }}
41+
# Disabled for now due to
42+
# https://github.com/conda-incubator/setup-miniconda/issues/379
43+
# miniforge-version: latest
44+
use-mamba: true
45+
channels: conda-forge
46+
channel-priority: true
47+
activate-environment: sage-dev
48+
environment-file: environment-${{ env.PYTHON_VERSION }}-linux.yml
49+
50+
- name: Build Sage
51+
shell: bash -l {0}
52+
run: |
53+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
54+
export CC="ccache $CC"
55+
export CXX="ccache $CXX"
56+
pip install --no-build-isolation --config-settings=builddir=builddir . -v
57+
58+
- name: Build pdf doc
59+
shell: bash -l {0}
60+
run: |
61+
sudo DEBIAN_FRONTEND=noninteractive sudo apt-get update
62+
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian texlive texlive_luatex free_fonts xindy)
63+
meson compile -C builddir doc-pdf
64+
65+
- name: Build live doc
66+
shell: bash -l {0}
67+
run: |
68+
meson compile -C builddir doc-html -j1
69+
env:
70+
SAGE_USE_CDNS: yes
71+
SAGE_LIVE_DOC: yes
72+
SAGE_JUPYTER_SERVER: "binder:sagemath/sage-binder-env/dev"
73+
74+
- name: Copy doc
75+
id: copy
76+
run: |
77+
mkdir -p ./doc
78+
cp -r builddir/src/doc/pdf doc/
79+
cp -rL builddir/src/doc/html doc/
80+
cp builddir/src/doc/index.html doc/
81+
zip -r livedoc.zip doc
82+
83+
- name: Upload livedoc
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: livedoc
87+
path: livedoc.zip

.github/workflows/doc-build-pdf.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ on:
44
pull_request:
55
merge_group:
66
push:
7-
tags:
8-
# Match all release tags including beta, rc
9-
- '[0-9]+.[0-9]+'
10-
- '[0-9]+.[0-9]+.[0-9]+'
11-
- '[0-9]+.[0-9]+.beta[0-9]+'
12-
- '[0-9]+.[0-9]+.[0-9]+.beta[0-9]+'
13-
- '[0-9]+.[0-9]+.rc[0-9]+'
14-
- '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+'
157
branches:
168
- develop
179
workflow_dispatch:
@@ -44,7 +36,7 @@ jobs:
4436
path: ~/conda_pkgs_dir
4537
key:
4638
${{ runner.os }}-conda-${{ hashFiles('environment-${{ env.PYTHON_VERSION }}-linux.yml') }}
47-
39+
4840
- name: Compiler cache
4941
uses: hendrikmuhs/[email protected]
5042
with:
@@ -62,7 +54,7 @@ jobs:
6254
channel-priority: true
6355
activate-environment: sage-dev
6456
environment-file: environment-${{ env.PYTHON_VERSION }}-linux.yml
65-
57+
6658
- name: Build Sage
6759
shell: bash -l {0}
6860
run: |

.github/workflows/doc-build.yml

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ on:
44
pull_request:
55
merge_group:
66
push:
7-
tags:
8-
# Match all release tags including beta, rc
9-
- '[0-9]+.[0-9]+'
10-
- '[0-9]+.[0-9]+.[0-9]+'
11-
- '[0-9]+.[0-9]+.beta[0-9]+'
12-
- '[0-9]+.[0-9]+.[0-9]+.beta[0-9]+'
13-
- '[0-9]+.[0-9]+.rc[0-9]+'
14-
- '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+'
157
branches:
168
- develop
179
workflow_dispatch:
@@ -74,6 +66,7 @@ jobs:
7466
#
7567
# For pull requests
7668
#
69+
7770
- name: Get workflow run-id
7871
if: github.event_name == 'pull_request'
7972
run: |
@@ -113,7 +106,7 @@ jobs:
113106
mathjax_path_from="[-./A-Za-z_]*/tex-chtml[.]js?v=[0-9a-f]*"
114107
# mathjax path in new doc
115108
mathjax_path_to=$(SAGE_USE_CDNS=yes python -c "from src.sage_docbuild.conf import mathjax_path; print(mathjax_path)")
116-
new_version=$(cat src/VERSION.txt)
109+
new_version=$(cat VERSION.txt)
117110
# Wipe out chronic diffs between old doc and new doc
118111
(cd doc && \
119112
find . -name "*.html" | xargs sed -i -e '/class="sidebar-brand-text"/ s/Sage [0-9a-z.]* /Sage '"$new_version"' /' \
@@ -195,7 +188,7 @@ jobs:
195188
path: doc.zip
196189

197190
#
198-
# On release events
191+
# On push events
199192
#
200193

201194
- name: Upload doc-develop
@@ -205,34 +198,3 @@ jobs:
205198
with:
206199
name: doc-${{ github.ref_name }}
207200
path: doc.zip
208-
209-
# The following fails randomly
210-
# - name: Build live doc
211-
# if: github.event_name != 'pull_request'
212-
# shell: bash -l {0}
213-
# run: |
214-
# # Remove previous doc build
215-
# rm -rf builddir/src/doc
216-
# meson compile -C builddir doc-html
217-
# env:
218-
# SAGE_USE_CDNS: yes
219-
# SAGE_LIVE_DOC: yes
220-
# SAGE_JUPYTER_SERVER: binder:sagemath/sage-binder-env/dev
221-
# SAGE_DOCBUILD_OPTS: "--include-tests-blocks"
222-
223-
# - name: Copy live doc
224-
# if: github.event_name != 'pull_request'
225-
# run: |
226-
# mkdir -p ./livedoc
227-
# # We copy everything to a local folder
228-
# cp -r builddir/src/doc/html livedoc/
229-
# cp builddir/src/doc/index.html livedoc/
230-
# zip -r livedoc.zip livedoc
231-
232-
# - name: Upload live doc
233-
# if: github.event_name != 'pull_request'
234-
# uses: actions/upload-artifact@v4
235-
# with:
236-
# name: livedoc
237-
# path: livedoc.zip
238-

0 commit comments

Comments
 (0)