Skip to content

Commit 949d94e

Browse files
authored
Merge branch 'develop' into fix_quaternion_37488
2 parents 54a1376 + b693ea9 commit 949d94e

File tree

1,428 files changed

+10186
-5332
lines changed

Some content is hidden

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

1,428 files changed

+10186
-5332
lines changed

.ci/merge-fixes.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ for REPO in ${SAGE_CI_FIXES_FROM_REPOSITORIES:-sagemath/sage}; do
4242
# Considered alternative: Use https://github.com/$REPO/pull/$a.diff,
4343
# which squashes everything into one diff without commit metadata.
4444
PULL_URL="https://github.com/$REPO/pull/$a"
45+
PULL_SHORT="$REPO#$a"
4546
PULL_FILE="$REPO_FILE-$a"
4647
PATH=build/bin:$PATH build/bin/sage-download-file --quiet "$PULL_URL.patch" $PULL_FILE.patch
4748
date -u +"%Y-%m-%dT%H:%M:%SZ" > $PULL_FILE.date # Record the date, for future reference
@@ -67,7 +68,7 @@ for REPO in ${SAGE_CI_FIXES_FROM_REPOSITORIES:-sagemath/sage}; do
6768
git am --signoff --show-current-patch=diff
6869
echo "--------------------------------------------------------------------8<-----------------------------"
6970
echo "::endgroup::"
70-
echo "Failure applying $PULL_URL as a patch, resetting"
71+
echo "Failure applying $PULL_SHORT as a patch, resetting"
7172
git am --signoff --abort
7273
fi
7374
done

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535
uses: actions/checkout@v4
3636
- name: Merge CI fixes from sagemath/sage
3737
run: |
38-
.ci/merge-fixes.sh
38+
mkdir -p upstream
39+
.ci/merge-fixes.sh 2>&1 | tee upstream/ci_fixes.log
3940
env:
4041
GH_TOKEN: ${{ github.token }}
4142
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
4243
- name: Store CI fixes in upstream artifact
4344
run: |
44-
mkdir -p upstream
4545
if git format-patch --stdout test_base > ci_fixes.patch; then
4646
cp ci_fixes.patch upstream/
4747
fi

.github/workflows/ci-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
uses: ./.github/workflows/docker.yml
4040
with:
4141
# Build from scratch
42+
free_disk_space: true
4243
docker_targets: "with-system-packages configured with-targets-pre with-targets"
4344
# FIXME: duplicated from env.TARGETS
4445
targets_pre: all-sage-local

.github/workflows/ci-macos.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
uses: ./.github/workflows/macos.yml
3535
with:
3636
stage: "1"
37+
timeout: 14400
3738

3839
stage-2:
3940
uses: ./.github/workflows/macos.yml
@@ -90,7 +91,7 @@ jobs:
9091
run: |
9192
git config --global user.email "nobody@example.com"
9293
git config --global user.name "Sage GitHub CI"
93-
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe --tags) || echo "(ignoring error)"
94+
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(cat src/VERSION.txt).dev0 || echo "(ignoring error)"
9495
- name: make dist
9596
run: |
9697
./configure --enable-download-from-upstream-url && make dist
@@ -108,7 +109,7 @@ jobs:
108109
fail-fast: false
109110
max-parallel: 4
110111
matrix:
111-
os: [ macos-11, macos-12 ]
112+
os: [ macos-11, macos-12, macos-14 ]
112113
tox_system_factor: [macos-nobootstrap]
113114
tox_packages_factor: [minimal]
114115
xcode_version_factor: [default]
@@ -129,7 +130,7 @@ jobs:
129130
if: contains(matrix.tox_system_factor, 'nobootstrap')
130131
- name: Move homebrew away
131132
run: |
132-
(cd /usr/local && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done)
133+
(cd $(brew --prefix) && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done)
133134
- name: Select Xcode version
134135
run: |
135136
if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi
@@ -140,7 +141,8 @@ jobs:
140141
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
141142
# For doctesting, we use a lower parallelization to avoid timeouts.
142143
run: |
143-
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
144+
(sleep 20000; pkill make) &
145+
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS
144146
- name: Prepare logs artifact
145147
run: |
146148
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
uses: actions/checkout@v4
3030
- name: Merge CI fixes from sagemath/sage
3131
run: |
32-
.ci/merge-fixes.sh
32+
mkdir -p upstream
33+
.ci/merge-fixes.sh 2>&1 | tee upstream/ci_fixes.log
3334
env:
3435
GH_TOKEN: ${{ github.token }}
3536
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
3637
- name: Store CI fixes in upstream artifact
3738
run: |
38-
mkdir -p upstream
3939
if git format-patch --stdout test_base > ci_fixes.patch; then
4040
cp ci_fixes.patch upstream/
4141
fi

.github/workflows/doc-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
uses: actions/checkout@v4
2525
- name: Merge CI fixes from sagemath/sage
2626
run: |
27-
.ci/merge-fixes.sh
27+
mkdir -p upstream
28+
.ci/merge-fixes.sh 2>&1 | tee upstream/ci_fixes.log
2829
env:
2930
GH_TOKEN: ${{ github.token }}
3031
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
3132
- name: Store CI fixes in upstream artifact
3233
run: |
33-
mkdir -p upstream
3434
if git format-patch --stdout test_base > ci_fixes.patch; then
3535
cp ci_fixes.patch upstream/
3636
fi

.github/workflows/docker.yml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,8 @@ jobs:
248248
- name: Copy logs from the Docker image or build container
249249
run: |
250250
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
251-
cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
252-
if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags) /bin/bash || true); fi
253-
if [ -n "$CONTAINERS" ]; then for CONTAINER in $CONTAINERS; do for ARTIFACT in /sage/logs; do docker cp $CONTAINER:$ARTIFACT artifacts/$LOGS_ARTIFACT_NAME && HAVE_LOG=1; done; if [ -n "$HAVE_LOG" ]; then break; fi; done; fi
251+
cp -r .tox/$TOX_ENV/* "artifacts/$LOGS_ARTIFACT_NAME"
252+
rm -rf "artifacts/$LOGS_ARTIFACT_NAME"/{bin,lib,pyvenv.cfg}
254253
if: always()
255254
- uses: actions/upload-artifact@v3
256255
with:
@@ -262,9 +261,46 @@ jobs:
262261
run: |
263262
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
264263
if: always()
265-
- name: List docker images
264+
- name: List Docker images
266265
run: |
267-
if [ -f .tox/$TOX_ENV/Dockertags ]; then
268-
cat .tox/$TOX_ENV/Dockertags
266+
if [ -n "$DOCKER_PUSH_REPOSITORY" -a -f .tox/$TOX_ENV/Dockertags.pushed ]; then
267+
set -- $(cat .tox/$TOX_ENV/Dockertags.pushed)
268+
case $# in
269+
1) images="image"; one_image="the image";;
270+
*) images="images"; one_image="one of the images";;
271+
esac
272+
echo "::notice title=Docker $images pushed::Pushed $images $*)"
273+
echo
274+
echo "To pull $one_image and enter the container, type:"
275+
echo
276+
for TAG in $*; do
277+
echo " \$ docker run -it $TAG bash"
278+
done
279+
echo
280+
echo "To use $one_image as the base for an incremental build, type:"
281+
echo
282+
TOX_ENV_SANS_INCREMENTAL=${TOX_ENV/-incremental/}
283+
DOCKER_IMAGE=${TOX_ENV_SANS_INCREMENTAL#docker-}
284+
for TAG in $*; do
285+
echo -n " \$"
286+
if [ "$DOCKER_PUSH_REPOSITORY" != "ghcr.io/sagemath/sage/" ]; then
287+
echo -n " FROM_DOCKER_REPOSITORY=$DOCKER_PUSH_REPOSITORY"
288+
fi
289+
eval DOCKER_TARGET=\${TAG#*$DOCKER_IMAGE-}
290+
DOCKER_TARGET=${DOCKER_TARGET%:*}
291+
if [ "$DOCKER_TARGET" != "with-targets" ]; then
292+
echo -n " FROM_DOCKER_TARGET=$DOCKER_TARGET"
293+
fi
294+
echo " FROM_DOCKER_TAG=${TAG#*:} tox -e $TOX_ENV_SANS_INCREMENTAL-incremental"
295+
done
296+
elif [ -n "$DOCKER_PUSH_REPOSITORY" -a -f .tox/$TOX_ENV/Dockertags ]; then
297+
echo "Unable to push Docker images to $DOCKER_PUSH_REPOSITORY."
298+
echo "This is normal in a pull request to sagemath/sage or to another user's repository."
299+
echo
300+
echo "If you need Docker images, "
301+
echo " - either run this GitHub Actions workflow in your repository fork"
302+
echo " - or use the method described in https://doc.sagemath.org/html/en/developer/portability_testing.html#automatic-docker-based-build-testing-using-tox"
303+
else
304+
echo "No Docker images created."
269305
fi
270-
if: always()
306+
if: always() && ${{ inputs.docker_push_repository }}

.github/workflows/macos.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,21 @@ on:
1919
type: string
2020
# System configuration
2121
osversion_xcodeversion_toxenv_tuples:
22+
# As of 2024-02, "runs-on: macos-latest" is macos-12.
23+
# and "runs-on: macos-14" selects the new M1 runners.
24+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
2225
description: 'Stringified JSON object'
2326
default: >-
24-
[["latest", "", "homebrew-macos-usrlocal-minimal"],
25-
["latest", "", "homebrew-macos-usrlocal-standard"],
26-
["11", "xcode_13.2.1", "homebrew-macos-usrlocal-minimal"],
27+
[["11", "xcode_13.2.1", "homebrew-macos-usrlocal-minimal"],
28+
["12", "", "homebrew-macos-usrlocal-minimal"],
2729
["12", "", "homebrew-macos-usrlocal-standard"],
30+
["12", "", "homebrew-macos-usrlocal-python3_xcode-standard"],
31+
["12", "", "homebrew-macos-usrlocal-maximal"],
2832
["13", "xcode_15.0", "homebrew-macos-usrlocal-standard"],
29-
["latest", "", "homebrew-macos-usrlocal-maximal"],
30-
["latest", "", "homebrew-macos-usrlocal-python3_xcode-standard"],
33+
["14", "", "homebrew-macos-opthomebrew-standard"],
3134
["latest", "", "conda-forge-macos-minimal"],
32-
["latest", "", "conda-forge-macos-standard"]]
35+
["latest", "", "conda-forge-macos-standard"],
36+
["14", "", "conda-forge-macos-standard"]]
3337
type: string
3438
extra_sage_packages:
3539
description: 'Extra Sage packages to install as system packages'
@@ -41,6 +45,10 @@ on:
4145
free_disk_space:
4246
default: false
4347
type: boolean
48+
timeout:
49+
description: 'Elapsed time (seconds) at which to kill the build'
50+
default: 20000
51+
type: number
4452
#
4553
# For use in upstream CIs.
4654
#
@@ -74,10 +82,16 @@ jobs:
7482
repository: ${{ inputs.sage_repo }}
7583
ref: ${{ inputs.sage_ref }}
7684
fetch-depth: 10000
77-
85+
- uses: actions/setup-python@v5
86+
# As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx.
87+
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
88+
id: python
89+
with:
90+
python-version: "3.8 - 3.12"
91+
update-environment: false
7892
- name: Install test prerequisites
7993
run: |
80-
brew install tox
94+
"${{ steps.python.outputs.python-path }}" -m pip install pipx
8195
- name: Download upstream artifact
8296
uses: actions/download-artifact@v3
8397
with:
@@ -129,7 +143,8 @@ jobs:
129143
*) export TARGETS_PRE="${{ inputs.targets_pre }}" TARGETS="${{ inputs.targets }} TARGETS_OPTIONAL="${{ inputs.targets_optional }}
130144
;;
131145
esac
132-
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
146+
(sleep ${{ inputs.timeout }}; pkill make) &
147+
MAKE="make -j12" EXTRA_SAGE_PACKAGES="${{ inputs.extra_sage_packages }}" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS
133148
- name: Prepare logs artifact
134149
run: |
135150
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Upstream packages as uploaded as GitHub release assets.
22
# This file is automatically updated by the sage-update-version script.
3+
https://github.com/sagemath/sage/releases/download/10.4/
34
https://github.com/sagemath/sage/releases/download/10.3/
45
https://github.com/sagemath/sage/releases/download/10.2/
5-
https://github.com/sagemath/sage/releases/download/10.1/

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: SageMath
44
abstract: SageMath is a free open-source mathematics software system.
55
authors:
66
- name: "The SageMath Developers"
7-
version: 10.3.rc0
7+
version: 10.4.beta0
88
doi: 10.5281/zenodo.593563
9-
date-released: 2024-02-25
9+
date-released: 2024-03-25
1010
repository-code: "https://github.com/sagemath/sage"
1111
url: "https://www.sagemath.org/"

0 commit comments

Comments
 (0)