Skip to content

Commit

Permalink
Merge #532: ci: Run tests on all supported python versions
Browse files Browse the repository at this point in the history
0674de7 tests: Use depends to build bitcoind (Andrew Chow)
76abfd8 ci: Run tests on different versions of python (Andrew Chow)

Pull request description:

  Run CI on all supported python versions.

Top commit has no ACKs.

Tree-SHA512: d52570e6575d93972cfac40dce69c30a10aa86da8cad0a198be8d45189e2b2a4ab6bc89839b82abb67df60c6875c1e687dd193543cb583f4ca70b101a22b774b
  • Loading branch information
achow101 committed Oct 22, 2021
2 parents 68b39d2 + 0674de7 commit 4d13ef4
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 2 deletions.
23 changes: 22 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,27 @@ task:
failed_script: tail -v -n +1 test/*.std*

task:
matrix:
- container:
dockerfile: ci/cirrus.Dockerfile
env:
PYTHON: 3.6
- container:
dockerfile: ci/py37.Dockerfile
env:
PYTHON: 3.7
- container:
dockerfile: ci/py38.Dockerfile
env:
PYTHON: 3.8
- container:
dockerfile: ci/py39.Dockerfile
env:
PYTHON: 3.9
- container:
dockerfile: ci/py310.Dockerfile
env:
PYTHON: 3.10
matrix:
<< : *DEVICE_MATRIX_TEMPLATE
matrix:
Expand All @@ -250,7 +271,7 @@ task:
INTERFACE: cli
- env:
INTERFACE: stdin
name: $DEVICE $INTERFACE
name: Python $PYTHON $DEVICE $INTERFACE
install_script: poetry install
test_script: cd test; poetry run ./run_tests.py $DEVICE --interface=$INTERFACE --device-only; cd ..
on_failure:
Expand Down
18 changes: 18 additions & 0 deletions ci/py310.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.10

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y \
cython3 \
git \
libsdl2-dev \
libsdl2-image-dev \
libudev-dev \
libusb-1.0-0-dev \
qemu-user-static

RUN pip install poetry flake8

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV LANGUAGE=C.UTF-8
18 changes: 18 additions & 0 deletions ci/py37.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.7

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y \
cython3 \
git \
libsdl2-dev \
libsdl2-image-dev \
libudev-dev \
libusb-1.0-0-dev \
qemu-user-static

RUN pip install poetry flake8

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV LANGUAGE=C.UTF-8
18 changes: 18 additions & 0 deletions ci/py38.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.8

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y \
cython3 \
git \
libsdl2-dev \
libsdl2-image-dev \
libudev-dev \
libusb-1.0-0-dev \
qemu-user-static

RUN pip install poetry flake8

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV LANGUAGE=C.UTF-8
18 changes: 18 additions & 0 deletions ci/py39.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.9

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y \
cython3 \
git \
libsdl2-dev \
libsdl2-image-dev \
libudev-dev \
libusb-1.0-0-dev \
qemu-user-static

RUN pip install poetry flake8

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV LANGUAGE=C.UTF-8
5 changes: 4 additions & 1 deletion test/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,11 @@ if [[ -n ${build_bitcoind} ]]; then

# Build bitcoind. This is super slow, but it is cached so it runs fairly quickly.
if [ "$bitcoind_setup_needed" == true ] ; then
pushd depends
make NO_QT=1 NO_QR=1 NO_ZMQ=1 NO_UPNP=1 NO_NATPMP=1
popd
./autogen.sh
./configure --with-incompatible-bdb --with-miniupnpc=no --without-gui --disable-zmq --disable-tests --disable-bench --with-libs=no --with-utils=no
CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure --with-incompatible-bdb --with-miniupnpc=no --without-gui --disable-zmq --disable-tests --disable-bench --with-libs=no --with-utils=no
fi
make src/bitcoind
fi

0 comments on commit 4d13ef4

Please sign in to comment.