From 84951b30579dd3c8371e5bb73d31ce9f06ebddac Mon Sep 17 00:00:00 2001 From: Brandon Rhodes Date: Wed, 22 Jul 2020 13:21:50 -0400 Subject: [PATCH] Add 32-bit test container to test fixes for #411 --- bin/test-32-bit | 6 ++++++ containers/32-bit/Dockerfile | 9 +++++++++ containers/32-bit/run | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100755 bin/test-32-bit create mode 100644 containers/32-bit/Dockerfile create mode 100755 containers/32-bit/run diff --git a/bin/test-32-bit b/bin/test-32-bit new file mode 100755 index 0000000..ba91ce5 --- /dev/null +++ b/bin/test-32-bit @@ -0,0 +1,6 @@ +#!/bin/bash + +cd "$(dirname "${BASH_SOURCE[0]}")" +cd .. +exec ./containers/32-bit/run bash -c \ + 'cd skyfield && ls && assay --batch skyfield/tests' diff --git a/containers/32-bit/Dockerfile b/containers/32-bit/Dockerfile new file mode 100644 index 0000000..ad1b366 --- /dev/null +++ b/containers/32-bit/Dockerfile @@ -0,0 +1,9 @@ +FROM 32bit/ubuntu:16.04 +RUN apt update +RUN apt install -y -y build-essential python3-dev +RUN apt install -y -y python3-pip +RUN pip3 install numpy==1.11.3 +RUN pip3 install argparse certifi jplephem mock pytz sgp4 unittest2 +RUN pip3 install https://github.com/brandon-rhodes/assay/archive/master.zip +RUN echo 'PYTHONPATH=.. assay --batch skyfield.tests' > /root/.bash_history +CMD cd skyfield/ci && /bin/bash diff --git a/containers/32-bit/run b/containers/32-bit/run new file mode 100755 index 0000000..7e7b02c --- /dev/null +++ b/containers/32-bit/run @@ -0,0 +1,19 @@ +#!/bin/bash + +set -ex +CONTAINER_NAME=skyfield-python-2.6 + +if [ ! -f /usr/bin/docker ] +then + echo Error: please apt install docker.io >&2 + exit 2 +fi + +cd "$(dirname $0)" + +docker build -t $CONTAINER_NAME . 1>&2 + +# -v $PWD/../../../assay:/assay \ +exec docker run -ti \ + -v $PWD/../..:/skyfield \ + $CONTAINER_NAME "$@"