Skip to content

Commit

Permalink
Merge branch 'sagemath:develop' into push_to_docker_hub_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
soehms authored Oct 15, 2023
2 parents b427e02 + b7c1c8f commit ca58150
Show file tree
Hide file tree
Showing 233 changed files with 1,590 additions and 1,255 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/onCreate-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
# Create conda environment
./bootstrap-conda
conda install mamba -n base -c conda-forge -y
mamba env create --file src/environment-dev.yml || mamba env update --file src/environment-dev.yml
mamba env create --file src/environment-dev-3.11.yml || mamba env update --file src/environment-dev-3.11.yml
conda init bash

# Build sage
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ hashFiles('src/environment.yml') }}
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }}

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
Expand All @@ -68,8 +68,8 @@ jobs:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: sage-build
environment-file: src/${{ matrix.conda-env }}.yml
activate-environment: sage
environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}.yml

- name: Print Conda environment
shell: bash -l {0}
Expand All @@ -83,7 +83,7 @@ jobs:
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 $(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)
./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::"
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,24 +144,23 @@ jobs:
EXTRA_CONFIGURE_ARGS: --enable-fat-binary
EXTRA_SAGE_PACKAGES: ${{ inputs.extra_sage_packages }}
steps:
- name: Maximize build disk space
uses: easimon/maximize-build-space@v8
with:
# need space in /var for Docker images
root-reserve-mb: 40000
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
if: inputs.free_disk_space
- name: Check out SageMath
uses: actions/checkout@v4
with:
repository: ${{ inputs.sage_repo }}
ref: ${{ inputs.sage_ref }}
fetch-depth: 10000
- name: free disk space
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt-get clean
docker rmi $(docker image ls -aq)
echo "Largest packages:"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 50
sudo apt-get --fix-broken --yes remove $(dpkg-query -f '${Package}\n' -W | grep -E '^(ghc-|google-cloud-sdk|google-chrome|firefox|mysql-server|dotnet-sdk|hhvm|mono)') || echo "(error ignored)"
df -h
if: inputs.free_disk_space
- name: Download upstream artifact
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -216,7 +215,10 @@ jobs:
.ci/merge-fixes.sh
env:
GH_TOKEN: ${{ github.token }}

- name: Show disk space
run: |
df -h
if: inputs.free_disk_space
- name: Configure and build Sage distribution within a Docker container
run: |
set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg NUMPROC=4 --build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=3\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;"
Expand Down
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,29 @@
# no longer generated, but may still be in user worktrees
/src/lib/pkgconfig

# Environment files generated by bootstrap-conda.
# The files without Python version are no longer generated
# but may still be in users' directories.
/environment.yml
/environment-3.9.yml
/environment-3.10.yml
/environment-3.11.yml
/environment-optional.yml
/environment-optional-3.9.yml
/environment-optional-3.10.yml
/environment-optional-3.11.yml
/src/environment.yml
/src/environment-3.9.yml
/src/environment-3.10.yml
/src/environment-3.11.yml
/src/environment-dev.yml
/src/environment-dev-3.9.yml
/src/environment-dev-3.10.yml
/src/environment-dev-3.11.yml
/src/environment-optional.yml
/src/environment-optional-3.9.yml
/src/environment-optional-3.10.yml
/src/environment-optional-3.11.yml

/src/setup.cfg
/src/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
# Create conda environment, then configure and build sage
init: >-
./bootstrap-conda
&& mamba env create --file src/environment-dev.yml --prefix venv
&& mamba env create --file src/environment-dev-3.11.yml --prefix venv
&& conda config --append envs_dirs $(pwd)
&& conda activate $(pwd)/venv
&& ./bootstrap
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.2.beta6
version: 10.2.beta7
doi: 10.5281/zenodo.593563
date-released: 2023-10-08
date-released: 2023-10-14
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,7 @@ bootstrap-clean:
rm -rf config/install-sh config/compile config/config.guess config/config.sub config/missing configure build/make/Makefile-auto.in
rm -f src/doc/en/installation/*.txt
rm -rf src/doc/en/reference/spkg/*.rst
rm -f environment.yml
rm -f src/environment.yml
rm -f src/environment-dev.yml
rm -f environment-optional.yml
rm -f src/environment-optional.yml
for a in environment environment-optional src/environment src/environment-dev src/environment-optional; do rm -f $$a.yml $$a-3.[89].yml $$a-3.1[0-9].yml; done
rm -f src/Pipfile
rm -f src/pyproject.toml
rm -f src/requirements.txt
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,18 @@ in the Installation Guide.

$ ./configure --help

A notable option for Sage developers is the following:

- Use `./configure --enable-download-from-upstream-url` to allow
downloading packages from their upstream URL if they cannot (yet) be
found on the Sage mirrors. This is useful for trying out ticket branches
that make package upgrades.
Notable options for Sage developers are the following:

- Use the option `--config-cache` to have `configure`
keep a disk cache of configuration values. This gives a nice speedup
when trying out ticket branches that make package upgrades, which
involves automatic re-runs of the configuration step.

- Use the option `--enable-ccache` to have Sage install and use the
optional package `ccache`, which is preconfigured to keep a
disk cache of object files created from source files. This can give
a great speedup when switching between different branches, at the
expense of disk space use.

10. Optional, but highly recommended: Set some environment variables to
customize the build.
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.2.beta6, Release Date: 2023-10-08
SageMath version 10.2.beta7, Release Date: 2023-10-14
16 changes: 8 additions & 8 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ bootstrap () {
done
spkg_configures=""
# initialize SAGE_ENABLE... options for standard packages
for pkgname in $(sage-package list :standard: | sort); do
for pkgname in $(sage-package list :standard:); do
spkg_configures="$spkg_configures
AS_VAR_SET_IF([SAGE_ENABLE_$pkgname], [], [AS_VAR_SET([SAGE_ENABLE_$pkgname], [yes])])"
done
# --enable-SPKG options
for pkgname in $(sage-package list :optional: :experimental: | sort); do
for pkgname in $(sage-package list :optional: :experimental:); do
# Issue #29629: Temporary solution for Sage 9.1: Do not provide
# --enable-SPKG options for installing pip packages
if [ ! -f build/pkgs/$pkgname/requirements.txt ]; then
Expand All @@ -71,7 +71,7 @@ SAGE_SPKG_ENABLE([$pkgname], [$pkgtype], [$(grep -v ^= build/pkgs/$pkgname/SPKG.
esac
fi
done
for pkgname in $(sage-package list --has-file spkg-configure.m4 | sort); do
for pkgname in $(sage-package list --has-file spkg-configure.m4); do
echo "m4_sinclude([build/pkgs/$pkgname/spkg-configure.m4])"
config="SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
if grep -q SAGE_PYTHON_PACKAGE_CHECK build/pkgs/$pkgname/spkg-configure.m4; then
Expand All @@ -86,7 +86,7 @@ $config"
$spkg_configures
$spkg_configures_python
EOF
for pkgname in $(sage-package list | sort); do
for pkgname in $(sage-package list); do
DIR=build/pkgs/$pkgname
pkgtype="$(cat $DIR/type)"
if test -f "$DIR/requirements.txt"; then
Expand Down Expand Up @@ -226,10 +226,10 @@ save () {
build/make/Makefile-auto.in \
src/doc/en/installation/*.txt \
src/doc/en/reference/spkg/*.rst \
environment.yml \
src/environment.yml \
environment-optional.yml \
src/environment-optional.yml \
environment-3.[89].yml environment-3.1[0-9].yml \
src/environment-3.[89].yml src/environment-3.1[0-9].yml \
environment-optional-3.[89].yml environment-optional-3.1[0-9].yml \
src/environment-optional-3.[89].yml src/environment-optional-3.1[0-9].yml \
src/Pipfile \
src/pyproject.toml \
src/requirements.txt \
Expand Down
Loading

0 comments on commit ca58150

Please sign in to comment.