forked from lichess-org/lichobile
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
93 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json | ||
name: Lidrobile APK | ||
description: Build a Debug APK of Lidrobile Android app | ||
|
||
inputs: | ||
artifactName: | ||
description: "The name of the output artifact for the APK." | ||
required: false | ||
default: "debugApk" | ||
patchNonFree: | ||
description: "Whether nonfree dependencies should be patched out." | ||
required: false | ||
default: "false" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
- name: Install Dependencies | ||
shell: bash | ||
run: npm ci | ||
- name: Patch nonfree | ||
if: inputs.patchNonFree == 'true' | ||
env: | ||
PATCH_NONFREE_FORCE: "1" | ||
shell: bash | ||
run: | | ||
npm run patch-nonfree | ||
git diff | ||
- name: Build web | ||
shell: bash | ||
run: npm run build | ||
- name: Setup JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
- name: Sync android capacitor | ||
shell: bash | ||
run: npx cap update android | ||
- name: Build APKs | ||
working-directory: ./android | ||
shell: bash | ||
run: | | ||
./gradlew assembleDebug | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ inputs.artifactName }} | ||
path: | | ||
./android/app/build/outputs/apk/debug/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: Android build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- '.github/workflows/android.yml' | ||
- '.github/actions/build-lidrobile-apk.yml' | ||
- 'android/**' | ||
branches-ignore: | ||
- 'l10n_master' | ||
|
||
jobs: | ||
apk: | ||
name: Generate debug APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/build-lidrobile-apk | ||
|
||
freeApk: | ||
name: Generate free debug APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/build-lidrobile-apk | ||
with: | ||
artifactName: "debugFreeApk" | ||
patchNonFree: "true" | ||
- name: Check non-free dependencies | ||
working-directory: ./android/app/build/outputs/apk/debug/ | ||
run: | | ||
dexdump=$(find $ANDROID_HOME/build-tools/ -name 'dexdump' | sort -r | head -1) | ||
! $dexdump app-debug.apk | grep 'Class descriptor' | grep com\/google\/firebase | ||
! $dexdump app-debug.apk | grep 'Class descriptor' | grep com\/google\/android\/gms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters