Skip to content

Commit

Permalink
Re-enables and fixes buildozer build
Browse files Browse the repository at this point in the history
Disabled earlier in 223c67b and fixed in `buildozer` master branch.
Also simplifies and fixes `xvfb` service.
  • Loading branch information
AndreMiras committed Oct 14, 2019
1 parent 508ea0e commit 59d0bdd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
18 changes: 4 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,15 @@ language: generic

services:
- docker
- xvfb

env:
global:
- DISPLAY=:99.0
matrix:
- TAG=zbarcam-linux DOCKERFILE=dockerfiles/Dockerfile-linux COMMAND='make test'
# broken in:
# https://github.com/kivy/python-for-android/pull/1986
# - TAG=zbarcam-android DOCKERFILE=dockerfiles/Dockerfile-android COMMAND='buildozer android debug'

before_install:
- sudo apt update -qq > /dev/null
- sudo apt install --yes --no-install-recommends xvfb

install:
- docker build --tag=$TAG --file=$DOCKERFILE --build-arg CI .
- TAG=zbarcam-android DOCKERFILE=dockerfiles/Dockerfile-android COMMAND='buildozer android debug'

before_script:
- sh -e /etc/init.d/xvfb start
- docker build --tag=$TAG --file=$DOCKERFILE --build-arg CI .

script:
- travis_wait docker run --env-file dockerfiles/env.list -v /tmp/.X11-unix:/tmp/.X11-unix $TAG $COMMAND
- travis_wait 30 docker run --env-file dockerfiles/env.list -v /tmp/.X11-unix:/tmp/.X11-unix $TAG $COMMAND
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ make system_dependencies

Install zbarcam:
```sh
pip install --upgrade zbarcam
pip install zbarcam
```
Then import it in your Python code via:
```python
Expand Down
22 changes: 10 additions & 12 deletions dockerfiles/Dockerfile-android
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV WORK_DIR="${HOME_DIR}" \
ENV DOCKERFILES_VERSION="v20190902" \
DOCKERFILES_URL="https://raw.githubusercontent.com/AndreMiras/dockerfiles"
ENV MAKEFILES_URL="${DOCKERFILES_URL}/${DOCKERFILES_VERSION}/buildozer_android"
ENV BUILDOZER_VERSION="182d13f"
ENV BUILDOZER_VERSION="81c31c4"


# configure locale
Expand All @@ -29,7 +29,7 @@ ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"

# install system dependencies
RUN apt install -qq --yes --no-install-recommends \
RUN apt update -qq > /dev/null && apt install -qq --yes --no-install-recommends \
autoconf \
automake \
ca-certificates \
Expand All @@ -54,20 +54,18 @@ RUN apt install -qq --yes --no-install-recommends \
xz-utils \
zip

# prepare non root env
RUN useradd --create-home --shell /bin/bash ${USER}
# with sudo access and no password
RUN usermod -append --groups sudo ${USER}
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# prepare non root env, with sudo access and no password
RUN useradd --create-home --shell /bin/bash ${USER} && \
usermod -append --groups sudo ${USER} && \
echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

USER ${USER}
WORKDIR ${WORK_DIR}

# install buildozer and dependencies
RUN curl --location --progress-bar ${MAKEFILES_URL}/buildozer.mk --output buildozer.mk
RUN make -f buildozer.mk
# enforces buildozer master until next release
RUN pip3 install --upgrade https://github.com/kivy/buildozer/archive/${BUILDOZER_VERSION}.zip
# install buildozer & dependencies and enforces buildozer master until next release
RUN curl --location --progress-bar ${MAKEFILES_URL}/buildozer.mk --output buildozer.mk && \
make -f buildozer.mk && \
pip3 install --upgrade https://github.com/kivy/buildozer/archive/${BUILDOZER_VERSION}.zip

COPY . ${WORK_DIR}
# limits the amount of logs for Travis
Expand Down

0 comments on commit 59d0bdd

Please sign in to comment.