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

Commit

Permalink
Merge branch 'develop' into t/29629/ore_polynomials_rebased
Browse files Browse the repository at this point in the history
  • Loading branch information
xcaruso committed Jun 17, 2020
2 parents b35e1d0 + e2dcdee commit 131d78e
Show file tree
Hide file tree
Showing 1,222 changed files with 25,183 additions and 17,171 deletions.
3 changes: 3 additions & 0 deletions .ci/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ rsync html_/ html/ -a --copy-links

# Build the release image without build artifacts.
docker_build --target sagemath --tag "$DOCKER_IMAGE_CLI" .
# Tag the sagemath:$DOCKER_TAG image that CI has just built as
# sagemath:$COMMIT_HASH so we can refer to it uniquely later.
docker tag "$DOCKER_IMAGE_CLI" "$DOCKER_IMAGE_BINDER"
# Display the layers of this image
docker history "$DOCKER_IMAGE_CLI"
# Build the developer image with the build artifacts intact.
Expand Down
2 changes: 2 additions & 0 deletions .ci/update-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ fi
export DOCKER_IMAGE_CLI=${DOCKER_NAMESPACE:-sagemath}/sagemath:$DOCKER_TAG
export DOCKER_IMAGE_DEV=${DOCKER_NAMESPACE:-sagemath}/sagemath-dev:$DOCKER_TAG

export DOCKER_IMAGE_BINDER="${DOCKER_NAMESPACE:-sagemath}/sagemath:${CI_COMMIT_SHA}"

# Seed the build cache with this image (set to source-clean to build from
# scratch.)
export ARTIFACT_BASE=${ARTIFACT_BASE:-$DEFAULT_ARTIFACT_BASE}
380 changes: 304 additions & 76 deletions .github/workflows/ci-cygwin-minimal.yml

Large diffs are not rendered by default.

722 changes: 0 additions & 722 deletions .github/workflows/ci-cygwin-standard-python2.yml

This file was deleted.

380 changes: 304 additions & 76 deletions .github/workflows/ci-cygwin-standard.yml

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions .github/workflows/extract-sage-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# to be run from $SAGE_ROOT, with arguments sage-local-${{ env.PREVIOUS_STAGES }}.tar

# Show all tar files
ls -l $*

# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
for a in $*; do
echo Extracting $a
tar xf $a
rm -f $a
done

# Also get rid of the stages that were not extracted
rm -f sage-local-*.tar

# We set the installation records to the same mtime so that no rebuilds due to dependencies
# among these packages are triggered.
(cd local/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *)

# Show what has been built already.
ls -l local local/var/lib/sage/installed/
df -h

# Rebase!
src/bin/sage-rebase.sh local
132 changes: 132 additions & 0 deletions .github/workflows/tox-gcc_spkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Run SAGE_ROOT/tox.ini

## 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:
- '*'

env:
TARGETS_PRE: sagelib-build-deps
TARGETS: build doc-html
TARGETS_OPTIONAL: ptest

jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, centos-7, centos-8, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_packages_factor: [minimal-gcc_spkg, standard-gcc_spkg]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
DOCKER_TARGETS: configured with-targets with-targets-optional
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 500
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
- run: |
set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--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::|;"
- name: Copy logs from the docker image or build container
run: |
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags) /bin/bash || true); fi
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
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()
- name: Push docker images
run: |
if [ -f .tox/$TOX_ENV/Dockertags ]; then
TOKEN="${{ secrets.DOCKER_PKG_GITHUB_TOKEN }}"
if [ -z "$TOKEN" ]; then
TOKEN="${{ secrets.GITHUB_TOKEN }}"
fi
echo "$TOKEN" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
for a in $(cat .tox/$TOX_ENV/Dockertags); do
FULL_TAG=docker.pkg.github.com/${{ github.repository }}/$a
docker tag $a $FULL_TAG
echo Pushing $FULL_TAG
docker push $FULL_TAG
done || echo "(Ignoring errors)"
fi
if: always()

local-ubuntu:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tox_system_factor: [conda-forge-ubuntu]
tox_packages_factor: [minimal-gcc_spkg, standard-gcc_spkg]
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 python-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()
6 changes: 4 additions & 2 deletions .github/workflows/tox-optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 6
matrix:
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, centos-7, centos-8, archlinux-latest, slackware-14.2, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, centos-7, centos-8, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_packages_factor: [maximal]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down Expand Up @@ -99,8 +100,9 @@ jobs:
runs-on: macos-latest
strategy:
fail-fast: false
max-parallel: 3
matrix:
tox_system_factor: [homebrew-macos-python2, homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
tox_system_factor: [homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
tox_packages_factor: [maximal]
env:
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 20
matrix:
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, centos-7, centos-8, archlinux-latest, slackware-14.2, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_packages_factor: [minimal, standard, standard-python2]
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, centos-7, centos-8, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_packages_factor: [minimal, standard]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down Expand Up @@ -99,8 +100,9 @@ jobs:
runs-on: macos-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
tox_system_factor: [homebrew-macos-python2, homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
tox_system_factor: [homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, homebrew-macos-python3_xcode-gcc_spkg, conda-forge-macos]
tox_packages_factor: [minimal, standard]
env:
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down Expand Up @@ -142,9 +144,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
tox_system_factor: [conda-forge-ubuntu]
tox_packages_factor: [minimal, standard, standard-python2]
tox_packages_factor: [minimal, standard]
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 }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-cygwin-yml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
for X in standard-python2 minimal; do sed 's/\[standard\]/['$X']/g;s/CI cygwin-standard/CI cygwin-'$X'/g;' ci-cygwin-standard.yml > ci-cygwin-$X.yml; done
5 changes: 3 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# If you want to provide your own runners, make sure to tag them as follows:
# * "big" (60GB of disk space are available) to make build-from-clean pass.

image: docker:latest
image: docker:stable

stages:
- build
Expand Down Expand Up @@ -77,7 +77,7 @@ before_script:
# better isolation. If you expect many builds to run simultaneously on a host,
# conflicting tags can cause issues with a mounted DOCKER_HOST.
services:
- docker:18.05.0-ce-dind
- docker:stable-dind

# Build Sage and its documentation.
# The build starts from the build artifacts of DEFAULT_ARTIFACT_BASE which is
Expand All @@ -100,6 +100,7 @@ build-from-latest:
- .ci/build-docker.sh | tee gitlab-build-docker.log | .ci/head-tail.sh 1048576
- .ci/push-gitlab.sh sagemath-dev
- .ci/push-gitlab.sh sagemath
- DOCKER_TAG=$CI_COMMIT_SHA .ci/push-gitlab.sh sagemath
except:
- master
- develop
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SPKG_COLLECT_FILES = build/pkgs/*/type build/pkgs/*/package-version.txt build/pk

# If configure was run before, rerun it with the old arguments.
# Otherwise, run configure with argument $PREREQ_OPTIONS.
build/make/Makefile: configure build/make/deps $(SPKG_COLLECT_FILES) $(CONFIG_FILES:%=%.in)
build/make/Makefile: configure $(SPKG_COLLECT_FILES) $(CONFIG_FILES:%=%.in)
rm -f config.log
mkdir -p logs/pkgs
ln -s logs/pkgs/config.log config.log
Expand Down Expand Up @@ -105,6 +105,7 @@ distclean: build-clean
bootstrap-clean:
rm -rf config configure build/make/Makefile-auto.in
rm -f src/doc/en/installation/*.txt
rm -rf src/doc/en/reference/spkg/*.rst

# Remove absolutely everything which isn't part of the git repo
maintainer-clean: distclean bootstrap-clean
Expand Down
Loading

0 comments on commit 131d78e

Please sign in to comment.