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

Commit 225dea9

Browse files
author
Matthias Koeppe
committed
Merge tag '9.1.rc2' into t/27763/perl_packages_for_polymake
SageMath version 9.1.rc2, Release Date: 2020-04-25
2 parents 20b8ffe + 50c5ac8 commit 225dea9

File tree

74 files changed

+3579
-622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3579
-622
lines changed

.github/workflows/ci-cygwin.yml

Lines changed: 667 additions & 8 deletions
Large diffs are not rendered by default.

.github/workflows/tox-optional.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Run SAGE_ROOT/tox.ini TARGETS_OPTIONAL
2+
3+
## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
4+
## whenever a GitHub pull request is opened or synchronized in a repository
5+
## where GitHub Actions are enabled.
6+
##
7+
## It builds and checks some sage spkgs as defined in TARGETS.
8+
##
9+
## A job succeeds if there is no error.
10+
##
11+
## The build is run with "make V=0", so the build logs of individual packages are suppressed.
12+
##
13+
## At the end, all package build logs that contain an error are printed out.
14+
##
15+
## After all jobs have finished (or are canceled) and a short delay,
16+
## tar files of all logs are made available as "build artifacts".
17+
18+
#on: [push, pull_request]
19+
20+
on:
21+
pull_request:
22+
types: [opened, synchronize]
23+
push:
24+
tags:
25+
- '*'
26+
27+
env:
28+
TARGETS_PRE: build/make/Makefile
29+
TARGETS: build/make/Makefile
30+
TARGETS_OPTIONAL: 4ti2 pynormaliz qepcad lrslib latte_int topcom barvinok isl qhull sage_numerical_backends_coin primecount plantri polymake jupymake kenzo libsemigroups mcqd meataxe mpfrcx openssl p_group_cohomology rst2ipynb sirocco tdlib tides
31+
32+
jobs:
33+
docker:
34+
runs-on: ubuntu-latest
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
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]
39+
tox_packages_factor: [maximal]
40+
env:
41+
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
42+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
43+
DOCKER_TARGETS: with-targets-optional
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: free disk space
47+
run: |
48+
sudo swapoff -a
49+
sudo rm -f /swapfile
50+
sudo apt clean
51+
docker rmi $(docker image ls -aq)
52+
df -h
53+
- name: Install test prerequisites
54+
run: |
55+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
56+
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
57+
- run: |
58+
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::|;"
59+
- name: Copy logs from the build container
60+
run: |
61+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
62+
cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
63+
if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags)); else CONTAINERS=$(docker ps -q -a); fi
64+
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
65+
if: always()
66+
- uses: actions/upload-artifact@v1
67+
with:
68+
path: artifacts
69+
name: ${{ env.LOGS_ARTIFACT_NAME }}
70+
if: always()
71+
- name: Print out logs for immediate inspection
72+
# and markup the output with GitHub Actions logging commands
73+
run: |
74+
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
75+
if: always()
76+
77+
local-macos:
78+
79+
runs-on: macos-latest
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
tox_system_factor: [homebrew-macos-python2, homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
84+
tox_packages_factor: [maximal]
85+
env:
86+
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
87+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
88+
steps:
89+
- uses: actions/checkout@v2
90+
- name: Install test prerequisites
91+
run: |
92+
brew install tox
93+
- name: Install python3 from python.org
94+
# As of 2020-03-30 (https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md),
95+
# Python 3.7.7 is installed on GitHub Actions runners. But we install our own copy from the python.org binary package.
96+
run: |
97+
curl -o python3.pkg https://www.python.org/ftp/python/3.7.7/python-3.7.7-macosx10.9.pkg
98+
sudo installer -verbose -pkg python3.pkg -target /
99+
if: contains(matrix.tox_system_factor, 'python3_pythonorg')
100+
- name: Build and test with tox
101+
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
102+
# For doctesting, we use a lower parallelization to avoid timeouts.
103+
run: |
104+
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
105+
- name: Prepare logs artifact
106+
run: |
107+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
108+
if: always()
109+
- uses: actions/upload-artifact@v1
110+
with:
111+
path: artifacts
112+
name: ${{ env.LOGS_ARTIFACT_NAME }}
113+
if: always()
114+
- name: Print out logs for immediate inspection
115+
# and markup the output with GitHub Actions logging commands
116+
run: |
117+
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
118+
if: always()

.github/workflows/tox.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ name: Run SAGE_ROOT/tox.ini
2020
on:
2121
pull_request:
2222
types: [opened, synchronize]
23+
push:
24+
tags:
25+
- '*'
2326

2427
env:
2528
TARGETS_PRE: sagelib-build-deps

Makefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,7 @@ build/make/Makefile: configure build/make/deps $(SPKG_COLLECT_FILES) $(CONFIG_FI
5050
./config.status --recheck && ./config.status; \
5151
else \
5252
./configure $$PREREQ_OPTIONS; \
53-
fi || ( \
54-
if [ "x$$SAGE_PORT" = x ]; then \
55-
echo "If you would like to try to build Sage anyway (to help porting),"; \
56-
echo "export the variable 'SAGE_PORT' to something non-empty."; \
57-
exit 1; \
58-
else \
59-
echo "Since 'SAGE_PORT' is set, we will try to build anyway."; \
60-
fi; )
53+
fi
6154

6255
# This is used to monitor progress towards Python 3 and prevent
6356
# regressions. Should be removed after the full switch to python3.

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 9.1.rc1, Release Date: 2020-04-22
1+
SageMath version 9.1.rc2, Release Date: 2020-04-25
Lines changed: 71 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,85 @@
11
#!/usr/bin/env bash
22
#
33
system=$1
4-
command=$2
5-
if [ -z "$system" -o -z "$command" ]; then
6-
echo >&2 "usage: $0 {debian|arch|conda|...} {install|remove|...} PACKAGES..."
7-
exit 1
8-
fi
9-
shift 2
10-
system_packages="$*"
11-
shopt -s extglob
12-
if [ -n "$system_packages" ]; then
13-
# No command needed to install nothing
14-
case $system:$command in
15-
debian*|ubuntu*)
16-
echo "sudo apt-get $command $system_packages"
17-
;;
18-
@(fedora*|redhat*|centos*):install)
19-
echo "sudo yum install $system_packages"
20-
;;
21-
arch*:install)
22-
echo "sudo pacman -S $system_packages"
4+
shift
5+
IF_VERBOSE=:
6+
SUDO=
7+
PROMPT=
8+
while :
9+
do
10+
case "$1" in
11+
--verbose)
12+
IF_VERBOSE=
2313
;;
24-
*conda*:install)
25-
echo "conda install $system_packages"
14+
--sudo)
15+
# Whether to print sudo for package managers that need sudo for non-root users
16+
SUDO="sudo "
2617
;;
27-
homebrew*:install)
28-
echo "brew install $system_packages"
29-
echo "# Afterwards: "
18+
--prompt)
19+
PROMPT=' $ '
3020
;;
31-
slackware*:install)
32-
echo "sudo slackpkg install $system_packages"
33-
;;
34-
cygwin*:install)
35-
echo "# first install apt-cyg from https://github.com/transcode-open/apt-cyg"
36-
echo "apt-cyg install $system_packages"
21+
-*)
22+
echo >&2 "$0: unknown option $2"
23+
exit 1
3724
;;
3825
*)
39-
echo "# $command the following packages: $system_packages"
40-
;;
26+
break
4127
esac
28+
shift
29+
done
30+
command=$1
31+
shift
32+
if [ -z "$system" -o -z "$command" ]; then
33+
echo >&2 "usage: $0 {debian|arch|conda|...} [--verbose] [--sudo] [--prompt] {update|install|setup-build-env|remove|...} PACKAGES..."
34+
exit 1
4235
fi
43-
# Messages that should go out even if not packages need to be installed
36+
system_packages="$*"
37+
shopt -s extglob
4438
case $system:$command in
45-
homebrew*:install)
46-
echo "# To automatically take care of homebrew messages regarding "
47-
echo "# keg-only packages for the current shell session:"
39+
homebrew*:setup-build-env)
40+
$IF_VERBOSE echo "# To automatically take care of homebrew messages regarding "
41+
$IF_VERBOSE echo "# keg-only packages for the current shell session:"
4842
[ -n "$SAGE_ROOT" ] || SAGE_ROOT=.
49-
echo "# $ source $SAGE_ROOT/.homebrew-build-env"
50-
echo "# Add this to your shell profile if you want it to persist between shell sessions."
43+
echo "${PROMPT}source $SAGE_ROOT/.homebrew-build-env"
44+
$IF_VERBOSE echo "# Add this to your shell profile if you want it to persist between shell sessions."
45+
;;
46+
*:setup-build-env)
47+
# Nothing needed
48+
;;
49+
#
50+
# Verbs handled above are our own inventions. Verbs handled below are apt-get verbs.
51+
#
52+
@(debian*|ubuntu*):update)
53+
echo "${PROMPT}${SUDO}apt-get $command $system_packages"
54+
;;
55+
@(debian*|ubuntu*):*)
56+
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}apt-get $command $system_packages"
57+
;;
58+
@(fedora*|redhat*|centos*):install)
59+
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}yum install $system_packages"
60+
;;
61+
arch*:install)
62+
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pacman -S $system_packages"
63+
;;
64+
*conda*:install)
65+
[ -n "$system_packages" ] && echo "${PROMPT}conda install $system_packages"
66+
;;
67+
homebrew*:install)
68+
[ -n "$system_packages" ] && echo "${PROMPT}brew install $system_packages"
69+
;;
70+
slackware*:install)
71+
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}slackpkg install $system_packages"
72+
;;
73+
cygwin*:update)
74+
echo "# first install apt-cyg from https://github.com/transcode-open/apt-cyg"
75+
;;
76+
cygwin*:install)
77+
[ -n "$system_packages" ] && echo "${PROMPT}apt-cyg install $system_packages"
78+
;;
79+
*:update)
80+
# Nothing needed
81+
;;
82+
*)
83+
echo "# $command the following packages: $system_packages"
5184
;;
5285
esac

build/bin/sage-spkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ if [ $INFO -ne 0 -a "$USE_LOCAL_SCRIPTS" = yes ]; then
390390
;;
391391
esac
392392
echo -n " "
393-
sage-print-system-package-command $system install $system_packages
393+
sage-print-system-package-command $system --prompt --sudo install $system_packages
394394
fi
395395
done
396396
if [ -z "$system" ]; then

build/bin/write-dockerfile.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ case $SYSTEM in
4343
ARG BASE_IMAGE=ubuntu:latest
4444
FROM \${BASE_IMAGE} as with-system-packages
4545
EOF
46+
EXISTS="2>/dev/null >/dev/null apt-cache show"
4647
UPDATE="apt-get update &&"
4748
INSTALL="DEBIAN_FRONTEND=noninteractive apt-get install -qqq --no-install-recommends --yes"
4849
CLEAN="&& apt-get clean"
@@ -52,6 +53,7 @@ EOF
5253
ARG BASE_IMAGE=fedora:latest
5354
FROM \${BASE_IMAGE} as with-system-packages
5455
EOF
56+
EXISTS="2>/dev/null >/dev/null yum install -y --downloadonly"
5557
INSTALL="yum install -y"
5658
;;
5759
slackware*)
@@ -60,6 +62,8 @@ EOF
6062
ARG BASE_IMAGE=vbatts/slackware:latest
6163
FROM \${BASE_IMAGE} as with-system-packages
6264
EOF
65+
# slackpkg install ignores packages that it does not know, so we do not have to filter
66+
EXISTS="true"
6367
UPDATE="slackpkg update &&"
6468
INSTALL="slackpkg install"
6569
;;
@@ -69,7 +73,9 @@ EOF
6973
ARG BASE_IMAGE=archlinux:latest
7074
FROM \${BASE_IMAGE} as with-system-packages
7175
EOF
72-
INSTALL="pacman -Syu --noconfirm"
76+
UPDATE="pacman -Sy &&"
77+
EXISTS="pacman -Si"
78+
INSTALL="pacman -Su --noconfirm"
7379
;;
7480
conda*)
7581
cat <<EOF
@@ -173,7 +179,7 @@ ARG NUMPROC=8
173179
ENV MAKE="make -j\${NUMPROC}"
174180
ARG USE_MAKEFLAGS="-k V=0"
175181
ENV SAGE_CHECK=warn
176-
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!python2,!nose,!pathpy,!gap,!cysignals,!linbox,!git,!ppl"
182+
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!python2,!nose,!pathpy,!gap,!cysignals,!linbox,!git,!ppl,!cmake"
177183
#:toolchain:
178184
$RUN make \${USE_MAKEFLAGS} base-toolchain
179185
@@ -182,7 +188,7 @@ ARG NUMPROC=8
182188
ENV MAKE="make -j\${NUMPROC}"
183189
ARG USE_MAKEFLAGS="-k V=0"
184190
ENV SAGE_CHECK=warn
185-
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!python2,!nose,!pathpy,!gap,!cysignals,!linbox,!git,!ppl"
191+
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!python2,!nose,!pathpy,!gap,!cysignals,!linbox,!git,!ppl,!cmake"
186192
#:make:
187193
ARG TARGETS_PRE="sagelib-build-deps"
188194
$RUN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_PRE}
@@ -192,7 +198,7 @@ ARG NUMPROC=8
192198
ENV MAKE="make -j\${NUMPROC}"
193199
ARG USE_MAKEFLAGS="-k V=0"
194200
ENV SAGE_CHECK=warn
195-
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!python2,!nose,!pathpy,!gap,!cysignals,!linbox,!git,!ppl"
201+
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!python2,!nose,!pathpy,!gap,!cysignals,!linbox,!git,!ppl,!cmake"
196202
ADD src src
197203
ARG TARGETS="build"
198204
$RUN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS}
@@ -202,7 +208,7 @@ ARG NUMPROC=8
202208
ENV MAKE="make -j\${NUMPROC}"
203209
ARG USE_MAKEFLAGS="-k V=0"
204210
ENV SAGE_CHECK=warn
205-
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!python2,!nose,!pathpy,!gap,!cysignals,!linbox,!git,!ppl"
211+
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!python2,!nose,!pathpy,!gap,!cysignals,!linbox,!git,!ppl,!cmake"
206212
ARG TARGETS_OPTIONAL="ptest"
207213
$RUN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_OPTIONAL} || echo "(error ignored)"
208214

0 commit comments

Comments
 (0)