[SKIP CI] Workflow updates

- Fix schedule for issue locking (daily instead of hourly)
- Prioritize larger language modules for PR build (particularly en)
- Skip zipalign verification (AGP already does it, in theory)
This commit is contained in:
arkon 2021-06-20 17:44:42 -04:00
parent 0640b31137
commit 8e0fe086c2
3 changed files with 14 additions and 10 deletions

View File

@ -1,16 +1,18 @@
#!/bin/bash #!/bin/bash
set -e set -e
shopt -s globstar nullglob extglob
TOOLS="$(ls -d ${ANDROID_HOME}/build-tools/* | tail -1)" TOOLS="$(ls -d ${ANDROID_HOME}/build-tools/* | tail -1)"
shopt -s globstar nullglob extglob
APKS=( **/*".apk" ) APKS=( **/*".apk" )
# Fail if too little extensions seem to have been built # Fail if too little extensions seem to have been built
if [ "${#APKS[@]}" -le "1" ]; then if [ "${#APKS[@]}" -le "1" ]; then
echo "Insufficient amount of APKs found. Please check the project configuration." echo "Insufficient amount of APKs found. Please check the project configuration."
exit 1; exit 1
fi; else
echo "Signing ${#APKS[@]} APKs"
fi
# Take base64 encoded key input and put it into a file # Take base64 encoded key input and put it into a file
STORE_PATH=$PWD/signingkey.jks STORE_PATH=$PWD/signingkey.jks
@ -24,16 +26,18 @@ export KEY_PASSWORD=$4
DEST=$PWD/apk DEST=$PWD/apk
rm -rf $DEST && mkdir -p $DEST rm -rf $DEST && mkdir -p $DEST
MAX_PARALLEL=4 MAX_PARALLEL=5
# Sign all of the APKs # Sign all of the APKs
for APK in ${APKS[@]}; do for APK in ${APKS[@]}; do
( (
echo "Signing $APK"
BASENAME=$(basename $APK) BASENAME=$(basename $APK)
APKNAME="${BASENAME%%+(-release*)}.apk" APKNAME="${BASENAME%%+(-release*)}.apk"
APKDEST="$DEST/$APKNAME" APKDEST="$DEST/$APKNAME"
${TOOLS}/zipalign -c -v -p 4 $APK # AGP already zipaligns APKs
# ${TOOLS}/zipalign -c -v -p 4 $APK
cp $APK $APKDEST cp $APK $APKDEST
${TOOLS}/apksigner sign --ks $STORE_PATH --ks-key-alias $STORE_ALIAS --ks-pass env:KEY_STORE_PASSWORD --key-pass env:KEY_PASSWORD $APKDEST ${TOOLS}/apksigner sign --ks $STORE_PATH --ks-key-alias $STORE_ALIAS --ks-pass env:KEY_STORE_PASSWORD --key-pass env:KEY_PASSWORD $APKDEST

View File

@ -21,12 +21,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
lang: [all, ar, ca, de, en, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh] lang: [all, en, ar, ca, de, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh]
steps: steps:
- name: Checkout PR - name: Checkout PR
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up JDK 1.8 - name: Set up JDK
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 1.8
@ -64,12 +64,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
lang: [all, ar, ca, de, en, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh] lang: [all, en, ar, ca, de, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh]
steps: steps:
- name: Checkout PR - name: Checkout PR
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up JDK 1.8 - name: Set up JDK
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 1.8

View File

@ -3,7 +3,7 @@ name: Lock threads
on: on:
# Daily # Daily
schedule: schedule:
- cron: '0 * * * *' - cron: '0 0 * * *'
# Manual trigger # Manual trigger
workflow_dispatch: workflow_dispatch:
inputs: inputs: