Add Docker files

- untested
- create bionic build environment, run travis on bionic, build on wine +
  run travis under wine
This commit is contained in:
Peter Šurda 2021-01-05 08:55:53 +01:00
parent 5d86963d25
commit d05ae4c2b5
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
3 changed files with 97 additions and 0 deletions

View File

@ -0,0 +1,48 @@
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg --add-architecture i386
RUN apt-get update
# travis xenial bionic
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
python-setuptools libssl-dev python-dev python-virtualenv python-pip
# travis focal
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
python-setuptools libssl-dev python-dev python3-virtualenv python3-pip
# dpkg
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
python-minimal python-setuptools python-all python openssl libssl-dev \
dh-apparmor debhelper dh-python python-msgpack python-qt4 git python-stdeb \
python-all-dev
# Code quality
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
pylint python-pycodestyle python3-pycodestyle pycodestyle python-flake8 \
python3-flake8 flake8 python-pyflakes python3-pyflakes pyflakes pyflakes3 \
curl
# Wine32
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
python python-pip wget wine-stable winetricks mingw-w64 wine32 wine64 xvfb
# Wine64
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
python python-pip wget wine-stable winetricks mingw-w64 wine32 wine64 xvfb
# Buildbot
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
buildbot-slave
# travis2bash
RUN wget -O /usr/local/bin/travis2bash.sh https://storage.bitmessage.org/travis2bash.sh
RUN chmod a+x /usr/local/bin/travis2bash.sh
RUN useradd -ms /bin/bash pool
RUN echo 'pool ALL=ALL NOPASSWD:ALL' >> /etc/sudoers

View File

@ -0,0 +1,16 @@
FROM pybm-build
USER pool
WORKDIR $HOME
RUN git clone https://github.com/Bitmessage/PyBitmessage
WORKDIR $HOME/PyBitmessage
ENV PATH $HOME/.local/bin:$PATH
RUN pip install -r requirements.txt
RUN ln -s src pybitmessage
RUN python setup.py install --user
RUN python checkdeps.py
RUN xvfb-run src/bitmessagemain.py -t
RUN python setup.py test

33
docker/bionic-wine.docker Normal file
View File

@ -0,0 +1,33 @@
FROM pybm-build
USER pool
RUN mkdir $HOME/Downloads
WORKDIR $HOME/Downloads
RUN wget https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
WORKDIR $HOME
RUN git clone https://github.com/Bitmessage/PyBitmessage
WORKDIR $HOME/PyBitmessage
ENV PATH $HOME/.local/bin:$PATH
RUN ln -s src pybitmessage
# 64b
RUN xvfb-run buildscripts/winbuild.sh
ENV WINEPREFIX $HOME/.wine64
ENV WINEARCH=win64
RUN xvfb-run wine msiexec -i $HOME/Downloads/VCForPython27.msi /q /norestart
RUN xvfb-run winetricks -q dotnet40
RUN xvfb-run wine pip install wheel
RUN xvfb-run wine python setup.py test
# 32b
RUN xvfb-run i386 buildscripts/winbuild.sh
ENV WINEPREFIX $HOME/.wine32
ENV WINEARCH=wine32
RUN xvfb-run i386 wine msiexec -i $HOME/Downloads/VCForPython27.msi /q /norestart
RUN xvfb-run i386 winetricks -q dotnet40
RUN xvfb-run i386 wine pip install wheel
RUN xvfb-run i386 wine python setup.py test