Skip to content

Commit

Permalink
Merge pull request #918 from shankari/upgrade_2023
Browse files Browse the repository at this point in the history
Fix CI issues for the big 2023 upgrade
  • Loading branch information
shankari authored Feb 10, 2023
2 parents 248b863 + 47a688c commit 41d9f06
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/android-automated-sdk-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ on:
push:
paths:
- 'setup/prereq_android_sdk_install.sh'
- '.github/workflows/android-automated-sdk-install.yml'
pull_request:
paths:
- 'setup/prereq_android_sdk_install.sh'
- '.github/workflows/android-automated-sdk-install.yml'
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '5 4 * * 0'
Expand Down Expand Up @@ -71,7 +73,17 @@ jobs:
export JAVA_HOME=$JAVA_HOME_11_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
echo "About to run the emulator at $ANDROID_SDK_ROOT/emulator/emulator"
$ANDROID_SDK_ROOT/emulator/emulator -list-avds
echo "About to run the avdmanager at $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager list avds
- name: Setup the cordova environment
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
bash setup/setup_android_native.sh
- name: Ensure that the path is correct and the project can be activated
shell: bash -l {0}
Expand All @@ -80,3 +92,5 @@ jobs:
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
source setup/activate_native.sh
echo "About to run the avdmanager from the path" `which avdmanager`
avdmanager list avd
3 changes: 2 additions & 1 deletion setup/activate_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ echo "Verifying $ANDROID_HOME or $ANDROID_SDK_ROOT is set"
if [ -z $ANDROID_HOME ] && [ -z $ANDROID_SDK_ROOT ];
then
echo "ANDROID_HOME and ANDROID_SDK_ROOT not set, android SDK not found"
exit 1
fi

echo "Activating sdkman, and by default, gradle"
source ~/.sdkman/bin/sdkman-init.sh

echo "Ensuring that we use the most recent version of the command line tools"
export PATH=$ANDROID_SDK_ROOT/sdk/cmdline-tools/bin:$ANDROID_SDK_ROOT/emulator:$PATH
export PATH=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/emulator:$PATH

echo "Configuring the repo for building native code"
./bin/configure_xml_and_json.js cordovabuild
1 change: 0 additions & 1 deletion setup/setup_android_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ JAVA_VERSION=`javac -version`
echo "Found java in the path with version $JAVA_VERSION"

echo "Setting up SDK environment"
ANDROID_BUILD_TOOLS_VERSION=27.0.3
MIN_SDK_VERSION=21
TARGET_SDK_VERSION=28

Expand Down

0 comments on commit 41d9f06

Please sign in to comment.