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.
tox.ini: New - test spkg-configure on ubuntu docker images
- Loading branch information
Matthias Koeppe
committed
Jan 25, 2020
1 parent
221c344
commit 46957b4
Showing
5 changed files
with
82 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#! /usr/bin/env bash | ||
## Write a Dockerfile to stdout that tests that the packages listed in the debian.txt files of standard spkg exist | ||
## and satisfy the requirements tested by spkg-configure.m4 | ||
set -e | ||
STRIP_COMMENTS="sed s/#.*//;" | ||
SAGE_ROOT=. | ||
SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SAGE_ROOT/build/pkgs/debian.txt)) | ||
# needed for bootstrap: | ||
SYSTEM_PACKAGES+=" gettext autoconf automake libtool" | ||
CONFIGURE_ARGS="--enable-option-checking " | ||
for PKG_SCRIPTS in build/pkgs/*; do | ||
if [ -d $PKG_SCRIPTS ]; then | ||
PKG_BASE=$(basename $PKG_SCRIPTS) | ||
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/debian.txt | ||
PKG_TYPE=$(cat $PKG_SCRIPTS/type) | ||
if [ -f $SYSTEM_PACKAGES_FILE -a "$PKG_TYPE" = "standard" ]; then | ||
SYSTEM_PACKAGES+=" "$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE)) | ||
if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then | ||
CONFIGURE_ARGS+="--with-system-$PKG_BASE=force " | ||
fi | ||
fi | ||
fi | ||
done | ||
cat <<EOF | ||
ARG BASE_IMAGE=ubuntu:latest | ||
FROM \${BASE_IMAGE} | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes $SYSTEM_PACKAGES | ||
# Bootstrapping | ||
RUN mkdir -p /sage | ||
WORKDIR /sage | ||
ADD Makefile VERSION.txt README.md bootstrap configure.ac sage ./ | ||
ADD m4 ./m4 | ||
ADD build ./build | ||
ADD src/bin/sage-version.sh src/bin/sage-version.sh | ||
RUN ./bootstrap | ||
# Configuring | ||
ADD src/ext src/ext | ||
ADD src/bin src/bin | ||
ADD src/Makefile.in src/Makefile.in | ||
ARG EXTRA_CONFIGURE_ARGS | ||
RUN ./configure --enable-build-as-root $CONFIGURE_ARGS \${EXTRA_CONFIGURE_ARGS} || (echo "********** configuring without forcing ***********"; cat config.log; ./configure --enable-build-as-root; cat config.log; exit 1) | ||
RUN make toolchain V=0 | ||
RUN make -j4 scipy | ||
EOF |
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 |
---|---|---|
|
@@ -15,5 +15,6 @@ binutils | |
make | ||
m4 | ||
perl | ||
python3-minimal # system python for bootstrapping the build | ||
tar | ||
bc |
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 +1,3 @@ | ||
pari-gp2c libpari-dev | ||
# We add these data packages because they are checked by spkg-configure.m4 | ||
pari-elldata pari-galdata pari-galpol pari-seadata |
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,34 @@ | ||
# Run all in parallel: | ||
# tox -p auto | ||
# with local squid: | ||
# EXTRA_DOCKER_BUILD_ARGS="--build-arg http_proxy=http://host.docker.internal:3128" tox -p auto | ||
[tox] | ||
# | ||
# https://hub.docker.com/_/ubuntu?tab=description | ||
# as of 2020-01, latest=bionic=18.04, eoan=rolling=19.10, focal=devel=20.04 | ||
envlist = docker-ubuntu_{trusty,xenial,bionic,latest,eoan,rolling,focal,devel} | ||
skipsdist = true | ||
|
||
[testenv] | ||
envdir = | ||
{toxworkdir}/docker | ||
# Can't use any system m4ri/m4rie apparently | ||
passenv = | ||
EXTRA_DOCKER_BUILD_ARGS | ||
setenv = | ||
EXTRA_CONFIGURE_ARGS=--with-system-m4ri=no --with-system-m4rie=no --with-system-givaro=no | ||
ubuntu_trusty: BASE_IMAGE=ubuntu:trusty | ||
ubuntu_xenial: BASE_IMAGE=ubuntu:xenial | ||
ubuntu_bionic: BASE_IMAGE=ubuntu:bionic | ||
ubuntu_latest: BASE_IMAGE=ubuntu:latest | ||
ubuntu_eoan: BASE_IMAGE=ubuntu:eoan | ||
ubuntu_rolling: BASE_IMAGE=ubuntu:rolling | ||
ubuntu_focal: BASE_IMAGE=ubuntu:focal | ||
ubuntu_devel: BASE_IMAGE=ubuntu:devel | ||
|
||
whitelist_externals = | ||
bash | ||
docker | ||
commands = | ||
bash -c 'build/bin/write-dockerfile-debian.sh > Dockerfile-debian' | ||
docker build . -f Dockerfile-debian --build-arg BASE_IMAGE={env:BASE_IMAGE} --build-arg EXTRA_CONFIGURE_ARGS="{env:EXTRA_CONFIGURE_ARGS}" {env:EXTRA_DOCKER_BUILD_ARGS:} |