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 :
3855 fail-fast : false
6178
6279 ubuntu_build :
6380 name : Build test APP [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
64- needs : [flake8]
81+ needs : [flake8, spotless ]
6582 runs-on : ${{ matrix.runs_on }}
66- continue-on-error : true
6783 strategy :
6884 matrix :
6985 runs_on : [ubuntu-latest]
7995 - name : qt
8096 target : testapps-qt
8197 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'
82108 - name : Checkout python-for-android
83109 uses : actions/checkout@v5
84110 - name : Build python-for-android docker image
@@ -111,9 +137,8 @@ jobs:
111137
112138 macos_build :
113139 name : Build test APP [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
114- needs : [flake8]
140+ needs : [flake8, spotless ]
115141 runs-on : ${{ matrix.runs_on }}
116- continue-on-error : true
117142 strategy :
118143 matrix :
119144 # macos-latest (ATM macos-15) runs on Apple Silicon,
@@ -186,28 +211,30 @@ jobs:
186211
187212 ubuntu_rebuild_updated_recipes :
188213 name : Test updated recipes for arch ${{ matrix.android_arch }} [ ubuntu-latest ]
189- needs : [flake8]
214+ needs : [flake8, spotless ]
190215 runs-on : ubuntu-latest
216+ # continue on error to see failures across all architectures
191217 continue-on-error : true
192218 strategy :
193219 matrix :
194220 android_arch : ["arm64-v8a", "armeabi-v7a", "x86_64", "x86"]
195221 env :
196222 REBUILD_UPDATED_RECIPES_EXTRA_ARGS : --arch=${{ matrix.android_arch }}
197223 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'
198234 - name : Checkout python-for-android (all-history)
199235 uses : actions/checkout@v5
200236 with :
201237 fetch-depth : 0
202- # helps with GitHub runner getting out of space
203- - name : Free disk space
204- run : |
205- df -h
206- sudo swapoff -a
207- sudo rm -f /swapfile
208- sudo apt -y clean
209- docker images -q | xargs -r docker rmi
210- df -h
211238 - name : Pull docker image
212239 run : |
213240 make docker/pull
@@ -217,8 +244,9 @@ jobs:
217244
218245 macos_rebuild_updated_recipes :
219246 name : Test updated recipes for arch ${{ matrix.android_arch }} [ ${{ matrix.runs_on }} ]
220- needs : [flake8]
247+ needs : [flake8, spotless ]
221248 runs-on : ${{ matrix.runs_on }}
249+ # continue on error to see failures across all architectures
222250 continue-on-error : true
223251 strategy :
224252 matrix :
0 commit comments