Skip to content

Commit

Permalink
Merge branch 'develop' into lie_algebras/basic_reprs
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim authored Sep 12, 2023
2 parents 0b6e2d9 + 4103129 commit e1a019f
Show file tree
Hide file tree
Showing 1,143 changed files with 14,699 additions and 12,350 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
- 'public/build/**-runci'
pull_request:
types:
# Defaults
- opened
- synchronize
- reopened
# When a CI label is added
- labeled
workflow_dispatch:
# Allow to run manually
Expand All @@ -21,13 +26,18 @@ jobs:
test:
name: Conda
runs-on: ${{ matrix.os }}
# Run on push, workflow dispatch and when certain labels are added

# Run on push, workflow dispatch and when certain labels are added or are present
if: |
github.event.action != 'labeled' ||
github.event.label.name == 'c: packages: optional' ||
github.event.label.name == 'c: packages: standard' ||
github.event.label.name == 's: run conda ci'
github.event_name != 'pull_request' ||
((github.event.action != 'labeled' &&
(contains(github.event.pull_request.labels.*.name, 'c: packages: standard') ||
contains(github.event.pull_request.labels.*.name, 'c: packages: optional') ||
contains(github.event.pull_request.labels.*.name, 's: run conda ci'))) ||
(github.event.action == 'labeled' &&
(github.event.label.name == 'c: packages: optional' ||
github.event.label.name == 'c: packages: standard' ||
github.event.label.name == 's: run conda ci')))
strategy:
fail-fast: false
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/ci-linux-incremental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI Linux incremental

## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
## whenever a GitHub pull request is opened or synchronized in a repository
## where GitHub Actions are enabled.
##
## It builds and checks some sage spkgs as defined in TARGETS.
##
## A job succeeds if there is no error.
##
## The build is run with "make V=0", so the build logs of individual packages are suppressed.
##
## At the end, all package build logs that contain an error are printed out.
##
## After all jobs have finished (or are canceled) and a short delay,
## tar files of all logs are made available as "build artifacts".

on:
pull_request:
types:
# Defaults
- opened
- synchronize
- reopened
# When a CI label is added
- labeled
workflow_dispatch:

concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
packages: write

jobs:

changed_files:
runs-on: ubuntu-latest
name: List changed packages
outputs:
uninstall_targets: ${{ steps.build-targets.outputs.uninstall_targets }}
build_targets: ${{ steps.build-targets.outputs.build_targets }}
steps:
- uses: actions/checkout@v3
- name: Get all packages that have changed
id: changed-packages
uses: tj-actions/changed-files@v38
with:
files_yaml: |
configures:
- 'build/pkgs/*/spkg-configure.m4'
pkgs:
- 'build/pkgs/**'
- 'pkgs/**'
- name: Determine targets to build
id: build-targets
run: |
echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT
echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([-_.a-z0-9]*)/[^ ]* *,\2-ensure,;'; done | sort -u))" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
minimal:
needs: [changed_files]
if: |
github.event_name != 'pull_request' ||
((github.event.action != 'labeled' &&
(contains(github.event.pull_request.labels.*.name, 'c: packages: standard') ||
contains(github.event.pull_request.labels.*.name, 'c: packages: optional'))) ||
(github.event.action == 'labeled' &&
(github.event.label.name == 'c: packages: optional' ||
github.event.label.name == 'c: packages: standard')))
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from published Docker image
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/sagemath/sage/
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
tox_system_factors: >-
["ubuntu-focal",
"ubuntu-jammy",
"ubuntu-mantic,
"debian-bullseye",
"debian-bookworm",
"ubuntu-mantic,
"fedora-30",
"fedora-38",
"gentoo-python3.11",
"debian-bullseye-i386"]
tox_packages_factors: >-
["standard",
"minimal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
50 changes: 50 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,56 @@ jobs:
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/

standard-sitepackages:
if: ${{ success() || failure() }}
needs: [standard-pre]
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from previous stage (pre)
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
docker_targets: "with-targets with-targets-optional"
# FIXME: duplicated from env.TARGETS
targets: build doc-html
targets_optional: ptest
tox_packages_factors: >-
["standard-sitepackages"]
# Only test systems with a usable system python (>= 3.9)
tox_system_factors: >-
["ubuntu-jammy",
"ubuntu-kinetic",
"ubuntu-lunar",
"ubuntu-mantic",
"debian-bullseye",
"debian-bookworm",
"debian-trixie",
"debian-sid",
"linuxmint-21",
"linuxmint-21.1",
"linuxmint-21.2",
"fedora-33",
"fedora-34",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"fedora-39",
"centos-stream-8-python3.9",
"centos-stream-9-python3.9",
"almalinux-8-python3.9",
"gentoo-python3.10",
"gentoo-python3.11",
"archlinux-latest",
"opensuse-15.4-gcc_11-python3.10",
"opensuse-15.5-gcc_11-python3.11",
"opensuse-tumbleweed-python3.10",
"opensuse-tumbleweed",
"debian-bullseye-i386"]
docker_push_repository: ghcr.io/${{ github.repository }}/
max_parallel: 10

minimal-pre:
if: ${{ success() || failure() }}
# It does not really "need" it.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
default: >-
["ubuntu-trusty-toolchain-gcc_9",
"ubuntu-xenial-toolchain-gcc_9",
"ubuntu-bionic-gcc_8",
"ubuntu-focal",
"ubuntu-jammy",
"ubuntu-kinetic",
Expand Down Expand Up @@ -56,6 +57,7 @@ on:
"opensuse-15.4-gcc_11-python3.10",
"opensuse-15.5-gcc_11-python3.11",
"opensuse-tumbleweed-python3.10",
"opensuse-tumbleweed",
"conda-forge",
"ubuntu-bionic-gcc_8-i386",
"debian-bullseye-i386",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"python.linting.enabled": true,
// The following pycodestyle arguments are the same as the pycodestyle-minimal
// tox environnment, see the file SAGE_ROOT/src/tox.ini
"python.linting.pycodestyleArgs": ["--select= E111,E21,E222,E227,E25,E271,E303,E306,E401,E502,E701,E702,E703,E71,E72,W291,W293,W391,W605"],
"python.linting.pycodestyleArgs": ["--select= E111,E21,E222,E227,E25,E271,E303,E305,E306,E401,E502,E701,E702,E703,E71,E72,W291,W293,W391,W605"],
"cSpell.words": [
"furo",
"Conda",
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.beta1
version: 10.2.beta2
doi: 10.5281/zenodo.593563
date-released: 2023-09-01
date-released: 2023-09-10
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.2.beta1, Release Date: 2023-09-01
SageMath version 10.2.beta2, Release Date: 2023-09-10
4 changes: 4 additions & 0 deletions build/bin/sage-build-env-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ export SAGE_PARI_CFG="@SAGE_PARI_CFG@"

export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
export SAGE_PIP_INSTALL_FLAGS="@SAGE_PIP_INSTALL_FLAGS@"
export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"

export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"

export CONFIGURED_SAGE_EDITABLE="@SAGE_EDITABLE@"
export CONFIGURED_SAGE_WHEELS="@SAGE_WHEELS@"

export ENABLE_SYSTEM_SITE_PACKAGES="@ENABLE_SYSTEM_SITE_PACKAGES@"
export PYTHON_MINOR="@PYTHON_MINOR@"
6 changes: 5 additions & 1 deletion build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ sdh_store_wheel() {
}

sdh_store_and_pip_install_wheel() {
local pip_options=""
# The $SAGE_PIP_INSTALL_FLAGS variable is set by sage-build-env-config.
# We skip sanity checking its contents since you should either let sage
# decide what it contains, or really know what you are doing.
local pip_options="${SAGE_PIP_INSTALL_FLAGS}"

while [ $# -gt 0 ]; do
case $1 in
-*) pip_options="$pip_options $1"
Expand Down
14 changes: 14 additions & 0 deletions build/bin/sage-get-system-packages
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh

SYSTEM=$1
if [ -z "$SYSTEM" ]; then
echo >&2 "usage: $0 {auto|debian|arch|conda|pip|...} SPKGS..."
Expand All @@ -10,6 +11,7 @@ SPKGS="$*"
if [ -z "$SAGE_ROOT" ]; then
SAGE_ROOT=`pwd`
fi

case "$SYSTEM" in
install-requires)
# Collect install-requires.txt (falling back to requirements.txt) and output it in the format
Expand Down Expand Up @@ -44,6 +46,18 @@ case "$SYSTEM" in
;;
esac
for PKG_BASE in $SPKGS; do

# Skip this package if it uses the SAGE_PYTHON_PACKAGE_CHECK
# macro and if --enable-system-site-packages was NOT passed
# to ./configure (or if ./configure has not yet been run).
SPKG_CONFIGURE="${SAGE_ROOT}/build/pkgs/${PKG_BASE}/spkg-configure.m4"
if [ -z "${ENABLE_SYSTEM_SITE_PACKAGES}" ]; then
if grep -q SAGE_PYTHON_PACKAGE_CHECK "${SPKG_CONFIGURE}" 2>/dev/null;
then
continue;
fi
fi

for NAME in $SYSTEM_PACKAGES_FILE_NAMES; do
SYSTEM_PACKAGES_FILE="$SAGE_ROOT"/build/pkgs/$PKG_BASE/$NAME
if [ -f $SYSTEM_PACKAGES_FILE ]; then
Expand Down
20 changes: 11 additions & 9 deletions build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,19 @@ if [ -z "$system" ]; then
echo "(none known)"
else
echo
if [ -f "$PKG_SCRIPTS"/spkg-configure.m4 ]; then
echo "If the system package is installed, ./configure will check whether it can be used."
else
echo "However, these system packages will not be used for building Sage"
if [ -f "$PKG_SCRIPTS"/install-requires.txt ]; then
echo "because using Python site-packages is not supported by the Sage distribution;"
echo "see https://github.com/sagemath/sage/issues/29023"
SPKG_CONFIGURE="${PKG_SCRIPTS}/spkg-configure.m4"
if [ -f "${SPKG_CONFIGURE}" ]; then
if grep -q SAGE_PYTHON_PACKAGE_CHECK "${SPKG_CONFIGURE}"; then
echo "If the system package is installed and if the (experimental) option"
echo "--enable-system-site-packages is passed to ./configure, then ./configure"
echo "will check if the system package can be used."
else
echo "because spkg-configure.m4 has not been written for this package;"
echo "see https://github.com/sagemath/sage/issues/27330"
echo "If the system package is installed, ./configure will check if it can be used."
fi
else
echo "However, these system packages will not be used for building Sage"
echo "because spkg-configure.m4 has not been written for this package;"
echo "see https://github.com/sagemath/sage/issues/27330"
fi
fi
echo
20 changes: 8 additions & 12 deletions build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -e
SYSTEM="${1:-debian}"
shopt -s extglob
SAGE_PACKAGE_LIST_ARGS="${2:- --has-file=spkg-configure.m4 :standard:}"
SAGE_PACKAGE_LIST_ARGS="${2:-:standard:}"
WITH_SYSTEM_SPKG="${3:-yes}"
IGNORE_MISSING_SYSTEM_PACKAGES="${4:-no}"
EXTRA_SAGE_PACKAGES="${5:-_bootstrap}"
Expand All @@ -15,17 +15,13 @@ SAGE_ROOT=.
export PATH="$SAGE_ROOT"/build/bin:$PATH
SYSTEM_PACKAGES=$EXTRA_SYSTEM_PACKAGES
CONFIGURE_ARGS="--enable-option-checking "
for PKG_BASE in $(sage-package list --has-file=distros/$SYSTEM.txt $SAGE_PACKAGE_LIST_ARGS) $EXTRA_SAGE_PACKAGES; do
PKG_SCRIPTS="$SAGE_ROOT"/build/pkgs/$PKG_BASE
if [ -d $PKG_SCRIPTS ]; then
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/$SYSTEM.txt
PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE))
if [ -n "PKG_SYSTEM_PACKAGES" ]; then
SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
CONFIGURE_ARGS+="--with-system-$PKG_BASE=${WITH_SYSTEM_SPKG} "
fi
fi
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 | sed 's/${PYTHON_MINOR}/'${PYTHON_MINOR}'/g')
if [ -n "${SYSTEM_PACKAGE}" ]; then
# SYSTEM_PACKAGE can be empty if, for example, the environment
# variable ENABLE_SYSTEM_SITE_PACKAGES is empty.
SYSTEM_PACKAGES+=" ${SYSTEM_PACKAGE}"
CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
fi
done
echo "# Automatically generated by SAGE_ROOT/build/bin/write-dockerfile.sh"
Expand Down
Loading

0 comments on commit e1a019f

Please sign in to comment.