1919 runs-on : ubuntu-latest
2020 steps :
2121 - name : Checkout python-for-android
22- uses : actions/checkout@v4
22+ uses : actions/checkout@v5
2323 - name : Set up Python 3.x
24- uses : actions/setup-python@v5
24+ uses : actions/setup-python@v6
2525 with :
2626 python-version : 3.x
2727 - name : Run flake8
@@ -30,21 +30,40 @@ jobs:
3030 pip install tox>=2.0
3131 tox -e pep8
3232
33+ spotless :
34+ name : Java Spotless check
35+ runs-on : ubuntu-latest
36+ steps :
37+ - name : Checkout python-for-android
38+ uses : actions/checkout@v5
39+ - name : Set up Java 17
40+ uses : actions/setup-java@v4
41+ with :
42+ distribution : ' temurin'
43+ java-version : ' 17'
44+ - name : Set up Gradle
45+ uses : gradle/actions/setup-gradle@v4
46+ - name : Run Spotless check
47+ working-directory : pythonforandroid/bootstraps
48+ run : ./common/build/gradlew spotlessCheck
49+
3350 test :
3451 name : Pytest [Python ${{ matrix.python-version }} | ${{ matrix.os }}]
35- needs : flake8
52+ needs : [ flake8, spotless]
3653 runs-on : ${{ matrix.os }}
3754 strategy :
55+ fail-fast : false
3856 matrix :
39- python-version : ['3.8', '3.9', '3.10', '3.11']
40- os : [ubuntu-latest, macOs -latest]
57+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.14t' ]
58+ os : [ubuntu-latest, macos -latest]
4159 steps :
4260 - name : Checkout python-for-android
43- uses : actions/checkout@v4
61+ uses : actions/checkout@v5
4462 - name : Set up Python ${{ matrix.python-version }}
45- uses : actions/setup-python@v5
63+ uses : actions/setup-python@v6
4664 with :
4765 python-version : ${{ matrix.python-version }}
66+ allow-prereleases : true
4867 - name : Tox tests
4968 run : |
5069 python -m pip install --upgrade pip
5978
6079 ubuntu_build :
6180 name : Build test APP [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
62- needs : [flake8]
81+ needs : [flake8, spotless ]
6382 runs-on : ${{ matrix.runs_on }}
64- continue-on-error : true
6583 strategy :
6684 matrix :
6785 runs_on : [ubuntu-latest]
7795 - name : qt
7896 target : testapps-qt
7997 steps :
98+ - name : Maximize build space
99+ uses : easimon/maximize-build-space@v10
100+ with :
101+ root-reserve-mb : 30720
102+ swap-size-mb : 1024
103+ remove-dotnet : ' true'
104+ remove-android : ' true'
105+ remove-haskell : ' true'
106+ remove-codeql : ' true'
107+ remove-docker-images : ' true'
80108 - name : Checkout python-for-android
81- uses : actions/checkout@v4
109+ uses : actions/checkout@v5
82110 - name : Build python-for-android docker image
83111 run : |
84112 docker build --tag=kivy/python-for-android .
@@ -109,14 +137,13 @@ jobs:
109137
110138 macos_build :
111139 name : Build test APP [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
112- needs : [flake8]
140+ needs : [flake8, spotless ]
113141 runs-on : ${{ matrix.runs_on }}
114- continue-on-error : true
115142 strategy :
116143 matrix :
117- # macos-latest (ATM macos-14 ) runs on Apple Silicon,
118- # macos-13 runs on Intel
119- runs_on : ['macos-latest', 'macos-13 ']
144+ # macos-latest (ATM macos-15 ) runs on Apple Silicon,
145+ # macos-15-intel runs on Intel
146+ runs_on : ['macos-latest', 'macos-15-intel ']
120147 bootstrap :
121148 - name : sdl2
122149 target : testapps-with-numpy
@@ -129,14 +156,14 @@ jobs:
129156 ANDROID_NDK_HOME : ${HOME}/.android/android-ndk
130157 steps :
131158 - name : Checkout python-for-android
132- uses : actions/checkout@v4
159+ uses : actions/checkout@v5
133160 - name : Set up Python 3.x
134- uses : actions/setup-python@v5
161+ uses : actions/setup-python@v6
135162 with :
136163 python-version : 3.x
137164 - name : Install python-for-android
138165 run : |
139- python3 -m pip install -e .
166+ python3 -m pip install --editable .
140167 - name : Install prerequisites via pythonforandroid/prerequisites.py (Experimental)
141168 run : |
142169 python3 pythonforandroid/prerequisites.py
@@ -162,30 +189,52 @@ jobs:
162189 name : ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-artifacts
163190 path : dist
164191
192+ test_on_emulator :
193+ name : Run App on Emulator
194+ needs : ubuntu_build
195+ runs-on : ubuntu-latest
196+
197+ steps :
198+ - uses : actions/checkout@v5
199+ - name : Download Artifacts
200+ uses : actions/download-artifact@v5
201+ with :
202+ name : ubuntu-latest-sdl2-artifacts
203+ path : dist/
204+
205+ - name : Setup and start Android Emulator
206+ uses : reactivecircus/android-emulator-runner@v2
207+ with :
208+ api-level : 30
209+ arch : x86_64
210+ script : ci/run_emulator_tests.sh
211+
165212 ubuntu_rebuild_updated_recipes :
166213 name : Test updated recipes for arch ${{ matrix.android_arch }} [ ubuntu-latest ]
167- needs : [flake8]
214+ needs : [flake8, spotless ]
168215 runs-on : ubuntu-latest
216+ # continue on error to see failures across all architectures
169217 continue-on-error : true
170218 strategy :
171219 matrix :
172220 android_arch : ["arm64-v8a", "armeabi-v7a", "x86_64", "x86"]
173221 env :
174222 REBUILD_UPDATED_RECIPES_EXTRA_ARGS : --arch=${{ matrix.android_arch }}
175223 steps :
224+ - name : Maximize build space
225+ uses : easimon/maximize-build-space@v10
226+ with :
227+ root-reserve-mb : 30720
228+ swap-size-mb : 1024
229+ remove-dotnet : ' true'
230+ remove-android : ' true'
231+ remove-haskell : ' true'
232+ remove-codeql : ' true'
233+ remove-docker-images : ' true'
176234 - name : Checkout python-for-android (all-history)
177- uses : actions/checkout@v4
235+ uses : actions/checkout@v5
178236 with :
179237 fetch-depth : 0
180- # helps with GitHub runner getting out of space
181- - name : Free disk space
182- run : |
183- df -h
184- sudo swapoff -a
185- sudo rm -f /swapfile
186- sudo apt -y clean
187- docker images -q | xargs -r docker rmi
188- df -h
189238 - name : Pull docker image
190239 run : |
191240 make docker/pull
@@ -195,15 +244,16 @@ jobs:
195244
196245 macos_rebuild_updated_recipes :
197246 name : Test updated recipes for arch ${{ matrix.android_arch }} [ ${{ matrix.runs_on }} ]
198- needs : [flake8]
247+ needs : [flake8, spotless ]
199248 runs-on : ${{ matrix.runs_on }}
249+ # continue on error to see failures across all architectures
200250 continue-on-error : true
201251 strategy :
202252 matrix :
203253 android_arch : ["arm64-v8a", "armeabi-v7a", "x86_64", "x86"]
204- # macos-latest (ATM macos-14 ) runs on Apple Silicon,
205- # macos-13 runs on Intel
206- runs_on : ['macos-latest', 'macos-13 ']
254+ # macos-latest (ATM macos-15 ) runs on Apple Silicon,
255+ # macos-15-intel runs on Intel
256+ runs_on : ['macos-latest', 'macos-15-intel ']
207257 env :
208258 ANDROID_HOME : ${HOME}/.android
209259 ANDROID_SDK_ROOT : ${HOME}/.android/android-sdk
@@ -212,16 +262,16 @@ jobs:
212262 REBUILD_UPDATED_RECIPES_EXTRA_ARGS : --arch=${{ matrix.android_arch }}
213263 steps :
214264 - name : Checkout python-for-android (all-history)
215- uses : actions/checkout@v4
265+ uses : actions/checkout@v5
216266 with :
217267 fetch-depth : 0
218268 - name : Set up Python 3.x
219- uses : actions/setup-python@v5
269+ uses : actions/setup-python@v6
220270 with :
221271 python-version : 3.x
222272 - name : Install python-for-android
223273 run : |
224- python3 -m pip install -e .
274+ python3 -m pip install --editable .
225275 - name : Install prerequisites via pythonforandroid/prerequisites.py (Experimental)
226276 run : |
227277 python3 pythonforandroid/prerequisites.py
@@ -244,7 +294,7 @@ jobs:
244294 documentation :
245295 runs-on : ubuntu-latest
246296 steps :
247- - uses : actions/checkout@v4
297+ - uses : actions/checkout@v5
248298 - name : Requirements
249299 run : |
250300 python -m pip install --upgrade pip
0 commit comments