Add 32-bit test container to test fixes for #411

This commit is contained in:
Brandon Rhodes 2020-07-22 13:21:50 -04:00
parent 952884657e
commit 84951b3057
3 changed files with 34 additions and 0 deletions

6
bin/test-32-bit Executable file
View File

@ -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'

View File

@ -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

19
containers/32-bit/run Executable file
View File

@ -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 "$@"