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

Commit

Permalink
13447: Merge tag '9.2.beta0' into #13447
Browse files Browse the repository at this point in the history
  • Loading branch information
mwageringel committed Jun 6, 2020
2 parents c2b0bf6 + 860e4dc commit b4df239
Show file tree
Hide file tree
Showing 4,314 changed files with 246,397 additions and 110,652 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 7 additions & 1 deletion .ci/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ docker_build() {
# Docker's --cache-from does not really work with multi-stage builds: https://github.com/moby/moby/issues/34715
# So we just have to rely on the local cache.
time docker build -f docker/Dockerfile \
--build-arg "MAKEOPTS=${MAKEOPTS}" --build-arg "SAGE_NUM_THREADS=${SAGE_NUM_THREADS}" --build-arg "MAKEOPTS_DOCBUILD=${MAKEOPTS}" --build-arg "SAGE_NUM_THREADS_DOCBUILD=${SAGE_NUM_THREADS_DOCBUILD}" --build-arg ARTIFACT_BASE=$ARTIFACT_BASE $@
--build-arg "WITH_PYTHON=${WITH_PYTHON}" --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 $@
}

# We use a multi-stage build /docker/Dockerfile. For the caching to be
Expand All @@ -39,6 +39,12 @@ docker_build --target run-time-dependencies --tag run-time-dependencies:$DOCKER_
docker_build --target build-time-dependencies --tag build-time-dependencies:$DOCKER_TAG .
docker_build --target make-all --tag make-all:$DOCKER_TAG .

# Copy docs out of the docker image to save them into browseable GitLab artifacts
container=$(docker create make-all:$DOCKER_TAG)
docker cp $container:/home/sage/sage/local/share/doc/sage/html html_
# GitLab's browser does not like symlinks, so we flatten them
rsync html_/ html/ -a --copy-links

# Build the release image without build artifacts.
docker_build --target sagemath --tag "$DOCKER_IMAGE_CLI" .
# Display the layers of this image
Expand Down
3 changes: 3 additions & 0 deletions .ci/head-tail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ stdbuf -i0 -o0 -e0 awk -v limit=$1 -v firstMissingNR=-1 -v offset=$OFFSET -v byt
a[NR] = $0;
delete a[NR-offset];
printf "." > "/dev/stderr"
if (/^sage-logger/){
print > "/dev/stderr"
}
}
}
END {
Expand Down
8 changes: 4 additions & 4 deletions .ci/setup-make-parallelity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Source this to set CPUTHREADS (the number of apparent cores) and RAMTHREADS
# (free RAM divided by the maximum amount needed per thread typically)
# From this this script infers reasonable defaults for SAGE_NUM_THREADS and
# MAKEOPTS.
# MAKEFLAGS.

# We do exactly the same for CPUTHREADS_DOCBUILD, RAMTHREADS_DOCBUILD,
# SAGE_NUM_THREADS_DOCBUILD, MAKEOPTS_DOCBUILD. As the docbuild needs
# SAGE_NUM_THREADS_DOCBUILD, MAKEFLAGS_DOCBUILD. As the docbuild needs
# substantially more RAM as of May 2018.

# ****************************************************************************
Expand Down Expand Up @@ -61,5 +61,5 @@ else
export SAGE_NUM_THREADS_DOCBUILD=$RAMTHREADS_DOCBUILD
fi
# Set -j and -l for make (though -l is probably ignored by Sage)
export MAKEOPTS="-j $SAGE_NUM_THREADS -l $((CPUTHREADS - 1)).8"
export MAKEOPTS_DOCBUILD="-j $SAGE_NUM_THREADS_DOCBUILD -l $((CPUTHREADS_DOCBUILD - 1)).8"
export MAKEFLAGS="-j $SAGE_NUM_THREADS -l $((CPUTHREADS - 1)).8"
export MAKEFLAGS_DOCBUILD="-j $SAGE_NUM_THREADS_DOCBUILD -l $((CPUTHREADS_DOCBUILD - 1)).8"
5 changes: 3 additions & 2 deletions .ci/test-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IMAGE="$1"
# Runs $IMAGE with args and check that it terminates with a zero exit code in at most limit seconds.
timed_run() {
START=`date +%s`
docker run -e MAKEOPTS="$MAKEOPTS_DOCBUILD" -e SAGE_NUM_THREADS="$SAGE_NUM_THREADS_DOCBUILD" "$IMAGE" "$2"
docker run -e MAKEFLAGS="$MAKEFLAGS_DOCBUILD" -e SAGE_NUM_THREADS="$SAGE_NUM_THREADS_DOCBUILD" "$IMAGE" "$2"
END=`date +%s`
TOTAL=$((END-START))
echo "Checking whether running \"$2\" was fast…"
Expand All @@ -42,4 +42,5 @@ timed_run 120 true # runs make build
# The parser in Sphinx fails to parse some .py files and adds the (more
# recently modified) .pyc files as dependencies instead. (Have a look the
# changeset that introduced this comment for more details.)
timed_run $(( 1200/$SAGE_NUM_THREADS_DOCBUILD )) make # runs make build and then make
# Parts of the docbuild do not seem to be run in parallel at the moment.
timed_run $(( 180 + 1200/$SAGE_NUM_THREADS_DOCBUILD )) make # runs make build and then make
6 changes: 6 additions & 0 deletions .ci/update-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ if [ -n "$CI_MONKEY_PATCH" ]; then
$SCRIPT
fi

WITH_PYTHON=${WITH_PYTHON:-2}

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

if [ $WITH_PYTHON = 3 ]; then
export DOCKER_TAG=${DOCKER_TAG}-py3
fi

export DOCKER_IMAGE_CLI=${DOCKER_NAMESPACE:-sagemath}/sagemath:$DOCKER_TAG
export DOCKER_IMAGE_DEV=${DOCKER_NAMESPACE:-sagemath}/sagemath-dev:$DOCKER_TAG

Expand Down
2 changes: 1 addition & 1 deletion .circleci/before-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
. .ci/protect-secrets.sh
# Collect debug infos about the system we are running on
.ci/describe-system.sh
# Set MAKEOPTS and SAGE_NUM_THREADS
# Set MAKEFLAGS and SAGE_NUM_THREADS
. .ci/setup-make-parallelity.sh

# Set DOCKER_TAG according to the current branch/tag
Expand Down
Loading

0 comments on commit b4df239

Please sign in to comment.