Skip to content

Commit

Permalink
Merge pull request kivy#2142 from AndreMiras/feature/python2_drop_fol…
Browse files Browse the repository at this point in the history
…low_up

Simplifies Dockerfile and fix GitHub runner space
  • Loading branch information
AndreMiras authored Apr 18, 2020
2 parents 265fe7f + b5dfdaf commit 71f8fb5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ jobs:
steps:
- name: Checkout python-for-android
uses: actions/checkout@v2
# helps with GitHub runner getting out of space
- name: Free disk space
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt -y clean
docker rmi $(docker image ls -aq)
df -h
- name: Pull docker image
run: |
make docker/pull
Expand All @@ -75,6 +84,15 @@ jobs:
uses: actions/checkout@v2
with:
ref: 'develop'
# helps with GitHub runner getting out of space
- name: Free disk space
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt -y clean
docker rmi $(docker image ls -aq)
df -h
- name: Pull docker image
run: |
make docker/pull
Expand Down
8 changes: 1 addition & 7 deletions Dockerfile.py3 → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# - python-for-android dependencies
#
# Build with:
# docker build --tag=p4a --file Dockerfile.py3 .
# docker build --tag=p4a --file Dockerfile .
#
# Run with:
# docker run -it --rm p4a /bin/sh -c '. venv/bin/activate && p4a apk --help'
Expand Down Expand Up @@ -71,8 +71,6 @@ RUN dpkg --add-architecture i386 \
openjdk-8-jdk \
patch \
pkg-config \
python \
python-pip \
python3 \
python3-dev \
python3-pip \
Expand All @@ -95,10 +93,6 @@ RUN useradd --create-home --shell /bin/bash ${USER}
RUN usermod -append --groups sudo ${USER}
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# install cython for python 2 (for python 3 it's inside the venv)
RUN pip2 install --upgrade Cython==0.28.6 \
&& rm -rf ~/.cache/

WORKDIR ${WORK_DIR}
RUN mkdir ${ANDROID_HOME} && chown --recursive ${USER} ${HOME_DIR} ${ANDROID_HOME}
USER ${USER}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ docker/pull:
docker pull $(DOCKER_IMAGE):latest || true

docker/build:
docker build --cache-from=$(DOCKER_IMAGE) --tag=$(DOCKER_IMAGE) --file=Dockerfile.py3 .
docker build --cache-from=$(DOCKER_IMAGE) --tag=$(DOCKER_IMAGE) .

docker/push:
docker push $(DOCKER_IMAGE)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ python-for-android
==================

[![Build Status](https://travis-ci.org/kivy/python-for-android.svg?branch=develop)](https://travis-ci.org/kivy/python-for-android)
[![Unit tests & build apps](https://github.com/kivy/python-for-android/workflows/Unit%20tests%20&%20build%20apps/badge.svg?branch=develop)](https://github.com/kivy/python-for-android/actions?query=workflow%3A%22Unit+tests+%26+build+apps%22)
[![Coverage Status](https://coveralls.io/repos/github/kivy/python-for-android/badge.svg?branch=develop&kill_cache=1)](https://coveralls.io/github/kivy/python-for-android?branch=develop)
[![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/kivy/sponsors/badge.svg)](#sponsors)
Expand Down

0 comments on commit 71f8fb5

Please sign in to comment.