Skip to content

Commit 13f37a4

Browse files
committed
Update CI workflows for Chaquopy build
1 parent d8ab0e0 commit 13f37a4

3 files changed

Lines changed: 22 additions & 31 deletions

File tree

.github/workflows/build_apk.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,17 @@ jobs:
102102
# of whether this is being run from the local repository with workflow_dispatch
103103
# or from another repository with workflow_call.
104104
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
105-
- name: Set up Python 3.9
105+
- name: Set up JDK 17
106+
uses: actions/setup-java@v4
107+
with:
108+
distribution: 'temurin'
109+
java-version: '17'
110+
cache: 'gradle'
111+
- name: Set up Python 3.10
106112
uses: actions/setup-python@v6
107113
with:
108-
python-version: 3.9
114+
python-version: "3.10"
115+
cache: 'pip'
109116
- name: Install Apt Dependencies
110117
# Dependencies installed here are taken from the buildozer Dockerfile:
111118
# https://github.com/kivy/buildozer/blob/master/Dockerfile#L45
@@ -122,24 +129,6 @@ jobs:
122129
libltdl-dev \
123130
patch \
124131
zlib1g-dev
125-
- uses: actions/cache@v5
126-
with:
127-
# This is where python for android puts its intermediary build
128-
# files - we cache this to improve build performance, but be
129-
# aggressive in clearing the cache whenever any file changes
130-
# in the repository, especially as we commit files to this folder
131-
# too, so we don't want the cache to override these files.
132-
# We achieve this by just caching on the currently checked out commit.
133-
# Every time we update this repository, this commit will change,
134-
# but repeated workflow calls for this commit will use the cache.
135-
path: ./python-for-android
136-
key: ${{ runner.os }}-python-for-android-${{ steps.get-commit.outputs.sha }}
137-
- uses: actions/cache@v5
138-
with:
139-
path: ~/.cache/pip
140-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
141-
restore-keys: |
142-
${{ runner.os }}-pip-
143132
- name: Download the tarfile from URL for workflow_dispatch
144133
if: ${{ github.event.inputs.tar-url }}
145134
run: make get-tar tar=${{ github.event.inputs.tar-url }}
@@ -153,7 +142,7 @@ jobs:
153142
name: ${{ inputs.tar-file-name }}
154143
path: tar
155144
- name: Install dependencies
156-
run: pip install -r requirements.txt
145+
run: pip install -r build-requirements.txt -r requirements.txt
157146
- name: Ensure that Android SDK dependencies are installed
158147
run: make setup
159148
- name: Build the aab

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,12 @@ jobs:
3030
- uses: actions/checkout@v6
3131
- uses: actions/setup-python@v6
3232
with:
33-
python-version: 3.9
33+
python-version: "3.10"
34+
cache: 'pip'
35+
- name: Set up JDK 17
36+
uses: actions/setup-java@v4
37+
with:
38+
distribution: 'temurin'
39+
java-version: '17'
40+
cache: 'gradle'
3441
- uses: pre-commit/action@v3.0.1

.github/workflows/release_apk.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,12 @@ jobs:
3535
with:
3636
repository: learningequality/kolibri-installer-android
3737
ref: ${{ inputs.ref }}
38-
- name: Set up Python 3.9
38+
- name: Set up Python 3.10
3939
uses: actions/setup-python@v6
4040
with:
41-
python-version: 3.9
42-
- uses: actions/cache@v5
43-
with:
44-
path: ~/.cache/pip
45-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
46-
restore-keys: |
47-
${{ runner.os }}-pip-
41+
python-version: "3.10"
42+
cache: 'pip'
4843
- name: Install dependencies
49-
run: pip install -r requirements.txt
44+
run: pip install -r build-requirements.txt
5045
- name: Release APK
5146
run: python scripts/play_store_api.py release "${{ inputs.version-code }}"

0 commit comments

Comments
 (0)