Skip to content

Commit

Permalink
Merge branch 'develop' into fix-vector-sparse
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu authored Oct 24, 2024
2 parents bd64435 + 7726cd9 commit 05e55e2
Show file tree
Hide file tree
Showing 375 changed files with 6,155 additions and 2,896 deletions.
2 changes: 1 addition & 1 deletion .ci/retrofit-worktree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ git worktree add --detach $WORKTREE_NAME
rm -rf $WORKTREE_DIRECTORY/.git && mv $WORKTREE_NAME/.git $WORKTREE_DIRECTORY/
rm -rf $WORKTREE_NAME && ln -s $WORKTREE_DIRECTORY $WORKTREE_NAME
if [ ! -f $WORKTREE_NAME/.gitignore ]; then cp .gitignore $WORKTREE_NAME/; fi
(cd $WORKTREE_NAME && git add -A && git commit --quiet --allow-empty -m "old" -a && git tag -f old && git checkout new && git status)
(cd $WORKTREE_NAME && git add -A && git commit --quiet --allow-empty -m "old" -a && git tag -f old && git checkout -f new && git clean -fd && git status)
86 changes: 44 additions & 42 deletions .ci/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ STRIP_COMMENTS="sed s/#.*//;"
SAGE_ROOT=.
export PATH="$SAGE_ROOT"/build/bin:$PATH
SYSTEM_PACKAGES=$EXTRA_SYSTEM_PACKAGES
SYSTEM_CONFIGURE_ARGS="--enable-option-checking "
SYSTEM_CONFIGURE_ARGS=" --enable-option-checking"
for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_ARGS) $EXTRA_SAGE_PACKAGES; do
SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG)
if [ -n "${SYSTEM_PACKAGE}" ]; then
Expand All @@ -45,13 +45,20 @@ for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_
# shell-quote package if necessary
SYSTEM_PACKAGES+=$(printf " %q" "$a")
done
SYSTEM_CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
# Check if SPKG is not a dummy package
if [[ $SPKG != _* ]]; then
SYSTEM_CONFIGURE_ARGS+=" --with-system-${SPKG}=${WITH_SYSTEM_SPKG}"
fi
fi
done
echo "# Automatically generated by SAGE_ROOT/.ci/write-dockerfile.sh"
echo "# the :comments: separate the generated file into sections"
echo "# to simplify writing scripts that customize this file"
ADD="ADD $__CHOWN"
if [ -z "$__CHOWN" ]; then
ADD="ADD"
else
ADD="ADD $__CHOWN"
fi
RUN=RUN
cat <<EOF
ARG BASE_IMAGE=$(eval echo "${FULL_BASE_IMAGE_AND_TAG}")
Expand Down Expand Up @@ -86,10 +93,7 @@ case $SYSTEM in
# we remove the unminimize binary here after it has done its job.
#
cat <<EOF
RUN if command -v unminimize > /dev/null; then \
(yes | unminimize) || echo "(ignored)"; \
rm -f "\$(command -v unminimize)"; \
fi
RUN if command -v unminimize > /dev/null; then (yes | unminimize) || echo "(ignored)"; rm -f "\$(command -v unminimize)"; fi
EOF
if [ -n "$DIST_UPGRADE" ]; then
cat <<EOF
Expand Down Expand Up @@ -254,10 +258,10 @@ case ${DOCKER_BUILDKIT-0} in
# With buildkit we cannot retrieve failed builds.
# So we do not allow the main step of a build stage to fail.
# Instead we record the exit code in the file STATUS.
THEN_SAVE_STATUS='; echo $? > STATUS'
THEN_SAVE_STATUS=' ; echo $? > STATUS'
# ... and at the beginning of the next build stage,
# we check the status and exit with an error status.
CHECK_STATUS_THEN='STATUS=$(cat STATUS 2>/dev/null); case "$STATUS" in ""|0) ;; *) exit $STATUS;; esac; '
CHECK_STATUS_THEN=' STATUS=$(cat STATUS 2>/dev/null); case "$STATUS" in ""|0) ;; *) exit $STATUS;; esac;'
esac

if [ -n "$GITHUB_ACTIONS" ]; then
Expand All @@ -281,38 +285,37 @@ $ADD pkgs /new/pkgs
$ADD build /new/build
$ADD .upstream.d /new/.upstream.d
ADD .ci /.ci
RUN if [ -d /sage ]; then \
echo "### Incremental build from \$(cat /sage/VERSION.txt)" && \
printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /sage/.gitignore && \
printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /new/.gitignore && \
if ! (cd /new && /.ci/retrofit-worktree.sh worktree-image /sage); then \
echo "retrofit-worktree.sh failed, falling back to replacing /sage"; \
for a in local logs; do \
if [ -d /sage/\$a ]; then mv /sage/\$a /new/; fi; \
done; \
rm -rf /sage; \
mv /new /sage; \
fi; \
else \
mv /new /sage; \
RUN if [ -d /sage ]; then \\
echo "### Incremental build from \$(cat /sage/VERSION.txt)" && \\
printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /sage/.gitignore && \\
printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /new/.gitignore && \\
if ! (cd /new && /.ci/retrofit-worktree.sh worktree-image /sage); then \\
echo "retrofit-worktree.sh failed, falling back to replacing /sage"; \\
for a in local logs; do \\
if [ -d /sage/\$a ]; then mv /sage/\$a /new/; fi; \\
done; \\
rm -rf /sage; \\
mv /new /sage; \\
fi; \\
else \\
mv /new /sage; \\
fi
WORKDIR /sage
ARG BOOTSTRAP="${BOOTSTRAP-./bootstrap}"
$RUN sh -x -c "\${BOOTSTRAP}" $ENDRUN $THEN_SAVE_STATUS
$RUN sh -x -c "\${BOOTSTRAP}"$ENDRUN$THEN_SAVE_STATUS
FROM bootstrapped AS configured
#:configuring:
RUN $CHECK_STATUS_THEN mkdir -p logs/pkgs; rm -f config.log; ln -s logs/pkgs/config.log config.log
RUN$CHECK_STATUS_THEN mkdir -p logs/pkgs; rm -f config.log; ln -s logs/pkgs/config.log config.log
ARG CONFIGURE_ARGS="${CONFIGURE_ARGS:---enable-build-as-root}"
EOF
if [ ${WITH_SYSTEM_SPKG} = "force" ]; then
cat <<EOF
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; echo "********** configuring without forcing ***********"; ./configure \${CONFIGURE_ARGS}; echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1) $ENDRUN $THEN_SAVE_STATUS
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; echo "********** configuring without forcing ***********"; ./configure \${CONFIGURE_ARGS}; echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1)$ENDRUN$THEN_SAVE_STATUS
EOF
else
cat <<EOF
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1) $ENDRUN $THEN_SAVE_STATUS
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1)$ENDRUN$THEN_SAVE_STATUS
EOF
fi
cat <<EOF
Expand All @@ -325,7 +328,7 @@ ARG USE_MAKEFLAGS="-k V=0"
ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
#:toolchain:
$RUN $CHECK_STATUS_THEN make \${USE_MAKEFLAGS} base-toolchain $ENDRUN $THEN_SAVE_STATUS
$RUN$CHECK_STATUS_THEN make \${USE_MAKEFLAGS} base-toolchain$ENDRUN$THEN_SAVE_STATUS
FROM with-base-toolchain AS with-targets-pre
ARG NUMPROC=8
Expand All @@ -335,7 +338,7 @@ ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
#:make:
ARG TARGETS_PRE="all-sage-local"
$RUN $CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_PRE} $ENDRUN $THEN_SAVE_STATUS
$RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_PRE}$ENDRUN$THEN_SAVE_STATUS
FROM with-targets-pre AS with-targets
ARG NUMPROC=8
Expand All @@ -345,19 +348,18 @@ ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
$ADD .gitignore /new/.gitignore
$ADD src /new/src
RUN cd /new && rm -rf .git && \
if /.ci/retrofit-worktree.sh worktree-pre /sage; then \
cd /sage && touch configure build/make/Makefile; \
else \
echo "retrofit-worktree.sh failed, falling back to replacing /sage/src"; \
rm -rf /sage/src; \
mv src /sage/src; \
cd /sage && ./bootstrap && ./config.status; \
fi; \
RUN cd /new && rm -rf .git && \\
if /.ci/retrofit-worktree.sh worktree-pre /sage; then \\
cd /sage && touch configure build/make/Makefile; \\
else \\
echo "retrofit-worktree.sh failed, falling back to replacing /sage/src"; \\
rm -rf /sage/src; \\
mv src /sage/src; \\
cd /sage && ./bootstrap && ./config.status; \\
fi; \\
cd /sage && rm -rf .git; rm -rf /new || echo "(error ignored)"
ARG TARGETS="build"
$RUN $CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS} $ENDRUN $THEN_SAVE_STATUS
$RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS}$ENDRUN$THEN_SAVE_STATUS
FROM with-targets AS with-targets-optional
ARG NUMPROC=8
Expand All @@ -366,7 +368,7 @@ ARG USE_MAKEFLAGS="-k V=0"
ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
ARG TARGETS_OPTIONAL="ptest"
$RUN $CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_OPTIONAL} || echo "(error ignored)" $ENDRUN $THEN_SAVE_STATUS
$RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_OPTIONAL} || echo "(error ignored)"$ENDRUN$THEN_SAVE_STATUS
#:end:
EOF
4 changes: 2 additions & 2 deletions .github/sync_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def actor_valid(self):
for com in coms:
for auth in com['authors']:
login = auth['login']
if not login in authors:
if login not in authors:
if not self.is_this_bot(login) and login != author:
debug('PR %s has recent commit by %s' % (self._issue, login))
authors.append(login)
Expand Down Expand Up @@ -746,7 +746,7 @@ def add_label(self, label):
r"""
Add the given label to the issue or PR.
"""
if not label in self.get_labels():
if label not in self.get_labels():
self.edit(label, '--add-label')
info('Add label to %s: %s' % (self._issue, label))

Expand Down
42 changes: 38 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ jobs:
remove-haskell: true
remove-codeql: true
remove-docker-images: true

- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Get changed files and packages
id: changed-files
uses: tj-actions/changed-files@v45
Expand All @@ -110,26 +112,47 @@ jobs:
- 'build/pkgs/*/spkg-configure.m4'
pkgs:
- 'build/pkgs/**'
- '!build/pkgs/_**'
- '!build/pkgs/configure/**'
- 'pkgs/**'
doctests:
- 'src/**/*.{py,pyx,pxd,pxi,sage,spyx,rst,tex}'
- '!src/{setup,conftest*}.py'
- name: Determine targets to build
id: build-targets
run: |
uninstall_targets=$(echo $(for a in '' ${{ steps.changed-files.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([a-z0-9][_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))
build_targets=$(echo $(for a in '' ${{ steps.changed-files.outputs.pkgs_all_changed_files }}; do SPKG=$(echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([a-z0-9][-_.a-z0-9]*)/[^ ]* *,\2,;'); if [ -f "build/pkgs/$SPKG/checksums.ini" -o -f "build/pkgs/$SPKG/requirements.txt" -o -f "build/pkgs/$SPKG/spkg-install" ]; then echo "$SPKG-ensure"; fi; done | sort -u))
uninstall_targets=$(echo $(
for a in '' ${{ steps.changed-files.outputs.configures_all_changed_files }}; do
# Extract package name from the file path and append '-uninstall'
echo $a | sed -E 's,build/pkgs/([a-z0-9][_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'
done | sort -u # Sort and ensure uniqueness
))
build_targets=$(echo $(
for a in '' ${{ steps.changed-files.outputs.pkgs_all_changed_files }}; do
# Extract package name, replace '-' with '_', and strip extra parts from the path
SPKG=$(echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([a-z0-9][-_.a-z0-9]*)/[^ ]* *,\2,;')
# Check if key files exist in the package directory
if [ -f "build/pkgs/$SPKG/checksums.ini" ] || \
[ -f "build/pkgs/$SPKG/requirements.txt" ] || \
[ -f "build/pkgs/$SPKG/spkg-install" ]; then
echo "$SPKG-ensure" # add the "$SPKG-ensure" target
fi
done | sort -u # Sort and ensure uniqueness
))
if [ -n "$uninstall_targets" ]; then
echo "build_targets=$uninstall_targets reconfigure $build_targets ci-build-with-fallback" >> $GITHUB_OUTPUT
echo "build_targets=$uninstall_targets reconfigure $build_targets ci-build-with-fallback" >> $GITHUB_OUTPUT
else
echo "build_targets=$build_targets ci-build-with-fallback" >> $GITHUB_OUTPUT
echo "build_targets=$build_targets ci-build-with-fallback" >> $GITHUB_OUTPUT
fi
cat $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: worktree-base
if: github.base_ref && steps.changed-files.outputs.pkgs_all_changed_files

- name: Compute metrics
run: |
export PATH=build/bin:$PATH
Expand All @@ -140,13 +163,15 @@ jobs:
else
sage-package metrics :all:
fi
- name: Install test prerequisites
# From docker.yml
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
sudo apt-get clean
df -h
- name: Merge CI fixes from sagemath/sage
# From docker.yml
# This step needs to happen after the commit sha is put in DOCKER_TAG
Expand Down Expand Up @@ -254,16 +279,19 @@ jobs:
remove-haskell: true
remove-codeql: true
remove-docker-images: true

- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Install test prerequisites
# From docker.yml
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
sudo apt-get clean
df -h
- name: Merge CI fixes from sagemath/sage
# From docker.yml
# This step needs to happen after the commit sha is put in DOCKER_TAG
Expand Down Expand Up @@ -352,16 +380,19 @@ jobs:
remove-haskell: true
remove-codeql: true
remove-docker-images: true

- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Install test prerequisites
# From docker.yml
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
sudo apt-get clean
df -h
- name: Merge CI fixes from sagemath/sage
# From docker.yml
# This step needs to happen after the commit sha is put in DOCKER_TAG
Expand Down Expand Up @@ -469,16 +500,19 @@ jobs:
remove-haskell: true
remove-codeql: true
remove-docker-images: true

- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Install test prerequisites
# From docker.yml
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
sudo apt-get clean
df -h
- name: Merge CI fixes from sagemath/sage
# From docker.yml
# This step needs to happen after the commit sha is put in DOCKER_TAG
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ jobs:
(cd doc && mv .git ../git && mv .gitattributes ../gitattributes)
mv CHANGES.html doc
fi
# Create the robots.txt file to discourage web crawlers from indexing doc preview webpages
echo "User-agent: *" > doc/robots.txt
echo "Disallow: /" >> doc/robots.txt
# Zip everything for increased performance
zip -r doc.zip doc
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: SageMath
abstract: SageMath is a free open-source mathematics software system.
authors:
- name: "The SageMath Developers"
version: 10.5.beta5
version: 10.5.beta7
doi: 10.5281/zenodo.8042260
date-released: 2024-09-22
date-released: 2024-10-12
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.5.beta5, Release Date: 2024-09-22
SageMath version 10.5.beta7, Release Date: 2024-10-12
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=2cdffd348b8a4de62b51e1f6c37a7d414004c09e
sha256=273c37842eedefc3575e34bb14819ab3738a32c39ae634f2342bb50baa740c60
sha1=978eb775a20fea3ed9b88f0d67ecd84a3d9cd6ea
sha256=c3987bb0f8aca81e112a17d8904ef2353a706159d43250305dc2bcac4ca2e33a
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9b58ceaa68960b38142f27fdfc04373301da4e46
4326d0d9422011034a230ab3c1445fafeb2ac444
4 changes: 2 additions & 2 deletions build/pkgs/fricas/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=fricas-VERSION-full.tar.bz2
sha1=2f1e1bbbad7e04a7114ffbd93eeedadc5db32272
sha256=fc2112ad45ba7b45ac423165f32bd5b244622107a1e4e1d56b9136f96746f2a0
sha1=c5104c92808ff01a02ecdd3f412d44da3b2c21fb
sha256=32b87461ef079659e97247ad0a771ec8cf0d5a0f934788d67d37fb7acf63f9c4
upstream_url=https://github.com/fricas/fricas/releases/download/VERSION/fricas-VERSION-full.tar.bz2
2 changes: 1 addition & 1 deletion build/pkgs/fricas/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.10
1.3.11
4 changes: 2 additions & 2 deletions build/pkgs/gc/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=gc-VERSION.tar.gz
sha1=3f543532c47e592a8f5ea6f7a529c8ed7465a5c7
sha256=b9183fe49d4c44c7327992f626f8eaa1d8b14de140f243edb1c9dcff7719a7fc
sha1=1c8d7bde86aa98df957563982f38c583c2c6707f
sha256=7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160
upstream_url=https://github.com/ivmai/bdwgc/releases/download/vVERSION/gc-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/gc/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.2.6
8.2.8
4 changes: 2 additions & 2 deletions build/pkgs/maxima/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=maxima-VERSION.tar.gz
sha1=1010594e6d6082bbd8efaac1b7756ec1721a4ed5
sha256=7390f06b48da65c9033e8b2f629b978b90056454a54022db7de70e2225aa8b07
sha1=fff13f4c010e6daab65fbc8a6895c2bd79925177
sha256=9104021b24fd53e8c03a983509cb42e937a925e8c0c85c335d7709a14fd40f7a
upstream_url=https://sourceforge.net/projects/maxima/files/Maxima-source/VERSION-source/maxima-VERSION.tar.gz/download
2 changes: 1 addition & 1 deletion build/pkgs/maxima/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.46.0
5.47.0
Loading

0 comments on commit 05e55e2

Please sign in to comment.