Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge tag '9.7.rc0' into public/scalar_elliptic_curve_endomorphisms
Browse files Browse the repository at this point in the history
SageMath version 9.7.rc0, Release Date: 2022-08-30
  • Loading branch information
yyyyx4 committed Aug 31, 2022
2 parents fdc478e + cae9ee5 commit e7e02b1
Show file tree
Hide file tree
Showing 1,184 changed files with 31,254 additions and 11,970 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/develop-docker-computop/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// See https://aka.ms/devcontainer.json for format details.
{
"name": "computop/sage Docker",
"image": "computop/sage",
"containerEnv": {
"MAKE": "make -j4"
},
// Install build tools, get rid of sourcing /sage/activate in non-login shells.
// libgmp.a is broken and leads to a build failure of ecm.
"onCreateCommand": ".devcontainer/onCreate.sh --sudo && sudo rm -f /sage/local/lib/libgmp.a && sed -i.bak '/sage.*activate/d' ~/.bashrc",
// Do not run configure within a sage-env (see #29485).
// The pari package is broken in the computop/sage 9.5 image, need to reinstall.
// Also libnauty is broken.
"updateContentCommand": "make configure && (export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && unset CFLAGS LDFLAGS CXXFLAGS CPATH LIBRARY_PATH && ./configure --prefix=/sage/local --with-sage-venv) && make pari-clean nauty-clean build V=0",
"extensions": [
"ms-python.python"
]
}
12 changes: 12 additions & 0 deletions .devcontainer/downstream-archlinux-latest/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// See https://aka.ms/devcontainer.json for format details.
{
"name": "archlinux:latest downstream Sage",
"image": "archlinux:latest",
// Create an empty bashrc to avoid the error "No such file or directory" when opening a terminal.
"onCreateCommand": "EXTRA_SYSTEM_PACKAGES='sagemath sagemath-doc' EXTRA_SAGE_PACKAGES='notebook pip' .devcontainer/onCreate.sh && touch ~/.bashrc",
// There's no SAGE_LOCAL, so remove the symlink 'prefix'.
"updateContentCommand": "rm -f prefix && ln -sf /usr venv",
"extensions": [
"ms-python.python"
]
}
19 changes: 19 additions & 0 deletions .devcontainer/downstream-conda-forge-latest/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// See https://aka.ms/devcontainer.json for format details.
{
"name": "condaforge/mambaforge:latest downstream Sage",
"image": "condaforge/mambaforge:latest",
// Install Sage from the conda-forge package.
"onCreateCommand": "mamba install --yes sage",
// * If the workspace directory looks like a copy of the Sage source tree (SAGE_ROOT):
// - it bootstraps and configures the Sage distribution,
// - thus, the script ``./sage`` and the symlinks ``prefix``, ``venv`` are set as expected,
// - the source tree is prepared for rebuilding Sage based from the source tree on
// top of the existing installation from the Docker image.
// - however, it does not start the build.
// * Otherwise, it does nothing. This is so that users can copy this devcontainer.json file as is
// into their projects.
"updateContentCommand": "if [ -d pkgs/sagemath-standard ]; then make configure && ln -sf $CONDA_PREFIX venv; else echo 'Edit .devcontainer/devcontainer.json (updateContentCommand) to run project-specific startup commands'; fi",
"extensions": [
"ms-python.python"
]
}
19 changes: 19 additions & 0 deletions .devcontainer/downstream-docker-cocalc/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// See https://aka.ms/devcontainer.json for format details.
{
"name": "CoCalc Docker",
"image": "sagemathinc/cocalc",
"containerEnv": {
"MAKE": "make -j4"
},
// libgmp.a is broken and leads to a build failure of ecm.
"onCreateCommand": ".devcontainer/onCreate.sh && rm -f /usr/local/sage/local/lib/libgmp.a",
// * If the workspace directory looks like a copy of the Sage source tree (SAGE_ROOT):
// - it bootstraps the Sage distribution,
// - sets the symlink ``venv`` as expected,
// * Otherwise, it does nothing. This is so that users can copy this devcontainer.json file as is
// into their projects.
"updateContentCommand": "if [ -d pkgs/sagemath-standard ]; then make configure && ./configure --enable-build-as-root --prefix=/usr/local/sage/local --with-sage-venv; else echo 'Edit .devcontainer/devcontainer.json (updateContentCommand) to run project-specific startup commands'; fi",
"extensions": [
"ms-python.python"
]
}
18 changes: 18 additions & 0 deletions .devcontainer/downstream-docker-computop/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// See https://aka.ms/devcontainer.json for format details.
{
"name": "computop/sage Docker",
"image": "computop/sage",
"containerEnv": {
"MAKE": "make -j4"
},
// Install build tools, get rid of sourcing /sage/activate in non-login shells.
// libgmp.a is broken and leads to a build failure of ecm.
"onCreateCommand": ".devcontainer/onCreate.sh --sudo && sudo rm -f /sage/local/lib/libgmp.a && sed -i.bak '/sage.*activate/d' ~/.bashrc",
// Do not run configure within a sage-env (see #29485).
// The pari package is broken in the computop/sage 9.5 image, need to reinstall.
// Also libnauty is broken.
"updateContentCommand": "make configure && (export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && unset CFLAGS LDFLAGS CXXFLAGS CPATH LIBRARY_PATH && ./configure --prefix=/sage/local --with-sage-venv)",
"extensions": [
"ms-python.python"
]
}
9 changes: 9 additions & 0 deletions .devcontainer/onCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/sh
# Run this script from SAGE_ROOT. Invoke with "--sudo" if sudo is needed.
export PATH=$(pwd)/build/bin:$PATH
SYSTEM=$(sage-guess-package-system)
eval $(sage-print-system-package-command $SYSTEM "$@" update)
eval $(sage-print-system-package-command $SYSTEM --yes "$@" --spkg install _bootstrap _prereq python3 git $EXTRA_SAGE_PACKAGES)
if [ -n "$EXTRA_SYSTEM_PACKAGES" ]; then
eval $(sage-print-system-package-command $SYSTEM --yes "$@" install $EXTRA_SYSTEM_PACKAGES)
fi
8 changes: 8 additions & 0 deletions .devcontainer/portability-Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This Dockerfile is used by all portability-.../devcontainer.json files,
# which provide the actual values for the 4 arguments defined below, which
# feed into the FROM statement that determines the base Docker image.
ARG SYSTEM_FACTOR="ubuntu-jammy"
ARG PACKAGE_FACTOR="standard"
ARG DOCKER_TARGET="with-system-packages"
ARG DOCKER_TAG="dev"
FROM ghcr.io/sagemath/sage/sage-docker-${SYSTEM_FACTOR}-${PACKAGE_FACTOR}-${DOCKER_TARGET}:${DOCKER_TAG}
22 changes: 22 additions & 0 deletions .devcontainer/portability-ubuntu-jammy-standard/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// See https://aka.ms/devcontainer.json for format details.
{
"name": "Ubuntu jammy",
"build": {
"dockerfile": "portability-Dockerfile",
// See tox.ini for definitions
"args": {
"SYSTEM_FACTOR": "ubuntu-jammy",
"PACKAGE_FACTOR": "standard",
"DOCKER_TARGET": "with-targets",
"DOCKER_TAG": "dev"
}
},
"containerEnv": {
"MAKE": "make -j4"
},
"onCreateCommand": ".devcontainer/onCreate.sh",
"updateContentCommand": ".devcontainer/portability-updateContent.sh",
"extensions": [
"ms-python.python"
]
}
30 changes: 30 additions & 0 deletions .devcontainer/portability-updateContent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#! /bin/sh
# The portability-.../devcontainer.json configurations run this script after
# the container is started.
#
# The script assumes that it is run from SAGE_ROOT.
#
# If "config.log" or "logs" are symlinks (for example, created by 'tox -e local-...',
# or after https://trac.sagemath.org/ticket/33262), they might point outside of
# the dev container, so remove them. Likewise for upstream.
for f in config.log logs upstream; do
if [ -L $f ]; then
rm -f $f
fi
done
# If possible (ensured after https://trac.sagemath.org/ticket/33262), keep the
# logs in the container.
if [ ! -d logs ]; then
ln -s /sage/logs logs
fi
# Bootstrap, configure, and build the Sage distribution, reusing the Sage
# installation from the prebuilt image.
set -e
set -x
make configure
if [ -x /sage/config.status ]; then
eval ./configure $(/sage/config.status --config) --enable-build-as-root --prefix=/sage/local --with-sage-venv
else
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv
fi
make build V=0
37 changes: 26 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,11 @@ jobs:
container: ghcr.io/sagemath/sage/sage-docker-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v2

- name: Set up node to install pyright
uses: actions/setup-node@v1
with:
node-version: '12'

- name: Install pyright
# Fix to v232 due to bug https://github.com/microsoft/pyright/issues/3239
run: npm install -g pyright@1.1.232

- name: Prepare
id: prepare
run: |
# Install test tools.
if apt-get update && apt-get install -y git python3-venv; then
Expand All @@ -53,10 +46,31 @@ jobs:
./bootstrap
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-editable --enable-download-from-upstream-url
- name: Build and test modularized distributions
if: always() && steps.prepare.outcome == 'success'
run: make V=0 tox && make pypi-wheels
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2

- name: Set up node to install pyright
if: always() && steps.prepare.outcome == 'success'
uses: actions/setup-node@v1
with:
node-version: '12'

- name: Install pyright
if: always() && steps.prepare.outcome == 'success'
# Fix to v232 due to bug https://github.com/microsoft/pyright/issues/3239
run: npm install -g pyright@1.1.232

- name: Static code check with pyright
if: always() && steps.prepare.outcome == 'success'
run: pyright

- name: Build
id: build
if: always() && steps.prepare.outcome == 'success'
run: make build
env:
MAKE: make -j2
Expand All @@ -73,20 +87,21 @@ jobs:
COLUMNS: 120

- name: Test
if: always() && steps.build.outcome == 'success'
run: |
../sage -python -m pip install coverage
../sage -python -m coverage run ./bin/sage-runtests --all -p2
working-directory: ./src

- name: Prepare coverage results
if: always()
if: always() && steps.build.outcome == 'success'
run: |
./venv/bin/python3 -m coverage combine src/.coverage/
./venv/bin/python3 -m coverage xml
find . -name *coverage*
- name: Upload coverage to codecov
if: always()
if: always() && steps.build.outcome == 'success'
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
81 changes: 81 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI Linux

## 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: [push, pull_request]

on:
pull_request:
types: [opened, synchronize]
push:
tags:
- '*'
workflow_dispatch:
# Allow to run manually

env:
TARGETS_PRE: all-sage-local
TARGETS: build doc-html
TARGETS_OPTIONAL: ptest

jobs:

docker:
uses: ./.github/workflows/docker.yml
with:
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
targets: build doc-html
targets_optional: ptest
docker_push_repository: ghcr.io/${{ github.repository }}/

local-ubuntu:

runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
tox_system_factor: [conda-forge-ubuntu]
tox_packages_factor: [minimal, standard, environment, environment-optional]
env:
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
steps:
- uses: actions/checkout@v2
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Build and test with tox
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
# For doctesting, we use a lower parallelization to avoid timeouts.
run: |
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
- name: Prepare logs artifact
run: |
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
if: always()
- uses: actions/upload-artifact@v1
with:
path: artifacts
name: ${{ env.LOGS_ARTIFACT_NAME }}
if: always()
- name: Print out logs for immediate inspection
# and markup the output with GitHub Actions logging commands
run: |
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
if: always()
2 changes: 2 additions & 0 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ jobs:
upload_wheels:
needs: build_wheels
runs-on: ubuntu-latest
env:
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
steps:

- uses: actions/download-artifact@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:

- name: Prepare
run: |
# Reuse built SAGE_LOCAL contained in the Docker image
# Reuse built SAGE_LOCAL contained in the Docker image
./bootstrap
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-download-from-upstream-url
make furo
- name: Build
run: make doc-html
Expand Down
Loading

0 comments on commit e7e02b1

Please sign in to comment.