This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
186 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
|
||
# This script gets called from CI to pull the Sage docker images that were | ||
# built during the "build" phase to pull to the connected docker daemon | ||
# (likely a docker-in-docker.) | ||
# This script expects a single parameter, the base name of the docker image | ||
# such as sagemath or sagemath-dev. | ||
# The variable $DOCKER_IMAGE is set to the full name of the pulled image; | ||
# source this script to use it. | ||
|
||
# **************************************************************************** | ||
# Copyright (C) 2018 Julian Rüth <julian.rueth@fsfe.org> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# http://www.gnu.org/licenses/ | ||
# **************************************************************************** | ||
|
||
set -ex | ||
|
||
# Pull the built images from the dockerhub registry and give them the original | ||
# names they had after built. | ||
# We require $DOCKER_USER and $SECRET_DOCKER_PASS to be set. Otherwise we would | ||
# be pulling some stale images here. (Sadly, CircleCI does not provide us with | ||
# an integrated container registry like GitLab does.) | ||
if [ -z "$DOCKER_USER" -o -z "$SECRET_DOCKER_PASS" ]; then | ||
echo "DOCKER_USER/SECRET_DOCKER_PASS variables have not been configured in your Continuous Integration setup. Not pulling as the images would not be the one that has just been built." | ||
fi | ||
|
||
export DOCKER_IMAGE="$DOCKER_USER/$1:$DOCKER_TAG" | ||
docker pull $DOCKER_IMAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/sh | ||
|
||
# This script gets called from CI to run doctests in the sagemath build | ||
|
||
# Usage: ./test-doctest.sh IMAGE-NAME --new|--short|--long | ||
|
||
# **************************************************************************** | ||
# Copyright (C) 2018 Julian Rüth <julian.rueth@fsfe.org> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# http://www.gnu.org/licenses/ | ||
# **************************************************************************** | ||
|
||
set -ex | ||
|
||
SETUP=":" | ||
|
||
case "$2" in | ||
--new) | ||
# We need an image that contains a .git directory as this is not | ||
# contained in the sagemath image (and also not in sagemath-dev.) | ||
# Note that we can not mount our own .git as the docker daemon might | ||
# not run on the current host. | ||
docker create --name sagemath-git-build "$1" | ||
docker cp `pwd`/.git sagemath-git-build:/home/sage/sage/.git | ||
docker commit sagemath-git-build sagemath-git | ||
# Replace $1 so that the following code uses that image instead of the | ||
# original "$1" | ||
shift | ||
set -- sagemath-git "$@" | ||
|
||
SETUP='sudo apt-get update && sudo apt-get install -y git && \ | ||
cd /home/sage/sage && \ | ||
sudo chown -R sage:sage .git && \ | ||
git reset --hard && \ | ||
git reset `git describe --abbrev=0 --tags`' | ||
DOCTEST_PARAMETERS="--long --new" | ||
;; | ||
--short) | ||
DOCTEST_PARAMETERS="--short --all" | ||
;; | ||
--long) | ||
DOCTEST_PARAMETERS="--long --all" | ||
;; | ||
*) | ||
exit 1 | ||
;; | ||
esac | ||
|
||
docker run "$1" "$SETUP && \ | ||
(sage -tp $DOCTEST_PARAMETERS || \ | ||
(echo Some tests failed. Retrying only the failed tests. && sage -tp --failed $DOCTEST_PARAMETERS) || \ | ||
(echo Some tests failed. Retrying only the failed tests. && sage -tp --failed $DOCTEST_PARAMETERS))" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
set -e | ||
make build | ||
exec "$@" | ||
exec sh -c "$*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters