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

Commit 2bbd4b3

Browse files
author
Matthias Koeppe
committed
Merge branch 't/29341/optional-test-9.1.rc0' into t/29534/trigger_ci_workflows_on_github_actions_by_pushing_tags
2 parents 27ddea3 + bd8a2f9 commit 2bbd4b3

File tree

255 files changed

+330
-1168
lines changed

Some content is hidden

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

255 files changed

+330
-1168
lines changed

.github/workflows/tox-optional.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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+
24+
env:
25+
TARGETS_PRE: build/make/Makefile
26+
TARGETS: build/make/Makefile
27+
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
28+
29+
jobs:
30+
docker:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
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]
36+
tox_packages_factor: [maximal]
37+
env:
38+
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
39+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
40+
DOCKER_TARGETS: with-targets-optional
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: free disk space
44+
run: |
45+
sudo swapoff -a
46+
sudo rm -f /swapfile
47+
sudo apt clean
48+
docker rmi $(docker image ls -aq)
49+
df -h
50+
- name: Install test prerequisites
51+
run: |
52+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
53+
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
54+
- run: |
55+
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::|;"
56+
- name: Copy logs from the build container
57+
run: |
58+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
59+
cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
60+
if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags)); else CONTAINERS=$(docker ps -q -a); fi
61+
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
62+
if: always()
63+
- uses: actions/upload-artifact@v1
64+
with:
65+
path: artifacts
66+
name: ${{ env.LOGS_ARTIFACT_NAME }}
67+
if: always()
68+
- name: Print out logs for immediate inspection
69+
# and markup the output with GitHub Actions logging commands
70+
run: |
71+
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
72+
if: always()
73+
74+
local-macos:
75+
76+
runs-on: macos-latest
77+
strategy:
78+
fail-fast: false
79+
matrix:
80+
tox_system_factor: [homebrew-macos-python2, homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
81+
tox_packages_factor: [maximal]
82+
env:
83+
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
84+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
85+
steps:
86+
- uses: actions/checkout@v2
87+
- name: Install test prerequisites
88+
run: |
89+
brew install tox
90+
- name: Install python3 from python.org
91+
# As of 2020-03-30 (https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md),
92+
# Python 3.7.7 is installed on GitHub Actions runners. But we install our own copy from the python.org binary package.
93+
run: |
94+
curl -o python3.pkg https://www.python.org/ftp/python/3.7.7/python-3.7.7-macosx10.9.pkg
95+
sudo installer -verbose -pkg python3.pkg -target /
96+
if: contains(matrix.tox_system_factor, 'python3_pythonorg')
97+
- name: Build and test with tox
98+
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
99+
# For doctesting, we use a lower parallelization to avoid timeouts.
100+
run: |
101+
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
102+
- name: Prepare logs artifact
103+
run: |
104+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
105+
if: always()
106+
- uses: actions/upload-artifact@v1
107+
with:
108+
path: artifacts
109+
name: ${{ env.LOGS_ARTIFACT_NAME }}
110+
if: always()
111+
- name: Print out logs for immediate inspection
112+
# and markup the output with GitHub Actions logging commands
113+
run: |
114+
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
115+
if: always()

build/bin/sage-dist-helpers

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ sdh_make() {
184184
}
185185

186186

187+
sdh_make_check() {
188+
echo "Checking $PKG_NAME"
189+
${MAKE:-make} check "$@" || sdh_die "Failures checking $PKG_NAME"
190+
}
191+
187192
sdh_make_install() {
188193
echo "Installing $PKG_NAME"
189194
if [ -n "$SAGE_DESTDIR" ]; then

build/bin/sage-spkg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,13 +1037,14 @@ if [ "$SAGE_CHECK" = "yes" -o "$SAGE_CHECK" = "warn" ]; then
10371037
if [ $? -ne 0 ]; then
10381038
TEST_SUITE_RESULT="failed"
10391039
if [ "$SAGE_CHECK" = "warn" ]; then
1040-
error_msg "Warning: Error testing package $PKG_NAME (ignored)" "make check"
1040+
error_msg "Warning: Failures testing package $PKG_NAME (ignored)" "make check"
10411041
else
10421042
error_msg "Error testing package $PKG_NAME" "make check"
10431043
exit 1
10441044
fi
10451045
else
10461046
TEST_SUITE_RESULT="passed"
1047+
echo "Passed the test suite for $PKG_NAME."
10471048
fi
10481049
else
10491050
echo "Package $PKG_NAME has no test suite."

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 --download-only"
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

build/make/deps

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ toolchain-deps:
100100
all-toolchain: base-toolchain
101101
$(MAKE) toolchain-deps
102102

103+
# All packages needed as a prerequisite to install other Python packages with
104+
# pip or which are otherwise used by the Python build tools; these should be
105+
# given as a prerequisite to any pip-installed packages
106+
PYTHON_TOOLCHAIN = setuptools pip setuptools_scm future
107+
103108
# Everything needed to start up Sage using "./sage". Of course, not
104109
# every part of Sage will work. It does not include Maxima for example.
105110
SAGERUNTIME = sagelib $(SCRIPTS) $(inst_ipython) $(inst_pexpect) \

build/pkgs/4ti2/spkg-check.in

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
if [ -z "$SAGE_LOCAL" ]; then
2-
echo >&2 "Error: SAGE_LOCAL undefined - exiting..."
3-
echo >&2 "Maybe run 'sage -sh'?"
4-
exit 1
5-
fi
6-
71
cd src
82

93
# We don't have to set up any environment variables here since the
104
# Makefiles already have them from 'configure'.
115

12-
echo "Now running 4ti2's test suite..."
136
$MAKE check
14-
if [ $? -ne 0 ]; then
15-
echo >&2 "Error: The 4ti2 test suite failed."
16-
exit 1
17-
fi
18-
19-
echo "The 4ti2 test suite passed successfully."

build/pkgs/alabaster/dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(PYTHON) | pip
1+
$(PYTHON) | $(PYTHON_TOOLCHAIN)
22

33
----------
44
All lines of this file are ignored except the first.

build/pkgs/appnope/dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(PYTHON) | pip
1+
$(PYTHON) | $(PYTHON_TOOLCHAIN)
22

33
----------
44
All lines of this file are ignored except the first.

build/pkgs/atlas/configuration.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@
4040
# linker_GNU?, linker_Solaris?, linker_Darwin? # ld
4141

4242

43-
######################################################################
44-
### Sanity check
45-
######################################################################
46-
47-
if 'SAGE_LOCAL' not in os.environ:
48-
print("SAGE_LOCAL undefined ... exiting")
49-
print("Maybe run 'sage -sh'?")
50-
sys.exit(1)
51-
52-
5343
######################################################################
5444
### Functions
5545
######################################################################

build/pkgs/atlas/spkg-check.in

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
######################################################################
2-
### Sanity check
3-
######################################################################
4-
5-
if [ -z "$SAGE_LOCAL" ]; then
6-
echo >&2 "Error: SAGE_LOCAL undefined - exiting..."
7-
echo >&2 "Maybe run 'sage -sh'?"
8-
exit 1
9-
fi
10-
111
######################################################################
122
### Skip building ATLAS on specific systems
133
######################################################################
@@ -32,7 +22,7 @@ make_check()
3222
# make sure everything builds correctly
3323
$MAKE check
3424
if [ $? -ne 0 ]; then
35-
echo >&2 "Error: The ATLAS self-tests failed."
25+
echo >&2 "The ATLAS self-tests failed."
3626
exit 1
3727
else
3828
echo "The ATLAS self-tests successfully passed."
@@ -45,7 +35,7 @@ make_time()
4535
# collect some timings
4636
$MAKE time
4737
if [ $? -ne 0 ]; then
48-
echo >&2 "Error: The ATLAS timing data failed to be collected."
38+
echo >&2 "The ATLAS timing data failed to be collected."
4939
exit 1
5040
else
5141
echo "The ATLAS timing data was successfully collected."

0 commit comments

Comments
 (0)