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

Commit f16a49b

Browse files
committed
Merge branch 'develop' into u/lftabera/ticket/8558
2 parents 58fc36c + f5efe48 commit f16a49b

File tree

4,246 files changed

+128759
-86611
lines changed

Some content is hidden

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

4,246 files changed

+128759
-86611
lines changed

.ci/build-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ docker_build() {
2626
# Docker's --cache-from does not really work with multi-stage builds: https://github.com/moby/moby/issues/34715
2727
# So we just have to rely on the local cache.
2828
time docker build -f docker/Dockerfile \
29-
--build-arg "--build-arg "MAKEFLAGS=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS=${SAGE_NUM_THREADS}" --build-arg "MAKEFLAGS_DOCBUILD=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS_DOCBUILD=${SAGE_NUM_THREADS_DOCBUILD}" --build-arg ARTIFACT_BASE=$ARTIFACT_BASE $@
29+
--build-arg "MAKEFLAGS=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS=${SAGE_NUM_THREADS}" --build-arg "MAKEFLAGS_DOCBUILD=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS_DOCBUILD=${SAGE_NUM_THREADS_DOCBUILD}" --build-arg ARTIFACT_BASE=$ARTIFACT_BASE $@
3030
}
3131

3232
# We use a multi-stage build /docker/Dockerfile. For the caching to be
@@ -53,7 +53,7 @@ docker tag "$DOCKER_IMAGE_CLI" "$DOCKER_IMAGE_BINDER"
5353
# Display the layers of this image
5454
docker history "$DOCKER_IMAGE_CLI"
5555
# Build the developer image with the build artifacts intact.
56-
# Note: It's important to build the dev image last because it might be tagged as ARTIFACT_BASE.
56+
# Note: It is important to build the dev image last because it might be tagged as ARTIFACT_BASE.
5757
docker_build --target sagemath-dev --tag "$DOCKER_IMAGE_DEV" .
5858
# Display the layers of this image
5959
docker history "$DOCKER_IMAGE_DEV"

.ci/update-env.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ if [ -n "$CI_MONKEY_PATCH" ]; then
2727
$SCRIPT
2828
fi
2929

30-
WITH_PYTHON=${WITH_PYTHON:-2}
31-
3230
# From the docker documentation: "A tag name must be valid ASCII and may
3331
# contain lowercase and uppercase letters, digits, underscores, periods and
3432
# dashes. A tag name may not start with a period or a dash and may contain a
@@ -38,10 +36,6 @@ export DOCKER_TAG=`echo $DOCKER_TAG | tr -d '[:space:]' | tr -c '[:alnum:]_.-' '
3836
[[ -z "$DOCKER_TAG" ]] && export DOCKER_TAG=none
3937
[[ "$DOCKER_TAG" = "master" ]] && export DOCKER_TAG=latest
4038

41-
if [ $WITH_PYTHON = 3 ]; then
42-
export DOCKER_TAG=${DOCKER_TAG}-py3
43-
fi
44-
4539
export DOCKER_IMAGE_CLI=${DOCKER_NAMESPACE:-sagemath}/sagemath:$DOCKER_TAG
4640
export DOCKER_IMAGE_DEV=${DOCKER_NAMESPACE:-sagemath}/sagemath-dev:$DOCKER_TAG
4741

.github/workflows/ci-cygwin-minimal.yml

Lines changed: 344 additions & 250 deletions
Large diffs are not rendered by default.

.github/workflows/ci-cygwin-standard.yml

Lines changed: 344 additions & 250 deletions
Large diffs are not rendered by default.

.github/workflows/ci-wsl.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
name: Build & Test WSL
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
push:
7+
tags:
8+
- '*'
9+
branches:
10+
- 'public/build/**wsl**'
11+
workflow_dispatch:
12+
# Allow to run manually
413

514
jobs:
615
windows:
716
runs-on: windows-latest
8-
name: Windows (using WSL)
17+
name: Ubuntu 20.04
918
# Following https://trac.sagemath.org/ticket/25206#comment:63
1019
steps:
1120
- name: Configure git
@@ -18,22 +27,10 @@ jobs:
1827
Ubuntu\ubuntu2004.exe install --root
1928
- name: Install dependencies
2029
run: |
21-
Function ExtractPackages
22-
{
23-
param($path)
24-
@(Get-Content $path | Where-Object { !$_.StartsWith("#") })
25-
}
26-
$packages = Get-ChildItem build/pkgs -recurse -Include debian.txt, debian-bootstrap.txt | foreach-object { ExtractPackages $_.FullName } | sort -Unique
27-
# Add tox which is use to build
28-
$packages += 'tox'
29-
echo "Install the following packages:" @packages
30-
# Add deadsnakes so that libpython3.7-dev is found
31-
& wsl sudo add-apt-repository ppa:deadsnakes/ppa
32-
# Install
33-
& wsl sudo apt-get update -y
34-
& wsl sudo apt-get install -y @packages
30+
wsl sudo apt-get update -y
31+
wsl sudo apt-get install -y tox
3532
- name: Build
36-
run: wsl tox -e local -- SAGE_NUM_THREADS=4 build
33+
run: wsl tox -e local-sudo-ubuntu-standard -- SAGE_NUM_THREADS=4 build
3734
env:
3835
# WSL runs everything as root, so we have to enable build as root user
3936
EXTRA_CONFIGURE_ARGS: "--enable-build-as-root"
@@ -42,7 +39,7 @@ jobs:
4239
MAKE: "make -j2"
4340
WSLENV: EXTRA_CONFIGURE_ARGS:MAKE
4441
- name: Test
45-
run: wsl tox -e local -- SAGE_NUM_THREADS=4 ptest
42+
run: wsl tox -e local-sudo-ubuntu-standard -- SAGE_NUM_THREADS=4 ptest
4643
- name: Prepare logs artifact
4744
run: mkdir -p "artifacts/logs"; cp -r .tox/*/log "artifacts/logs"
4845
shell: bash
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
#!/usr/bin/env bash
1+
#!/bin/dash
22
# to be run from $SAGE_ROOT, with arguments sage-local-${{ env.PREVIOUS_STAGES }}.tar
33

4+
if [ -z "$SAGE_LOCAL" ]; then
5+
SAGE_LOCAL=$(pwd)/local
6+
fi
7+
48
# Show all tar files
59
ls -l $*
610

711
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
812
for a in $*; do
913
echo Extracting $a
10-
tar xf $a
14+
(cd / && tar xf -) < $a
1115
rm -f $a
1216
done
1317

14-
# Also get rid of the stages that were not extracted
15-
rm -f sage-local-*.tar
16-
1718
# We set the installation records to the same mtime so that no rebuilds due to dependencies
1819
# among these packages are triggered.
19-
(cd local/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *)
20+
(cd "$SAGE_LOCAL"/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *)
2021

2122
# Show what has been built already.
22-
ls -l local local/var/lib/sage/installed/
23+
ls -l "$SAGE_LOCAL" "$SAGE_LOCAL"/var/lib/sage/installed/
2324
df -h
2425

2526
# Rebase!
26-
src/bin/sage-rebase.sh local
27+
exec src/bin/sage-rebase.sh --all "$SAGE_LOCAL"

.github/workflows/lint.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint-pycodestyle:
7+
name: Code style check with pycodestyle
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.8
16+
- name: Install pycodestyle
17+
run: pip install tox pycodestyle
18+
- name: Lint using pycodestyle
19+
run: tox -e pycodestyle-minimal
20+
lint-relint:
21+
name: Code style check with relint
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
- name: Set up Python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: 3.8
30+
- name: Install relint
31+
run: pip install tox relint
32+
- name: Lint using relint
33+
run: tox -e relint src/sage/
34+
lint-pyright:
35+
name: Static type check with pyright
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v2
40+
- name: Set up node to install pyright
41+
uses: actions/setup-node@v1
42+
with:
43+
node-version: '12'
44+
- name: Install pyright
45+
run: npm install -g pyright
46+
- name: Lint using pyright
47+
run: pyright

.github/workflows/tox-experimental.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ on:
2323
push:
2424
tags:
2525
- '*'
26+
workflow_dispatch:
27+
# Allow to run manually
2628

2729
env:
2830
TARGETS_PRE: build/make/Makefile
@@ -36,7 +38,9 @@ jobs:
3638
fail-fast: false
3739
max-parallel: 6
3840
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]
41+
# This list is different from the one in tox.yml:
42+
# Trac #31526 switches gcc 4.x-based distributions to using the gcc_spkg configuration factor
43+
tox_system_factor: [ubuntu-trusty-gcc_spkg, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-groovy, ubuntu-hirsute, debian-jessie-gcc_spkg, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17-gcc_spkg, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, centos-7-gcc_spkg, centos-8, gentoo, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, conda-forge, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-gcc_spkg]
4044
tox_packages_factor: [maximal]
4145
targets_pattern: [0-g, h-o, p, q-z]
4246
env:
@@ -52,15 +56,21 @@ jobs:
5256
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
5357
- name: free disk space
5458
run: |
59+
df -h
5560
sudo swapoff -a
5661
sudo rm -f /swapfile
57-
sudo apt clean
62+
sudo apt-get clean
5863
docker rmi $(docker image ls -aq)
64+
echo "Largest packages:"
65+
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 50
66+
sudo apt-get --fix-broken --yes remove $(dpkg-query -f '${Package}\n' -W | grep -E '^(ghc-|google-cloud-sdk|google-chrome|firefox|mysql-server|dotnet-sdk|hhvm|mono)') || echo "(error ignored)"
5967
df -h
6068
- name: Install test prerequisites
6169
run: |
6270
sudo DEBIAN_FRONTEND=noninteractive apt-get update
63-
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
71+
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
72+
sudo apt-get clean
73+
df -h
6474
- name: Try to login to docker.pkg.github.com
6575
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
6676
run: |
@@ -69,7 +79,7 @@ jobs:
6979
TOKEN="${{ secrets.GITHUB_TOKEN }}"
7080
fi
7181
if echo "$TOKEN" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin; then
72-
echo "::set-env name=DOCKER_PUSH_REPOSITORY::docker.pkg.github.com/${{ github.repository }}/"
82+
echo "DOCKER_PUSH_REPOSITORY=docker.pkg.github.com/${{ github.repository }}/" >> $GITHUB_ENV
7383
fi
7484
- run: |
7585
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::|;"
@@ -99,20 +109,49 @@ jobs:
99109

100110
local-macos:
101111

102-
runs-on: macos-latest
112+
runs-on: ${{ matrix.os }}
103113
strategy:
104114
fail-fast: false
105115
max-parallel: 3
106116
matrix:
107-
tox_system_factor: [homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
117+
tox_system_factor: [homebrew-macos, conda-forge-macos, homebrew-macos-python3_xcode]
108118
tox_packages_factor: [maximal]
119+
# As of 2021-03, default xcode is 12.4
120+
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#xcode
121+
xcode_version_factor: [default]
109122
targets_pattern: [0-g, h-o, p, q-z]
123+
os: [ macos-10.15, macos-11.0 ]
124+
include:
125+
# Test xcode 11.7 only on macos-10.15
126+
- tox_system_factor: homebrew-macos
127+
tox_packages_factor: maximal
128+
xcode_version_factor: 11.7
129+
targets_pattern: 0-g
130+
os: macos-10.15
131+
- tox_system_factor: homebrew-macos
132+
tox_packages_factor: maximal
133+
xcode_version_factor: 11.7
134+
targets_pattern: h-o
135+
os: macos-10.15
136+
- tox_system_factor: homebrew-macos
137+
tox_packages_factor: maximal
138+
xcode_version_factor: 11.7
139+
targets_pattern: p
140+
os: macos-10.15
141+
- tox_system_factor: homebrew-macos
142+
tox_packages_factor: maximal
143+
xcode_version_factor: 11.7
144+
targets_pattern: q-z
145+
os: macos-10.15
110146
env:
111147
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 }}
148+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}-${{ matrix.os }}-xcode_${{ matrix.xcode_version_factor }}
113149
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 }}]' ) )"
114150
steps:
115151
- uses: actions/checkout@v2
152+
- name: Select Xcode version
153+
run: |
154+
if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi
116155
- name: Install test prerequisites
117156
run: |
118157
brew install tox

.github/workflows/tox-gcc_spkg.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ on:
2323
push:
2424
tags:
2525
- '*'
26+
workflow_dispatch:
27+
# Allow to run manually
2628

2729
env:
2830
TARGETS_PRE: sagelib-build-deps
@@ -50,15 +52,21 @@ jobs:
5052
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
5153
- name: free disk space
5254
run: |
55+
df -h
5356
sudo swapoff -a
5457
sudo rm -f /swapfile
55-
sudo apt clean
58+
sudo apt-get clean
5659
docker rmi $(docker image ls -aq)
60+
echo "Largest packages:"
61+
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 50
62+
sudo apt-get --fix-broken --yes remove $(dpkg-query -f '${Package}\n' -W | grep -E '^(ghc-|google-cloud-sdk|google-chrome|firefox|mysql-server|dotnet-sdk|hhvm|mono)') || echo "(error ignored)"
5763
df -h
5864
- name: Install test prerequisites
5965
run: |
6066
sudo DEBIAN_FRONTEND=noninteractive apt-get update
61-
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
67+
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
68+
sudo apt-get clean
69+
df -h
6270
- name: Try to login to docker.pkg.github.com
6371
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
6472
run: |
@@ -67,7 +75,7 @@ jobs:
6775
TOKEN="${{ secrets.GITHUB_TOKEN }}"
6876
fi
6977
if echo "$TOKEN" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin; then
70-
echo "::set-env name=DOCKER_PUSH_REPOSITORY::docker.pkg.github.com/${{ github.repository }}/"
78+
echo "DOCKER_PUSH_REPOSITORY=docker.pkg.github.com/${{ github.repository }}/" >> $GITHUB_ENV
7179
fi
7280
- run: |
7381
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::|;"
@@ -112,7 +120,7 @@ jobs:
112120
- name: Install test prerequisites
113121
run: |
114122
sudo DEBIAN_FRONTEND=noninteractive apt-get update
115-
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
123+
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
116124
- name: Build and test with tox
117125
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
118126
# For doctesting, we use a lower parallelization to avoid timeouts.

0 commit comments

Comments
 (0)