-
Notifications
You must be signed in to change notification settings - Fork 465
40 lines (38 loc) · 1.6 KB
/
build-android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Android Build
on:
workflow_dispatch:
inputs:
debug:
type: boolean
default: 'false'
env:
MAKEFLAGS: ${{ (github.repository == 'numworks/epsilon-internal') && '-j32' || '-j2' }}
DEBUG: ${{ fromJSON('["0", "1"]')[github.event.inputs.debug == 'true'] }}
OUTPUT_PATH: output/${{ fromJSON('["release", "debug"]')[github.event.inputs.debug == 'true'] }}/simulator/android
jobs:
build:
runs-on: ${{ (github.repository == 'numworks/epsilon-internal') && 'self-hosted' || 'ubuntu-latest' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
run: build/setup.sh --only-simulator
- name: Build
run: make DEBUG=$DEBUG PLATFORM=simulator TARGET=android epsilon.apk
- name: Optimize ()
# Optimize twice since first try will fail.
run: $ANDROID_HOME/build-tools/29.0.2/zipalign -v -p 4 $OUTPUT_PATH/epsilon.apk $OUTPUT_PATH/epsilon_temp.apk ; $ANDROID_HOME/build-tools/29.0.2/zipalign -v -p 4 $OUTPUT_PATH/epsilon_temp.apk $OUTPUT_PATH/epsilon_optimized.apk
# Delete temporary files.
- run: rm $OUTPUT_PATH/epsilon_temp.apk $OUTPUT_PATH/epsilon.apk
- name: Upload apk
uses: actions/upload-artifact@v3
with:
name: unsigned-epsilon-android.apk
path: $OUTPUT_PATH/epsilon_optimized.apk
retention-days: 7
- name: Upload debug symbols
uses: actions/upload-artifact@v3
with:
name: android-debug-symbols.zip
path: $OUTPUT_PATH/app/outputs/native-debug-symbols/release/native-debug-symbols.zip
retention-days: 7