Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment out everything else and just echo the initial environment var… #817

Merged
merged 21 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3dd3262
Comment out everything else and just echo the initial environment var…
shankari Apr 3, 2022
0344926
Run the test CI for all pushes and PRs
shankari Apr 3, 2022
4b1ac52
Change the automated install to be identical to the CI workflow
shankari Apr 4, 2022
c179cc1
Fix the file ending
shankari Apr 4, 2022
19c10b0
Now introduce the actual changes we want to test
shankari Apr 4, 2022
fafeaee
Fix the list_installed syntax
shankari Apr 4, 2022
1c19c6a
Enable all the other steps as well
shankari Apr 4, 2022
19eaa04
actually run the install script
shankari Apr 4, 2022
564fe9e
Add some logging statements to check when the install is complete
shankari Apr 4, 2022
be5a8a1
Ensure that we explicitly exit from the script
shankari Apr 4, 2022
49295bb
Simplify the install script so we can see why it doesn't exit properly
shankari Apr 4, 2022
5c876de
Remove all prompts and make sure that it works
shankari Apr 4, 2022
fc8ae0b
Remove the pipe to confirm that this the problem
shankari Apr 4, 2022
48450da
Restore the prompts
shankari Apr 4, 2022
d0f9a8b
Reintroduce the actual install now that the printf workaround seems t…
shankari Apr 4, 2022
f655c38
Fix install check and diff check
shankari Apr 4, 2022
cd17dc2
Add -x so we print lines before executing them
shankari Apr 4, 2022
5f388ac
Fix syntax of single line command by adding appropriate semicolons
shankari Apr 4, 2022
a5fcbba
Fix the checks to look for directories and not files
shankari Apr 4, 2022
fe81b1f
Split the checks into two so we detect if either check fails
shankari Apr 4, 2022
f97b514
Restore the default CI to only run on the master branch
shankari Apr 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,49 @@ jobs:
echo "SDK root before install $ANDROID_SDK_ROOT"
cat $ANDROID_SDK_ROOT/cmdline-tools/latest/source.properties
echo "Existing installed packages"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list-installed
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed

- name: Install to a new SDK root
run: |
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
yes Y | setup/prereq_android_sdk_install.sh
printf "Y\nY\nY\nY\nY\n" | bash setup/prereq_android_sdk_install.sh

- name: Verify that all packages are as expected
shell: bash -l {0}
run: |
echo "Comparing $ANDROID_SDK_ROOT and $NEW_ANDROID_SDK_ROOT"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed > /tmp/existing_packages
$NEW_ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed > /tmp/new_packages
diff /tmp/existing_packages /tmp/new_packages
diff -uw /tmp/existing_packages /tmp/new_packages
echo "Expected differences; emulators, SDK versions, tool versions"

- name: Verify that directory structure is consistent
shell: bash -l {0}
shell: bash -l -x {0}
run: |
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
ls -al $ANDROID_SDK_ROOT
if [ ! -f $ANDROID_SDK_ROOT/emulator ]; then exit 1 fi
if [ ! -f $ANDROID_SDK_ROOT/build-tools ]; then exit 1 fi
if [ ! -f $ANDROID_SDK_ROOT/patcher ]; then exit 1 fi
if [ ! -f $ANDROID_SDK_ROOT/extras ]; then exit 1 fi
if [ ! -f $ANDROID_SDK_ROOT/platforms ]; then exit 1 fi
if [ ! -f $ANDROID_SDK_ROOT/platform-tools ]; then exit 1 fi
if [ ! -f $ANDROID_SDK_ROOT/system-images ]; then exit 1 fi
if [ ! -d $ANDROID_SDK_ROOT/emulator ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/build-tools ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/patcher ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/extras ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/platforms ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/platform-tools ]; then exit 1; fi
if [ ! -d $ANDROID_SDK_ROOT/system-images ]; then exit 1; fi

- name: Ensure that the path is correct and installed programs are runnable
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
source setup/activate_native.sh
$ANDROID_SDK_ROOT/emulator/emulator -list-avds

- name: Ensure that the path is correct and the project can be activated
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
source setup/activate_native.sh
2 changes: 2 additions & 0 deletions setup/prereq_android_sdk_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ echo "Downloading the android SDK. This will take a LONG time and will require y
read -p "Do you wish to continue? (Y/N)" CONTINUE
if [ $CONTINUE == "Y" ];
then
echo "BEGIN: About to start android SDK download"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --package_file=setup/android_sdk_packages
echo "END: Done with android SDK download, exiting script"
else
echo "Please install this before proceeding with the installation steps"
exit 1
Expand Down