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

Commit 01b96b0

Browse files
author
Matthias Koeppe
committed
Merge branch 't/29701/replace_use_of_module_list_optionalextension' into t/29950/build_sagelib_using_installed_sage_setup
2 parents 4344f89 + 55c3fbc commit 01b96b0

File tree

552 files changed

+22049
-11376
lines changed

Some content is hidden

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

552 files changed

+22049
-11376
lines changed

.ci/push-dockerhub.sh

+4
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ if [ -z "$DOCKER_USER" -o -z "$SECRET_DOCKER_PASS" ]; then
2626
else
2727
cat "$SECRET_DOCKER_PASS" | docker login -u $DOCKER_USER --password-stdin
2828
docker push ${DOCKER_NAMESPACE:-sagemath}/$1:$DOCKER_TAG
29+
30+
# For historical reasons, we also provide a -py3 tag. It's identical to the non-py3 tag.
31+
docker tag ${DOCKER_NAMESPACE:-sagemath}/$1:$DOCKER_TAG ${DOCKER_NAMESPACE:-sagemath}/$1:$DOCKER_TAG-py3
32+
docker push ${DOCKER_NAMESPACE:-sagemath}/$1:$DOCKER_TAG-py3
2933
fi
+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: Test experimental packages with tox
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 see below
31+
32+
jobs:
33+
docker:
34+
runs-on: ubuntu-latest
35+
strategy:
36+
fail-fast: false
37+
max-parallel: 6
38+
matrix:
39+
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, gentoo, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
40+
tox_packages_factor: [maximal]
41+
targets_pattern: [0-g, h-o, p, q-z]
42+
env:
43+
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
44+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
45+
DOCKER_TARGETS: configured with-targets with-targets-optional
46+
TARGETS_OPTIONAL: "$( echo $(PATH=build/bin:$PATH build/bin/sage-package list :experimental: | grep -v database_stein_watkins\\$ | grep -v polytopes_db_4d | grep '^[${{ matrix.targets_pattern }}]' ) )"
47+
steps:
48+
- uses: actions/checkout@v2
49+
with:
50+
fetch-depth: 500
51+
- name: fetch tags
52+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
53+
- name: free disk space
54+
run: |
55+
sudo swapoff -a
56+
sudo rm -f /swapfile
57+
sudo apt clean
58+
docker rmi $(docker image ls -aq)
59+
df -h
60+
- name: Install test prerequisites
61+
run: |
62+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
63+
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
64+
- run: |
65+
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::|;"
66+
- name: Copy logs from the docker image or build container
67+
run: |
68+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
69+
cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
70+
if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags) /bin/bash || true); fi
71+
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
72+
if: always()
73+
- uses: actions/upload-artifact@v1
74+
with:
75+
path: artifacts
76+
name: ${{ env.LOGS_ARTIFACT_NAME }}
77+
if: always()
78+
- name: Print out logs for immediate inspection
79+
# and markup the output with GitHub Actions logging commands
80+
run: |
81+
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
82+
if: always()
83+
- name: Push docker images
84+
run: |
85+
if [ -f .tox/$TOX_ENV/Dockertags ]; then
86+
TOKEN="${{ secrets.DOCKER_PKG_GITHUB_TOKEN }}"
87+
if [ -z "$TOKEN" ]; then
88+
TOKEN="${{ secrets.GITHUB_TOKEN }}"
89+
fi
90+
echo "$TOKEN" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
91+
for a in $(cat .tox/$TOX_ENV/Dockertags); do
92+
FULL_TAG=docker.pkg.github.com/${{ github.repository }}/$a
93+
docker tag $a $FULL_TAG
94+
echo Pushing $FULL_TAG
95+
docker push $FULL_TAG
96+
done || echo "(Ignoring errors)"
97+
fi
98+
if: always()
99+
100+
local-macos:
101+
102+
runs-on: macos-latest
103+
strategy:
104+
fail-fast: false
105+
max-parallel: 3
106+
matrix:
107+
tox_system_factor: [homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
108+
tox_packages_factor: [maximal]
109+
targets_pattern: [0-g, h-o, p, q-z]
110+
env:
111+
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
112+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
113+
TARGETS_OPTIONAL: "$( echo $(PATH=build/bin:$PATH build/bin/sage-package list :experimental: | grep -v database_stein_watkins\\$ | grep -v polytopes_db_4d | grep '^[${{ matrix.targets_pattern }}]' ) )"
114+
steps:
115+
- uses: actions/checkout@v2
116+
- name: Install test prerequisites
117+
run: |
118+
brew install tox
119+
- name: Install python3 from python.org
120+
# As of 2020-03-30 (https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md),
121+
# Python 3.7.7 is installed on GitHub Actions runners. But we install our own copy from the python.org binary package.
122+
run: |
123+
curl -o python3.pkg https://www.python.org/ftp/python/3.7.7/python-3.7.7-macosx10.9.pkg
124+
sudo installer -verbose -pkg python3.pkg -target /
125+
if: contains(matrix.tox_system_factor, 'python3_pythonorg')
126+
- name: Build and test with tox
127+
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
128+
# For doctesting, we use a lower parallelization to avoid timeouts.
129+
run: |
130+
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
131+
- name: Prepare logs artifact
132+
run: |
133+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
134+
if: always()
135+
- uses: actions/upload-artifact@v1
136+
with:
137+
path: artifacts
138+
name: ${{ env.LOGS_ARTIFACT_NAME }}
139+
if: always()
140+
- name: Print out logs for immediate inspection
141+
# and markup the output with GitHub Actions logging commands
142+
run: |
143+
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
144+
if: always()

.github/workflows/tox-optional.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run SAGE_ROOT/tox.ini TARGETS_OPTIONAL
1+
name: Test optional packages with tox
22

33
## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
44
## whenever a GitHub pull request is opened or synchronized in a repository
@@ -27,7 +27,7 @@ on:
2727
env:
2828
TARGETS_PRE: build/make/Makefile
2929
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
30+
# TARGETS_OPTIONAL see below
3131

3232
jobs:
3333
docker:
@@ -38,10 +38,14 @@ jobs:
3838
matrix:
3939
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, gentoo, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
4040
tox_packages_factor: [maximal]
41+
targets_pattern: [0-g, h-o, p, q-z]
4142
env:
4243
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
4344
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
4445
DOCKER_TARGETS: configured with-targets with-targets-optional
46+
# Test all optional packages, but do not test huge packages,
47+
# and do not test packages that require external software
48+
TARGETS_OPTIONAL: "$( echo $(PATH=build/bin:$PATH build/bin/sage-package list :optional: | grep -v database_stein_watkins\\$ | grep -v polytopes_db_4d | grep -v cplex | grep -v gurobi | grep '^[${{ matrix.targets_pattern }}]' ) )"
4549
steps:
4650
- uses: actions/checkout@v2
4751
with:
@@ -104,9 +108,13 @@ jobs:
104108
matrix:
105109
tox_system_factor: [homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
106110
tox_packages_factor: [maximal]
111+
targets_pattern: [0-g, h-o, p, q-z]
107112
env:
108113
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
109114
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
115+
# Test all optional packages, but do not test huge packages
116+
# and do not test packages that require external software
117+
TARGETS_OPTIONAL: "$( echo $(PATH=build/bin:$PATH build/bin/sage-package list :optional: | grep -v database_stein_watkins\\$ | grep -v polytopes_db_4d | grep -v cplex | grep -v gurobi | grep '^[${{ matrix.targets_pattern }}]' ) )"
110118
steps:
111119
- uses: actions/checkout@v2
112120
- name: Install test prerequisites

.github/workflows/tox.yml

+88
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,91 @@ jobs:
176176
run: |
177177
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
178178
if: always()
179+
180+
dist:
181+
182+
runs-on: ubuntu-latest
183+
steps:
184+
- uses: actions/checkout@v2
185+
with:
186+
fetch-depth: 500
187+
- name: fetch tags
188+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
189+
- name: Install bootstrap prerequisites
190+
run: |
191+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
192+
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(sed "s/#.*//;" build/pkgs/debian-bootstrap.txt)
193+
- name: Bootstrap with sage-update-version
194+
# We set SAGE_ROOT and SAGE_SRC by hand
195+
# because 'sage -sh' does not work with an unconfigured tree,
196+
# giving: Error: SAGE_SCRIPTS_DIR is set to a bad value
197+
run: |
198+
git config --global user.email "[email protected]"
199+
git config --global user.name "Sage GitHub CI"
200+
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe)
201+
- name: make dist
202+
run: |
203+
./configure && make dist
204+
- uses: actions/upload-artifact@v2
205+
with:
206+
path: "dist/*.tar.gz"
207+
name: dist
208+
209+
local-macos-nohomebrew:
210+
211+
needs: [dist]
212+
213+
runs-on: macos-latest
214+
strategy:
215+
fail-fast: false
216+
max-parallel: 4
217+
matrix:
218+
tox_system_factor: [macos-nobootstrap, macos-nobootstrap-python3_pythonorg]
219+
tox_packages_factor: [minimal]
220+
env:
221+
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
222+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
223+
steps:
224+
- uses: actions/checkout@v2
225+
if: "!contains(matrix.tox_system_factor, 'nobootstrap')"
226+
- uses: actions/download-artifact@v2
227+
with:
228+
path: .
229+
name: dist
230+
if: contains(matrix.tox_system_factor, 'nobootstrap')
231+
- name: Unpack sage dist
232+
run: |
233+
tar xf sage*.tar.gz --strip-components=1
234+
if: contains(matrix.tox_system_factor, 'nobootstrap')
235+
- name: Move homebrew away
236+
run: |
237+
(cd /usr/local && for a in bin etc include lib opt sbin share; do mv $a $a-moved; done)
238+
- name: Install test prerequisites
239+
run: |
240+
/usr/bin/python3 -m pip install --user tox
241+
- name: Install python3 from python.org
242+
# As of 2020-03-30 (https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md),
243+
# Python 3.7.7 is installed on GitHub Actions runners. But we install our own copy from the python.org binary package.
244+
run: |
245+
curl -o python3.pkg https://www.python.org/ftp/python/3.7.7/python-3.7.7-macosx10.9.pkg
246+
sudo installer -verbose -pkg python3.pkg -target /
247+
if: contains(matrix.tox_system_factor, 'python3_pythonorg')
248+
- name: Build and test with tox
249+
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
250+
# For doctesting, we use a lower parallelization to avoid timeouts.
251+
run: |
252+
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
253+
- name: Prepare logs artifact
254+
run: |
255+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
256+
if: always()
257+
- uses: actions/upload-artifact@v1
258+
with:
259+
path: artifacts
260+
name: ${{ env.LOGS_ARTIFACT_NAME }}
261+
if: always()
262+
- name: Print out logs for immediate inspection
263+
# and markup the output with GitHub Actions logging commands
264+
run: |
265+
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
266+
if: always()

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,4 @@ gitlab-build-docker.log
113113

114114
/.tox
115115
/prefix
116+
worktree*

.gitlab-ci.yml

-40
Original file line numberDiff line numberDiff line change
@@ -193,43 +193,3 @@ push-dockerhub-dev:
193193
script:
194194
- . .ci/pull-gitlab.sh sagemath-dev
195195
- sh .ci/push-dockerhub.sh sagemath-dev
196-
197-
.py3:
198-
variables:
199-
WITH_PYTHON: 3
200-
DEFAULT_ARTIFACT_BASE: sagemath/sagemath-dev:develop-py3
201-
202-
build-from-latest-py3:
203-
extends:
204-
- build-from-latest
205-
- .py3
206-
207-
build-from-clean-py3:
208-
extends:
209-
- build-from-clean
210-
- .py3
211-
212-
test-dev-py3:
213-
extends:
214-
- test-dev
215-
- .py3
216-
217-
test-cli-py3:
218-
extends:
219-
- test-cli
220-
- .py3
221-
222-
test-jupyter-py3:
223-
extends:
224-
- test-jupyter
225-
- .py3
226-
227-
push-dockerhub-py3:
228-
extends:
229-
- push-dockerhub
230-
- .py3
231-
232-
push-dockerhub-dev-py3:
233-
extends:
234-
- push-dockerhub-dev
235-
- .py3

.homebrew-build-env

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,19 @@ export PKG_CONFIG_PATH
2323
LIBRARY_PATH="$HOMEBREW/lib$LIBRARY_PATH"
2424
[ -z "$CPATH" ] || CPATH=":${CPATH}"
2525
CPATH="$HOMEBREW/include$CPATH"
26-
for l in readline; do
26+
for l in readline ; do
2727
if [ -d "$HOMEBREW/opt/$l/lib" ]; then
2828
LIBRARY_PATH="$HOMEBREW/opt/$l/lib:$LIBRARY_PATH"
2929
fi
3030
if [ -d "$HOMEBREW/opt/$l/include" ]; then
3131
CPATH="$HOMEBREW/opt/$l/include:$CPATH"
3232
fi
3333
done
34+
for l in "gcc@9/lib/gcc/9"; do
35+
if [ -d "$HOMEBREW/opt/$l" ]; then
36+
LIBRARY_PATH="$HOMEBREW/opt/$l:$LIBRARY_PATH"
37+
fi
38+
done
3439
export LIBRARY_PATH
3540
export CPATH
3641
for l in gettext; do

.lgtm.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ path_classifiers:
1010
- "**/species/library.py"
1111
- "**/categories/basic.py"
1212
- "**/combinat/ribbon.py"
13+
- "**/combinat/family.py"
1314
- "**/interacts/geometry.py"
1415
- "**/matroids/advanced.py"
1516
- "**/matroids/named_matroids.py"

COPYING.txt

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ sage_scripts GPLv2+
121121
sagenb GPLv3
122122
sagetex GPLv2+ (CC BY-SA 3.0 for included documentation)
123123
scipy Modified BSD
124-
scons MIT License
125124
setuptools Python License
126125
singular GPLv2 or GPLv3 (see below)
127126
six MIT License

README.md

-5
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,6 @@ Guide](https://doc.sagemath.org/html/en/installation).
255255
powerful machines, you might even consider `-j16`, as building with
256256
more jobs than CPU cores can speed things up further.
257257

258-
If you want to run the test suite for each individual Sage package
259-
as it gets installed, type `export SAGE_CHECK="yes"`. This will run
260-
each test suite, raising an error if any failure occurs. If set to
261-
``warn``, then only a warning is printed in this case.
262-
263258
To reduce the terminal output during the build, type `export V=0`.
264259
(`V` stands for "verbosity".)
265260

VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 9.2.beta4, Release Date: 2020-07-08
1+
SageMath version 9.2.beta7, Release Date: 2020-08-02

0 commit comments

Comments
 (0)