Add more Android versions for testing. Only download them on devices marked for additional sdks. Move the lists into facts so that they can be reused. Add uninstallation tasks.
This commit is contained in:
@@ -179,6 +179,7 @@
|
|||||||
; enable : Set to true for system to be considered a workstation.
|
; enable : Set to true for system to be considered a workstation.
|
||||||
;
|
;
|
||||||
; coding : Set to true for installation of code editors (VSCode, PyCharm, Android Studio)
|
; coding : Set to true for installation of code editors (VSCode, PyCharm, Android Studio)
|
||||||
|
; - sdks : Set to true to download additional SDKs to test against.
|
||||||
;
|
;
|
||||||
; editing : Set to true for installation of Audio/Video editors (Shotcut, Audacity, OBS Stdio, GIMP)
|
; editing : Set to true for installation of Audio/Video editors (Shotcut, Audacity, OBS Stdio, GIMP)
|
||||||
; Set to video for only the video related portions.
|
; Set to video for only the video related portions.
|
||||||
@@ -213,6 +214,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
workstation: "{{ lookup('ini', 'enable file={{wrk_file}} default=false') }}"
|
workstation: "{{ lookup('ini', 'enable file={{wrk_file}} default=false') }}"
|
||||||
coding: "{{ lookup('ini', 'coding file={{wrk_file}} default=false') }}"
|
coding: "{{ lookup('ini', 'coding file={{wrk_file}} default=false') }}"
|
||||||
|
sdks: "{{ lookup('ini', 'sdks file={{wrk_file}} default=false') }}"
|
||||||
editing: "{{ lookup('ini', 'editing file={{wrk_file}} default=false') }}"
|
editing: "{{ lookup('ini', 'editing file={{wrk_file}} default=false') }}"
|
||||||
gaming: "{{ lookup('ini', 'gaming file={{wrk_file}} default=false') }}"
|
gaming: "{{ lookup('ini', 'gaming file={{wrk_file}} default=false') }}"
|
||||||
rdp: "{{ lookup('ini', 'rdp file={{wrk_file}} default=false') }}"
|
rdp: "{{ lookup('ini', 'rdp file={{wrk_file}} default=false') }}"
|
||||||
@@ -227,6 +229,7 @@
|
|||||||
loop:
|
loop:
|
||||||
- { 'workstation': "{{ workstation }}" }
|
- { 'workstation': "{{ workstation }}" }
|
||||||
- { 'coding': "{{ coding }}" }
|
- { 'coding': "{{ coding }}" }
|
||||||
|
- { 'sdks': "{{ sdks }}" }
|
||||||
- { 'editing': "{{ editing }}" }
|
- { 'editing': "{{ editing }}" }
|
||||||
- { 'gaming': "{{ gaming }}" }
|
- { 'gaming': "{{ gaming }}" }
|
||||||
- { 'rdp': "{{ rdp }}" }
|
- { 'rdp': "{{ rdp }}" }
|
||||||
|
@@ -30,6 +30,116 @@
|
|||||||
android_sdkmanager_temp: "{{ android_sdk_cmdline_temp }}/cmdline-tools/bin/sdkmanager"
|
android_sdkmanager_temp: "{{ android_sdk_cmdline_temp }}/cmdline-tools/bin/sdkmanager"
|
||||||
android_sdkmanager_final: "{{ android_sdk_cmdline_final }}/sdkmanager"
|
android_sdkmanager_final: "{{ android_sdk_cmdline_final }}/sdkmanager"
|
||||||
|
|
||||||
|
# Regarding images to download; the `default` is the smallest, then `playstore`.
|
||||||
|
# The `google_apis` images are significantly larger than the `playstore` option.
|
||||||
|
#
|
||||||
|
# This script was used to download and test the sizes:
|
||||||
|
#
|
||||||
|
### #!/bin/bash
|
||||||
|
###
|
||||||
|
### cd /home/ling/SDKs/Android/Sdk/cmdline-tools/latest/bin
|
||||||
|
###
|
||||||
|
### # Actually to be used
|
||||||
|
### echo "35 Play Store"
|
||||||
|
### ./sdkmanager --install "system-images;android-35;google_apis_playstore;x86_64"
|
||||||
|
### echo "36 Play Store"
|
||||||
|
### ./sdkmanager --install "system-images;android-36;google_apis_playstore;x86_64"
|
||||||
|
###
|
||||||
|
### # FORTESTING file size
|
||||||
|
### echo "35 AOSP"
|
||||||
|
### ./sdkmanager --install "system-images;android-35;default;x86_64"
|
||||||
|
### echo "36 APIs Only"
|
||||||
|
### ./sdkmanager --install "system-images;android-36;google_apis;x86_64"
|
||||||
|
### echo "35 APIs Only"
|
||||||
|
### ./sdkmanager --install "system-images;android-35;google_apis;x86_64"
|
||||||
|
###
|
||||||
|
### exit 0
|
||||||
|
#
|
||||||
|
# These were the results:
|
||||||
|
#
|
||||||
|
### ~/SDKs/Android/Sdk/system-images]$ du -had2 | sort -h
|
||||||
|
### 1.7G ./android-35/default
|
||||||
|
### 2.2G ./android-35/google_apis_playstore
|
||||||
|
### 2.3G ./android-36/google_apis_playstore
|
||||||
|
### 3.5G ./android-35/google_apis
|
||||||
|
### 4.3G ./android-36/google_apis
|
||||||
|
### 6.6G ./android-36
|
||||||
|
### 7.3G ./android-35
|
||||||
|
### 14G .
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | Android | Facts [Downloads]
|
||||||
|
set_fact:
|
||||||
|
android_downloads_required:
|
||||||
|
### 36 ###
|
||||||
|
- build-tools;36.0.0
|
||||||
|
- platforms;android-36
|
||||||
|
- sources;android-36
|
||||||
|
# Images
|
||||||
|
#- system-images;android-35;default;x86_64 # TODO: Switch once it exists.
|
||||||
|
- system-images;android-36;google_apis_playstore;x86_64
|
||||||
|
### 16 ###
|
||||||
|
- platforms;android-16
|
||||||
|
- sources;android-16
|
||||||
|
# Images
|
||||||
|
- system-images;android-16;default;x86
|
||||||
|
android_downloads_additional:
|
||||||
|
### 35 ###
|
||||||
|
- platforms;android-35
|
||||||
|
- sources;android-35
|
||||||
|
# Images
|
||||||
|
- system-images;android-35;default;x86_64
|
||||||
|
### 34 ###
|
||||||
|
- platforms;android-34
|
||||||
|
- sources;android-34
|
||||||
|
# Images
|
||||||
|
- system-images;android-34;default;x86_64
|
||||||
|
### 33 ###
|
||||||
|
- platforms;android-33
|
||||||
|
- sources;android-33
|
||||||
|
# Images
|
||||||
|
- system-images;android-33;default;x86_64
|
||||||
|
### 30 ###
|
||||||
|
- platforms;android-30
|
||||||
|
- sources;android-30
|
||||||
|
# Images
|
||||||
|
- system-images;android-30;default;x86_64
|
||||||
|
### 27 ###
|
||||||
|
- platforms;android-27
|
||||||
|
- sources;android-27
|
||||||
|
# Images
|
||||||
|
- system-images;android-27;default;x86_64
|
||||||
|
### 21 ###
|
||||||
|
- platforms;android-21
|
||||||
|
- sources;android-21
|
||||||
|
# Images
|
||||||
|
- system-images;android-21;default;x86_64
|
||||||
|
android_downloads_unused:
|
||||||
|
### 36 ###
|
||||||
|
# Images
|
||||||
|
- system-images;android-36;google_apis;x86_64
|
||||||
|
### 35 ###
|
||||||
|
- build-tools;35.0.0
|
||||||
|
- build-tools;35.0.1
|
||||||
|
# Images
|
||||||
|
- system-images;android-35;aosp_atd;x86_64 # ATD = Automated Test Device
|
||||||
|
- system-images;android-35;google_apis;x86_64
|
||||||
|
- system-images;android-35;google_apis_playstore;x86_64
|
||||||
|
### 34 ###
|
||||||
|
- build-tools;34.0.0
|
||||||
|
- platforms;android-34
|
||||||
|
- sources;android-34
|
||||||
|
# Images
|
||||||
|
- system-images;android-34;google_apis;x86_64
|
||||||
|
- system-images;android-34;google_apis_playstore;x86_64
|
||||||
|
### 16 ###
|
||||||
|
# Images
|
||||||
|
- system-images;android-16;google_apis;x86
|
||||||
|
### 15 ###
|
||||||
|
- platforms;android-15
|
||||||
|
- sources;android-15
|
||||||
|
# Images
|
||||||
|
- system-images;android-15;default;x86 # Not working in Android AVDs
|
||||||
|
|
||||||
## Checks ##
|
## Checks ##
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | Android | Check SDK Manager Exists [1/2]
|
- name: Workstation | Linux | Software | Android | Check SDK Manager Exists [1/2]
|
||||||
@@ -112,7 +222,7 @@
|
|||||||
## Configure Modules ##
|
## Configure Modules ##
|
||||||
|
|
||||||
# This can only be run once, otherwise cmdline-tools creates latest-* folders.
|
# This can only be run once, otherwise cmdline-tools creates latest-* folders.
|
||||||
- name: Workstation | Linux | Software | Android | Install Consistent Modules
|
- name: Workstation | Linux | Software | Android | Install | Consistent Modules
|
||||||
shell: "yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
shell: "yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
||||||
loop:
|
loop:
|
||||||
# Current
|
# Current
|
||||||
@@ -122,96 +232,31 @@
|
|||||||
become_user: "{{ user }}"
|
become_user: "{{ user }}"
|
||||||
when: coding == true and not android_sdkmanager_final_stat.stat.exists
|
when: coding == true and not android_sdkmanager_final_stat.stat.exists
|
||||||
|
|
||||||
# Regarding images to download; the `default` is the smallest, then `playstore`.
|
|
||||||
# The `google_apis` images are significantly larger than the `playstore` option.
|
|
||||||
#
|
|
||||||
# This script was used to download and test the sizes:
|
|
||||||
#
|
|
||||||
### #!/bin/bash
|
|
||||||
###
|
|
||||||
### cd /home/ling/SDKs/Android/Sdk/cmdline-tools/latest/bin
|
|
||||||
###
|
|
||||||
### # Actually to be used
|
|
||||||
### echo "35 Play Store"
|
|
||||||
### ./sdkmanager --install "system-images;android-35;google_apis_playstore;x86_64"
|
|
||||||
### echo "36 Play Store"
|
|
||||||
### ./sdkmanager --install "system-images;android-36;google_apis_playstore;x86_64"
|
|
||||||
###
|
|
||||||
### # FORTESTING file size
|
|
||||||
### echo "35 AOSP"
|
|
||||||
### ./sdkmanager --install "system-images;android-35;default;x86_64"
|
|
||||||
### echo "36 APIs Only"
|
|
||||||
### ./sdkmanager --install "system-images;android-36;google_apis;x86_64"
|
|
||||||
### echo "35 APIs Only"
|
|
||||||
### ./sdkmanager --install "system-images;android-35;google_apis;x86_64"
|
|
||||||
###
|
|
||||||
### exit 0
|
|
||||||
#
|
|
||||||
# These were the results:
|
|
||||||
#
|
|
||||||
### ~/SDKs/Android/Sdk/system-images]$ du -had2 | sort -h
|
|
||||||
### 1.7G ./android-35/default
|
|
||||||
### 2.2G ./android-35/google_apis_playstore
|
|
||||||
### 2.3G ./android-36/google_apis_playstore
|
|
||||||
### 3.5G ./android-35/google_apis
|
|
||||||
### 4.3G ./android-36/google_apis
|
|
||||||
### 6.6G ./android-36
|
|
||||||
### 7.3G ./android-35
|
|
||||||
### 14G .
|
|
||||||
|
|
||||||
# These are safe to run multiple times, and uses the new `latest` version.
|
# These are safe to run multiple times, and uses the new `latest` version.
|
||||||
- name: Workstation | Linux | Software | Android | Install Modules
|
- name: Workstation | Linux | Software | Android | Install | Required Modules
|
||||||
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
||||||
loop:
|
loop: "{{ android_downloads_required }}"
|
||||||
### 36 ###
|
|
||||||
- build-tools;36.0.0
|
|
||||||
- platforms;android-36
|
|
||||||
- sources;android-36
|
|
||||||
# Images
|
|
||||||
#- system-images;android-35;default;x86_64 # TODO: Switch once it exists.
|
|
||||||
- system-images;android-36;google_apis_playstore;x86_64
|
|
||||||
### 35 ###
|
|
||||||
- platforms;android-35
|
|
||||||
- sources;android-35
|
|
||||||
# Images
|
|
||||||
- system-images;android-35;default;x86_64
|
|
||||||
### 16 ###
|
|
||||||
- platforms;android-16
|
|
||||||
- sources;android-16
|
|
||||||
# Images
|
|
||||||
- system-images;android-16;default;x86
|
|
||||||
become_user: "{{ user }}"
|
become_user: "{{ user }}"
|
||||||
when: coding == true
|
when: coding == true
|
||||||
|
|
||||||
# Remove any versions which used to be part of this script and no longer used.
|
# Add more versions for testing across all the important platforms.
|
||||||
- name: Workstation | Linux | Software | Android | Remove Modules
|
- name: Workstation | Linux | Software | Android | Install | Additional Modules
|
||||||
|
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
||||||
|
loop: "{{ android_downloads_additional }}"
|
||||||
|
become_user: "{{ user }}"
|
||||||
|
when: coding == true and sdks == true
|
||||||
|
|
||||||
|
# Remove extra downloads if system is not meant for full amount of testing.
|
||||||
|
- name: Workstation | Linux | Software | Android | Uninstall | Additional Modules
|
||||||
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
||||||
loop:
|
loop: "{{ android_downloads_additional }}"
|
||||||
### 36 ###
|
become_user: "{{ user }}"
|
||||||
# Images
|
when: coding != true or sdks != true
|
||||||
- system-images;android-36;google_apis;x86_64
|
|
||||||
### 35 ###
|
# Remove any versions which used to be part of this script and no longer used.
|
||||||
- build-tools;35.0.0
|
- name: Workstation | Linux | Software | Android | Uninstall | Unused Modules
|
||||||
- build-tools;35.0.1
|
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
||||||
# Images
|
loop: "{{ android_downloads_unused }}"
|
||||||
- system-images;android-35;aosp_atd;x86_64 # ATD = Automated Test Device
|
|
||||||
- system-images;android-35;google_apis;x86_64
|
|
||||||
- system-images;android-35;google_apis_playstore;x86_64
|
|
||||||
### 34 ###
|
|
||||||
- build-tools;34.0.0
|
|
||||||
- platforms;android-34
|
|
||||||
- sources;android-34
|
|
||||||
# Images
|
|
||||||
- system-images;android-34;google_apis;x86_64
|
|
||||||
- system-images;android-34;google_apis_playstore;x86_64
|
|
||||||
### 16 ###
|
|
||||||
# Images
|
|
||||||
- system-images;android-16;google_apis;x86
|
|
||||||
### 15 ###
|
|
||||||
- platforms;android-15
|
|
||||||
- sources;android-15
|
|
||||||
# Images
|
|
||||||
- system-images;android-15;default;x86 # Not working in Android AVDs
|
|
||||||
become_user: "{{ user }}"
|
become_user: "{{ user }}"
|
||||||
when: coding == true
|
when: coding == true
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user