Skip to content

Commit 17ec678

Browse files
authored
Merge pull request #2638 from misl6/release-2022.07.20
Release 2022.07.20
2 parents 227a765 + 31bf165 commit 17ec678

File tree

111 files changed

+2246
-852
lines changed

Some content is hidden

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

111 files changed

+2246
-852
lines changed

.github/workflows/push.yml

+256-16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Unit tests & build apps
22

33
on: ['push', 'pull_request']
44

5+
env:
6+
APK_ARTIFACT_FILENAME: bdist_unit_tests_app-debug-1.1-.apk
7+
AAB_ARTIFACT_FILENAME: bdist_unit_tests_app-release-1.1-.aab
8+
AAR_ARTIFACT_FILENAME: bdist_unit_tests_app-release-1.1-.aar
9+
PYTHONFORANDROID_PREREQUISITES_INSTALL_INTERACTIVE: 0
10+
511
jobs:
612

713
flake8:
@@ -47,10 +53,21 @@ jobs:
4753
parallel: true
4854
flag-name: run-${{ matrix.os }}-${{ matrix.python-version }}
4955

50-
build_apk:
51-
name: Unit test apk
56+
ubuntu_build_apk:
57+
name: Unit test apk [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
5258
needs: [flake8]
53-
runs-on: ubuntu-latest
59+
runs-on: ${{ matrix.runs_on }}
60+
continue-on-error: true
61+
strategy:
62+
matrix:
63+
runs_on: [ubuntu-latest]
64+
bootstrap:
65+
- name: sdl2
66+
target: testapps-with-numpy
67+
- name: sdl2_scipy
68+
target: testapps-with-scipy
69+
- name: webview
70+
target: testapps-webview
5471
steps:
5572
- name: Checkout python-for-android
5673
uses: actions/checkout@v2
@@ -69,16 +86,85 @@ jobs:
6986
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
7087
run: |
7188
mkdir -p apks
72-
make docker/run/make/with-artifact/apk/testapps-with-numpy
73-
- uses: actions/upload-artifact@v1
89+
make docker/run/make/with-artifact/apk/${{ matrix.bootstrap.target }}
90+
- name: Rename apk artifact to include the build platform name
91+
run: |
92+
mv apks/${{ env.APK_ARTIFACT_FILENAME }} apks/${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
93+
- name: Upload apk artifact
94+
uses: actions/upload-artifact@v1
7495
with:
75-
name: bdist_unit_tests_app-debug-1.1-.apk
76-
path: apks
96+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
97+
path: apks/${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
7798

78-
build_aab:
79-
name: Unit test aab
99+
macos_build_apk:
100+
name: Unit test apk [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
80101
needs: [flake8]
81-
runs-on: ubuntu-latest
102+
runs-on: ${{ matrix.runs_on }}
103+
continue-on-error: true
104+
strategy:
105+
matrix:
106+
runs_on: [macos-latest, apple-silicon-m1]
107+
bootstrap:
108+
- name: sdl2
109+
target: testapps-with-numpy
110+
- name: webview
111+
target: testapps-webview
112+
include:
113+
- runs_on: macos-latest
114+
ndk_version: '23b'
115+
- runs_on: apple-silicon-m1
116+
ndk_version: '24'
117+
env:
118+
ANDROID_HOME: ${HOME}/.android
119+
ANDROID_SDK_ROOT: ${HOME}/.android/android-sdk
120+
ANDROID_SDK_HOME: ${HOME}/.android/android-sdk
121+
ANDROID_NDK_HOME: ${HOME}/.android/android-ndk
122+
ANDROID_NDK_VERSION: ${{ matrix.ndk_version }}
123+
steps:
124+
- name: Checkout python-for-android
125+
uses: actions/checkout@v2
126+
- name: Install python-for-android
127+
run: |
128+
source ci/osx_ci.sh
129+
arm64_set_path_and_python_version 3.9.7
130+
python3 -m pip install -e .
131+
- name: Install prerequisites via pythonforandroid/prerequisites.py (Experimental)
132+
run: |
133+
source ci/osx_ci.sh
134+
arm64_set_path_and_python_version 3.9.7
135+
python3 pythonforandroid/prerequisites.py
136+
- name: Install dependencies (Legacy)
137+
run: |
138+
source ci/osx_ci.sh
139+
arm64_set_path_and_python_version 3.9.7
140+
make --file ci/makefiles/osx.mk
141+
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
142+
run: |
143+
source ci/osx_ci.sh
144+
arm64_set_path_and_python_version 3.9.7
145+
make ${{ matrix.bootstrap.target }}
146+
- name: Rename apk artifact to include the build platform name
147+
run: |
148+
mv testapps/on_device_unit_tests/${{ env.APK_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
149+
- name: Upload apk artifact
150+
uses: actions/upload-artifact@v1
151+
with:
152+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
153+
path: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
154+
155+
ubuntu_build_aab:
156+
name: Unit test aab [ ${{ matrix.runs_on }} ]
157+
needs: [flake8]
158+
runs-on: ${{ matrix.runs_on }}
159+
continue-on-error: true
160+
strategy:
161+
matrix:
162+
runs_on: [ubuntu-latest]
163+
bootstrap:
164+
- name: sdl2
165+
target: testapps-with-numpy-aab
166+
- name: webview
167+
target: testapps-webview-aab
82168
steps:
83169
- name: Checkout python-for-android
84170
uses: actions/checkout@v2
@@ -97,16 +183,123 @@ jobs:
97183
- name: Build Android App Bundle Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
98184
run: |
99185
mkdir -p aabs
100-
make docker/run/make/with-artifact/aab/testapps-with-numpy-aab
101-
- uses: actions/upload-artifact@v1
186+
make docker/run/make/with-artifact/aab/${{ matrix.bootstrap.target }}
187+
- name: Rename artifact to include the build platform name
188+
run: |
189+
mv aabs/${{ env.AAB_ARTIFACT_FILENAME }} aabs/${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAB_ARTIFACT_FILENAME }}
190+
- name: Upload apk artifact
191+
uses: actions/upload-artifact@v1
192+
with:
193+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAB_ARTIFACT_FILENAME }}
194+
path: aabs/${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAB_ARTIFACT_FILENAME }}
195+
196+
197+
ubuntu_build_aar:
198+
name: Unit test aar [ ${{ matrix.runs_on }} ]
199+
needs: [flake8]
200+
runs-on: ${{ matrix.runs_on }}
201+
continue-on-error: true
202+
strategy:
203+
matrix:
204+
runs_on: [ubuntu-latest]
205+
bootstrap:
206+
- name: service_library
207+
target: testapps-service_library-aar
208+
steps:
209+
- name: Checkout python-for-android
210+
uses: actions/checkout@v2
211+
# helps with GitHub runner getting out of space
212+
- name: Free disk space
213+
run: |
214+
df -h
215+
sudo swapoff -a
216+
sudo rm -f /swapfile
217+
sudo apt -y clean
218+
docker rmi $(docker image ls -aq)
219+
df -h
220+
- name: Pull docker image
221+
run: |
222+
make docker/pull
223+
- name: Build Android AAR Python 3 (arm64-v8a)
224+
run: |
225+
mkdir -p aars
226+
make docker/run/make/with-artifact/aar/${{ matrix.bootstrap.target }}
227+
- name: Rename artifact to include the build platform name
228+
run: |
229+
mv aars/${{ env.AAR_ARTIFACT_FILENAME }} aars/${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAR_ARTIFACT_FILENAME }}
230+
- name: Upload aar artifact
231+
uses: actions/upload-artifact@v1
102232
with:
103-
name: bdist_unit_tests_app-release-1.1-.aab
104-
path: aabs
233+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAR_ARTIFACT_FILENAME }}
234+
path: aars/${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAR_ARTIFACT_FILENAME }}
235+
105236

106-
rebuild_updated_recipes:
107-
name: Test updated recipes
237+
macos_build_aab:
238+
name: Unit test aab [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
239+
needs: [flake8]
240+
runs-on: ${{ matrix.runs_on }}
241+
continue-on-error: true
242+
strategy:
243+
matrix:
244+
runs_on: [macos-latest, apple-silicon-m1]
245+
bootstrap:
246+
- name: sdl2
247+
target: testapps-with-numpy-aab
248+
- name: webview
249+
target: testapps-webview-aab
250+
include:
251+
- runs_on: macos-latest
252+
ndk_version: '23b'
253+
- runs_on: apple-silicon-m1
254+
ndk_version: '24'
255+
env:
256+
ANDROID_HOME: ${HOME}/.android
257+
ANDROID_SDK_ROOT: ${HOME}/.android/android-sdk
258+
ANDROID_SDK_HOME: ${HOME}/.android/android-sdk
259+
ANDROID_NDK_HOME: ${HOME}/.android/android-ndk
260+
ANDROID_NDK_VERSION: ${{ matrix.ndk_version }}
261+
steps:
262+
- name: Checkout python-for-android
263+
uses: actions/checkout@v2
264+
- name: Install python-for-android
265+
run: |
266+
source ci/osx_ci.sh
267+
arm64_set_path_and_python_version 3.9.7
268+
python3 -m pip install -e .
269+
- name: Install prerequisites via pythonforandroid/prerequisites.py (Experimental)
270+
run: |
271+
source ci/osx_ci.sh
272+
arm64_set_path_and_python_version 3.9.7
273+
python3 pythonforandroid/prerequisites.py
274+
- name: Install dependencies (Legacy)
275+
run: |
276+
source ci/osx_ci.sh
277+
arm64_set_path_and_python_version 3.9.7
278+
make --file ci/makefiles/osx.mk
279+
- name: Build multi-arch sdl2 aab Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
280+
run: |
281+
source ci/osx_ci.sh
282+
arm64_set_path_and_python_version 3.9.7
283+
make ${{ matrix.bootstrap.target }}
284+
- name: Rename sdl2 artifact to include the build platform name
285+
run: |
286+
mv testapps/on_device_unit_tests/${{ env.AAB_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.AAB_ARTIFACT_FILENAME }}
287+
- name: Upload sdl2 apk artifact
288+
uses: actions/upload-artifact@v1
289+
with:
290+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.AAB_ARTIFACT_FILENAME }}
291+
path: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.AAB_ARTIFACT_FILENAME }}
292+
293+
ubuntu_rebuild_updated_recipes:
294+
name: Test updated recipes for arch ${{ matrix.android_arch }} [ ubuntu-latest ]
108295
needs: [flake8]
109296
runs-on: ubuntu-latest
297+
continue-on-error: true
298+
strategy:
299+
matrix:
300+
android_arch: ["arm64-v8a", "armeabi-v7a", "x86_64", "x86"]
301+
env:
302+
REBUILD_UPDATED_RECIPES_EXTRA_ARGS: --arch=${{ matrix.android_arch }}
110303
steps:
111304
- name: Checkout python-for-android
112305
uses: actions/checkout@v2
@@ -128,6 +321,53 @@ jobs:
128321
run: |
129322
make docker/run/make/rebuild_updated_recipes
130323
324+
macos_rebuild_updated_recipes:
325+
name: Test updated recipes for arch ${{ matrix.android_arch }} [ ${{ matrix.runs_on }} ]
326+
needs: [flake8]
327+
runs-on: ${{ matrix.runs_on }}
328+
continue-on-error: true
329+
strategy:
330+
matrix:
331+
android_arch: ["arm64-v8a", "armeabi-v7a", "x86_64", "x86"]
332+
runs_on: [macos-latest, apple-silicon-m1]
333+
include:
334+
- runs_on: macos-latest
335+
ndk_version: '23b'
336+
- runs_on: apple-silicon-m1
337+
ndk_version: '24'
338+
env:
339+
ANDROID_HOME: ${HOME}/.android
340+
ANDROID_SDK_ROOT: ${HOME}/.android/android-sdk
341+
ANDROID_SDK_HOME: ${HOME}/.android/android-sdk
342+
ANDROID_NDK_HOME: ${HOME}/.android/android-ndk
343+
REBUILD_UPDATED_RECIPES_EXTRA_ARGS: --arch=${{ matrix.android_arch }}
344+
ANDROID_NDK_VERSION: ${{ matrix.ndk_version }}
345+
steps:
346+
- name: Checkout python-for-android
347+
uses: actions/checkout@v2
348+
with:
349+
fetch-depth: 0
350+
- name: Install python-for-android
351+
run: |
352+
source ci/osx_ci.sh
353+
arm64_set_path_and_python_version 3.9.7
354+
python3 -m pip install -e .
355+
- name: Install prerequisites via pythonforandroid/prerequisites.py (Experimental)
356+
run: |
357+
source ci/osx_ci.sh
358+
arm64_set_path_and_python_version 3.9.7
359+
python3 pythonforandroid/prerequisites.py
360+
- name: Install dependencies (Legacy)
361+
run: |
362+
source ci/osx_ci.sh
363+
arm64_set_path_and_python_version 3.9.7
364+
make --file ci/makefiles/osx.mk
365+
- name: Rebuild updated recipes
366+
run: |
367+
source ci/osx_ci.sh
368+
arm64_set_path_and_python_version 3.9.7
369+
make rebuild_updated_recipes
370+
131371
coveralls_finish:
132372
needs: test
133373
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)