Skip to content

Commit 8935234

Browse files
authored
Merge branch 'kivy:develop' into develop
2 parents b1bf5c0 + be3de2e commit 8935234

578 files changed

Lines changed: 17944 additions & 20812 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[run]
2+
relative_files = True
23
omit =
34
*test*
45

.deepsource.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version = 1
2+
3+
test_patterns = ["tests/**"]
4+
5+
exclude_patterns = ["testapps/**"]
6+
7+
[[analyzers]]
8+
name = "python"
9+
enabled = true
10+
11+
[analyzers.meta]
12+
runtime_version = "3.x.x"

.env

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# used by coveralls.io, refs:
2-
# https://coveralls-python.readthedocs.io/en/latest/usage/tox.html#travisci
2+
# https://coveralls-python.readthedocs.io/en/latest/usage/tox.html#github-actions
33
CI
4-
TRAVIS
5-
TRAVIS_BRANCH
6-
TRAVIS_JOB_ID
7-
TRAVIS_PULL_REQUEST
4+
GITHUB_ACTIONS
5+
GITHUB_REF
6+
GITHUB_SHA
7+
GITHUB_HEAD_REF
8+
GITHUB_REPOSITORY
9+
GITHUB_RUN_ID
10+
GITHUB_TOKEN

.github/ISSUE_TEMPLATE.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<!--
2-
The issue tracker is a tool to address bugs.
3-
Please use the Disord community or Stack Overflow for support questions,
2+
The issue tracker is a tool to address bugs NOT a support platform.
3+
Please use the Discord community or Stack Overflow for support questions,
44
more information at https://github.com/kivy/python-for-android#support
5-
6-
Before opening a new issue, make sure you do the following:
7-
* check that your issue isn't already filed: https://github.com/kivy/python-for-android/issues
8-
* prepare a short, runnable example that reproduces the issue
9-
* make sure to have `log_level = 2` in your `buildozer.spec`
10-
* reproduce the problem with the latest development version (`p4a.branch = master`)
11-
* double-check that the issue is indeed a bug and not a support request
12-
* please use backticks to format code or logs
135
-->
146

7+
### Checklist
8+
9+
- [ ] the issue is indeed a bug and not a support request
10+
- [ ] issue doesn't already exist: https://github.com/kivy/python-for-android/issues
11+
- [ ] I have a short, runnable example that reproduces the issue
12+
- [ ] I reproduced the problem with the latest development version (`p4a.branch = develop`)
13+
- [ ] I used the grave accent (aka backticks) to format code or logs when appropriated
14+
1515
### Versions
1616

17-
* Python:
18-
* OS:
19-
* Kivy:
20-
* Cython:
17+
- Python:
18+
- OS:
19+
- Kivy:
20+
- Cython:
21+
- OpenJDK:
2122

2223
### Description
2324

@@ -28,6 +29,7 @@ Before opening a new issue, make sure you do the following:
2829
Command:
2930
```sh
3031
// REPLACE ME: buildozer command ran? e.g. buildozer android debug
32+
// Keep the triple grave accent (aka backquote/backtick) to have the code formatted
3133
```
3234

3335
Spec file:
@@ -38,5 +40,6 @@ Spec file:
3840
### Logs
3941

4042
```
41-
// REPLACE ME: Paste the build ouput containing the error
43+
// REPLACE ME: Paste the build output containing the error
44+
// Keep the triple grave accent (a.k.a. backquote/backtick) to have the code formatted
4245
```

.github/workflows/custom-build.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Custom build
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
arch:
7+
description: "Comma separated architectures (e.g., armeabi-v7a, arm64-v8a, x86_64, x86)"
8+
required: true
9+
default: "armeabi-v7a,arm64-v8a,x86_64,x86"
10+
artifact:
11+
description: "Artifact type"
12+
required: true
13+
default: "apk"
14+
type: choice
15+
options:
16+
- "aab"
17+
- "aar"
18+
- "apk"
19+
bootstrap:
20+
description: "Bootstrap to use"
21+
required: true
22+
default: "sdl2"
23+
type: choice
24+
options:
25+
- "qt"
26+
- "sdl2"
27+
- "service_library"
28+
- "service_only"
29+
- "webview"
30+
mode:
31+
description: "Build mode"
32+
required: true
33+
default: "debug"
34+
type: choice
35+
options:
36+
- "debug"
37+
- "release"
38+
os:
39+
description: "Operating system to run on"
40+
required: true
41+
default: "ubuntu-latest"
42+
type: choice
43+
options:
44+
- "ubuntu-latest"
45+
- "macos-latest"
46+
requirements:
47+
description: "Comma separated requirements"
48+
required: true
49+
default: "python3,kivy"
50+
51+
env:
52+
APK_ARTIFACT_FILENAME: bdist_unit_tests_app-debug-1.1.apk
53+
AAB_ARTIFACT_FILENAME: bdist_unit_tests_app-release-1.1.aab
54+
AAR_ARTIFACT_FILENAME: bdist_unit_tests_app-release-1.1.aar
55+
PYTHONFORANDROID_PREREQUISITES_INSTALL_INTERACTIVE: 0
56+
57+
jobs:
58+
build:
59+
name: Build test APP [ ${{ github.event.inputs.arch }} | ${{ github.event.inputs.artifact }} | ${{ github.event.inputs.bootstrap }} | ${{ github.event.inputs.mode }} | ${{ github.event.inputs.os }} | ${{ github.event.inputs.requirements }}]
60+
runs-on: ${{ github.event.inputs.os }}
61+
steps:
62+
- name: Checkout python-for-android
63+
uses: actions/checkout@v4
64+
- name: Pull the python-for-android docker image
65+
run: make docker/pull
66+
- name: Build python-for-android docker image
67+
run: make docker/build
68+
- name: Build multi-arch artifact with docker
69+
run: |
70+
docker run --name p4a-latest kivy/python-for-android make ARCH=${{ github.event.inputs.arch }} ARTIFACT=${{ github.event.inputs.artifact }} BOOTSTRAP=${{ github.event.inputs.bootstrap }} MODE=${{ github.event.inputs.mode }} REQUIREMENTS=${{ github.event.inputs.requirements }} testapps-generic
71+
- name: Copy produced artifacts from docker container (*.apk, *.aab)
72+
if: github.event.inputs.bootstrap != 'service_library'
73+
run: |
74+
mkdir -p dist
75+
docker cp p4a-latest:/home/user/app/testapps/on_device_unit_tests/${{ env.APK_ARTIFACT_FILENAME }} dist/ || true
76+
docker cp p4a-latest:/home/user/app/testapps/on_device_unit_tests/${{ env.AAB_ARTIFACT_FILENAME }} dist/ || true
77+
- name: Copy produced artifacts from docker container (*.aar)
78+
if: github.event.inputs.bootstrap == 'service_library'
79+
run: |
80+
mkdir -p dist
81+
docker cp p4a-latest:/home/user/app/testapps/on_device_unit_tests/${{ env.AAR_ARTIFACT_FILENAME }} dist/
82+
- name: Rename artifacts to include the build platform name (*.apk, *.aab, *.aar)
83+
run: |
84+
if [ -f dist/${{ env.APK_ARTIFACT_FILENAME }} ]; then mv dist/${{ env.APK_ARTIFACT_FILENAME }} dist/${{ github.event.inputs.os }}-${{ github.event.inputs.bootstrap }}-${{ env.APK_ARTIFACT_FILENAME }}; fi
85+
if [ -f dist/${{ env.AAB_ARTIFACT_FILENAME }} ]; then mv dist/${{ env.AAB_ARTIFACT_FILENAME }} dist/${{ github.event.inputs.os }}-${{ github.event.inputs.bootstrap }}-${{ env.AAB_ARTIFACT_FILENAME }}; fi
86+
if [ -f dist/${{ env.AAR_ARTIFACT_FILENAME }} ]; then mv dist/${{ env.AAR_ARTIFACT_FILENAME }} dist/${{ github.event.inputs.os }}-${{ github.event.inputs.bootstrap }}-${{ env.AAR_ARTIFACT_FILENAME }}; fi
87+
- name: Upload artifacts
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: ${{ github.event.inputs.os }}-${{ github.event.inputs.bootstrap }}-artifacts
91+
path: dist
92+
# Cleanup the container after all steps are done
93+
- name: Cleanup Docker container
94+
run: docker rm p4a-latest
95+
if: always()

.github/workflows/docker.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Docker
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- develop
8+
tags:
9+
- "*"
10+
pull_request:
11+
12+
jobs:
13+
docker:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: docker/setup-buildx-action@v3
18+
- run: make docker/build
19+
- name: docker login
20+
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')
21+
env:
22+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
23+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
24+
run: make docker/login
25+
- name: docker push
26+
if: github.ref == 'refs/heads/develop'
27+
run: make docker/push
28+
- name: docker push (tag)
29+
if: startsWith(github.ref, 'refs/tags/')
30+
run: |
31+
make docker/tag DOCKER_TAG=${GITHUB_REF#refs/tags/}
32+
make docker/push

.github/workflows/no-response.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: No Response
2+
3+
# Both `issue_comment` and `scheduled` event types are required for this Action
4+
# to work properly.
5+
on:
6+
issue_comment:
7+
types: [created]
8+
schedule:
9+
# Schedule for an arbitrary time (5am) once every day
10+
- cron: '* 5 * * *'
11+
12+
jobs:
13+
noResponse:
14+
# Don't run if in a fork
15+
if: github.repository_owner == 'kivy'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb
19+
# This commit hash targets release v0.5.0 of lee-dohm/no-response.
20+
# Targeting a commit hash instead of a tag has been done for security reasons.
21+
# Please be aware that the commit hash specifically targets the "Automatic compilation"
22+
# done by `github-actions[bot]` as the `no-response` Action needs to be compiled.
23+
with:
24+
token: ${{ github.token }}
25+
daysUntilClose: 42
26+
responseRequiredLabel: 'awaiting-reply'
27+
closeComment: >
28+
This issue has been automatically closed because there has been no response
29+
to our request for more information from the original author. With only the
30+
information that is currently in the issue, we don't have the means
31+
to take action. Please reach out if you have or find the answers we need so
32+
that we can investigate further.

0 commit comments

Comments
 (0)