From 168aeb75b0e951bf15ac61ebfc3514c633140930 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Wed, 12 Jun 2024 01:05:38 +0000 Subject: [PATCH 01/11] Add android-arm support to evergreen launcher --- starboard/evergreen/shared/launcher.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/starboard/evergreen/shared/launcher.py b/starboard/evergreen/shared/launcher.py index 1a6536646c9e..1ef4b1b2f806 100644 --- a/starboard/evergreen/shared/launcher.py +++ b/starboard/evergreen/shared/launcher.py @@ -54,9 +54,6 @@ def __init__(self, platform, target_name, config, device_id, **kwargs): env_variables['ASAN_OPTIONS'] = ':'.join(asan_options) kwargs['env_variables'] = env_variables - # pylint: disable=super-with-arguments - super().__init__(platform, target_name, config, device_id, **kwargs) - self.loader_platform = kwargs.get('loader_platform') if not self.loader_platform: raise ValueError('|loader_platform| cannot be |None|.') @@ -65,6 +62,14 @@ def __init__(self, platform, target_name, config, device_id, **kwargs): if not self.loader_config: raise ValueError('|loader_config| cannot be |None|.') + # Add the suffix if running android-arm. APKs built for evergreen have + # the suffix appended to differentiate them from monolithic builds. + if 'android-arm' in self.loader_platform: + target_name = target_name + '_evergreen_loader' + + # pylint: disable=super-with-arguments + super().__init__(platform, target_name, config, device_id, **kwargs) + # RDK doesn't use our loader, therefore the test files are stored # in the folder named after the target if 'rdk' in self.loader_platform: @@ -184,6 +189,9 @@ def _StageTargetsAndContents(self): self._StageTargetsAndContentsRaspi() elif 'rdk' in self.loader_platform: self._StageTargetsAndContentsRdk() + elif 'android-arm' in self.loader_platform: + # No staging necessary for android-arm. + return else: raise ValueError(f"'{self.loader_platform}' is not recognized") From 54a7405d5043f657d185b962101b5cd577e8da10 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Wed, 12 Jun 2024 21:08:24 +0000 Subject: [PATCH 02/11] Reduce gradle workers to 4 per ninja job --- .github/actions/gn/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/gn/action.yaml b/.github/actions/gn/action.yaml index 47b10aa66a23..1ba3a688e713 100644 --- a/.github/actions/gn/action.yaml +++ b/.github/actions/gn/action.yaml @@ -15,7 +15,7 @@ runs: if: startsWith(${{matrix.target_platform}}, 'android') run: | echo "ANDROID_HOME=/root/starboard-toolchains/AndroidSdk/" >> $GITHUB_ENV - echo "COBALT_GRADLE_BUILD_COUNT=24" >> $GITHUB_ENV + echo "COBALT_GRADLE_BUILD_COUNT=4" >> $GITHUB_ENV PROJECT_NAME=$(gcloud config get-value project) echo "GCS_NIGHTLY_PATH=gs://${PROJECT_NAME}-build-artifacts" >> $GITHUB_ENV - name: GN From 3229d28ad30b98720a82fcbb8e424919f80e59c8 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Tue, 14 May 2024 15:07:53 -0700 Subject: [PATCH 03/11] Enable on-device tests b/291130824 --- .github/config/evergreen-arm-softfp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/config/evergreen-arm-softfp.json b/.github/config/evergreen-arm-softfp.json index 27b3b4da89be..7d6bfc8c694a 100644 --- a/.github/config/evergreen-arm-softfp.json +++ b/.github/config/evergreen-arm-softfp.json @@ -2,7 +2,7 @@ "docker_service": "build-android-evergreen", "evergreen_loader": "android-arm", "on_device_test": { - "enabled": false, + "enabled": true, "tests": [ "evergreen_test", "0", From 291f8c4abc2040eae668394e5ed9e2b774a5add4 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Thu, 16 May 2024 14:35:10 -0700 Subject: [PATCH 04/11] Fix GN issues --- .../android/shared/platform_configuration/configuration.gni | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/starboard/android/shared/platform_configuration/configuration.gni b/starboard/android/shared/platform_configuration/configuration.gni index 560dc3c83314..be277ebb0c8f 100644 --- a/starboard/android/shared/platform_configuration/configuration.gni +++ b/starboard/android/shared/platform_configuration/configuration.gni @@ -23,7 +23,9 @@ gtest_target_type = "shared_library" starboard_level_final_executable_type = "shared_library" starboard_level_gtest_target_type = "shared_library" -sb_enable_benchmark = true +# TODO: libbenchmark.so is not built by evergreen. +# Enabling it causes the EG AOSP build to fail due to it missing. +sb_enable_benchmark = false size_config_path = "//starboard/android/shared/platform_configuration:size" speed_config_path = "//starboard/android/shared/platform_configuration:speed" From 5772eda1e0448499a86c3544cef2975ded012b70 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Wed, 15 May 2024 16:26:08 -0700 Subject: [PATCH 05/11] Fix build target for eg AOSP Change-Id: I715f754fc40573584523009eb538cf43432f4b3b --- .github/actions/build/action.yaml | 78 ++++++++++++++++++++++++--- .github/workflows/main.yaml | 4 +- starboard/build/config/BUILDCONFIG.gn | 3 ++ 3 files changed, 75 insertions(+), 10 deletions(-) diff --git a/.github/actions/build/action.yaml b/.github/actions/build/action.yaml index 927ec0bec326..2669e388423e 100644 --- a/.github/actions/build/action.yaml +++ b/.github/actions/build/action.yaml @@ -17,23 +17,85 @@ runs: run: | set -x env - if [ -z ${COBALT_EVERGREEN_LOADER+x} ]; then - BUILD_PLATFORM=${{ matrix.target_platform }} - BUILD_TARGET=all - if [[ "${{matrix.config}}" =~ ^(qa|gold)$ ]]; then - BUILD_TARGET=default + + if [[ -z ${COBALT_EVERGREEN_LOADER+x} ]]; then + BUILD_PLATFORM="${{ matrix.target_platform }}" + BUILD_TARGET="default" + if [[ "${{ matrix.config }}" =~ ^(debug|devel)$ ]]; then + BUILD_TARGET="all" fi else - BUILD_PLATFORM=${COBALT_EVERGREEN_LOADER} - BUILD_TARGET='loader_app_install elf_loader_sandbox_install native_target/crashpad_handler' + # TODO: We should build evergreen compat targets here too. + # nplb_evergreen_loader_install + # nplb_evergreen_compat_tests_evergreen_loader_install + + BUILD_PLATFORM="${COBALT_EVERGREEN_LOADER}" + BUILD_TARGET="loader_app_install elf_loader_sandbox_install native_target/crashpad_handler" + + # TODO(todo): Use gn to query for targets. + # Specify build targets for EG AOSP loader build. + if [[ "${BUILD_PLATFORM}" == "android-arm" && "${{ matrix.config }}" =~ ^(debug|devel)$ ]]; then + BUILD_TARGET="${BUILD_TARGET} \ + audio_test_evergreen_loader_install \ + base_unittests_evergreen_loader_install \ + base_test_evergreen_loader_install \ + bindings_test_evergreen_loader_install \ + browser_test_evergreen_loader_install \ + components_metrics_tests_evergreen_loader_install \ + crypto_impl_test_evergreen_loader_install \ + crypto_unittests_evergreen_loader_install \ + csp_test_evergreen_loader_install \ + cssom_test_evergreen_loader_install \ + css_parser_test_evergreen_loader_install \ + cwrappers_test_evergreen_loader_install \ + dom_parser_test_evergreen_loader_install \ + dom_test_evergreen_loader_install \ + extension_test_evergreen_loader_install \ + graphics_system_test_evergreen_loader_install \ + js_profiler_test_evergreen_loader_install \ + layout_test_evergreen_loader_install \ + layout_tests_evergreen_loader_install \ + loader_test_evergreen_loader_install \ + math_test_evergreen_loader_install \ + media_capture_test_evergreen_loader_install \ + media_session_test_evergreen_loader_install \ + media_stream_test_evergreen_loader_install \ + media_test_evergreen_loader_install \ + memory_store_test_evergreen_loader_install \ + metrics_test_evergreen_loader_install \ + network_test_evergreen_loader_install \ + net_unittests_evergreen_loader_install \ + overlay_info_test_evergreen_loader_install \ + persistent_settings_test_evergreen_loader_install \ + png_utils_test_evergreen_loader_install \ + render_tree_test_evergreen_loader_install \ + renderer_test_evergreen_loader_install \ + scroll_engine_tests_evergreen_loader_install \ + speech_test_evergreen_loader_install \ + storage_test_evergreen_loader_install \ + text_encoding_test_evergreen_loader_install \ + watchdog_test_evergreen_loader_install \ + web_animations_test_evergreen_loader_install \ + webdriver_test_evergreen_loader_install \ + web_test_evergreen_loader_install \ + websocket_test_evergreen_loader_install \ + worker_test_evergreen_loader_install \ + xhr_test_evergreen_loader_install \ + zip_unittests_evergreen_loader_install" + fi fi + + # TODO(todo): Adapt image to GitHub and remove this. # GitHub Runners have home set to /github/home. if [ -d /root/starboard-toolchains ]; then ln -s /root/starboard-toolchains /github/home/starboard-toolchains fi - # Set Ninja output format + + # Set Ninja output format. NINJA_STATUS="[%e sec | %f/%t %u remaining | %c/sec | j%r] " + ninja -C ${GITHUB_WORKSPACE}/out/${BUILD_PLATFORM}_${{matrix.config}} ${BUILD_TARGET} + shell: bash - name: Show Sccache Stats run: sccache -s diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 71b6278e1de0..f287f390cca6 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -282,7 +282,7 @@ jobs: shell: bash run: | set -u - COBALT_EVERGREEN_LOADER="${{needs.initialize.outputs.evergreen_loader}}" + COBALT_EVERGREEN_LOADER="${{ needs.initialize.outputs.evergreen_loader }}" echo "COBALT_EVERGREEN_LOADER=${COBALT_EVERGREEN_LOADER}" >> $GITHUB_ENV # Build Evergreen loader for on-host tests if necessary. - name: Evergreen loader GN @@ -295,7 +295,7 @@ jobs: if: ${{ ( inputs.nightly == 'true' || github.event_name == 'schedule' ) && matrix.config != 'debug' }} uses: ./.github/actions/upload_nightly_artifacts - name: Upload Evergreen loader On Host Test Artifacts - if: ${{ needs.initialize.outputs.evergreen_loader != 'null' && matrix.config == 'devel' && needs.initialize.outputs.on_host_test == 'true'}} + if: ${{ needs.initialize.outputs.evergreen_loader != 'null' && matrix.config == 'devel' && needs.initialize.outputs.on_host_test == 'true' }} uses: ./.github/actions/upload_test_artifacts with: type: onhost diff --git a/starboard/build/config/BUILDCONFIG.gn b/starboard/build/config/BUILDCONFIG.gn index cc7eaab0d2b8..11c4d74e402c 100644 --- a/starboard/build/config/BUILDCONFIG.gn +++ b/starboard/build/config/BUILDCONFIG.gn @@ -613,6 +613,9 @@ template("shared_library") { } } + # TODO(todo): Targets that have an evergreen loader don't support the + # regular install target. This should be controlled in some manner + # other than target name. if (sb_is_evergreen_compatible && sb_evergreen_compatible_package && target_name != "loader_app") { evergreen_loader(original_target_name + "_evergreen_loader") { From 3aab619442cbcc988cdf381a767fb69ab65e7085 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Wed, 12 Jun 2024 22:48:30 +0000 Subject: [PATCH 06/11] Reduce workers for EG AOSP devel build Change-Id: Ibece0510d5e1ad9dd4f63a2f3ff10913739b0bf1 --- .github/actions/build/action.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/build/action.yaml b/.github/actions/build/action.yaml index 2669e388423e..def417691ea2 100644 --- a/.github/actions/build/action.yaml +++ b/.github/actions/build/action.yaml @@ -94,7 +94,12 @@ runs: # Set Ninja output format. NINJA_STATUS="[%e sec | %f/%t %u remaining | %c/sec | j%r] " - ninja -C ${GITHUB_WORKSPACE}/out/${BUILD_PLATFORM}_${{matrix.config}} ${BUILD_TARGET} + # TODO(todo): Half workers for EG AOSP build as it runs out of memory while building. + if [[ -n ${COBALT_EVERGREEN_LOADER} && "${BUILD_PLATFORM}" == "android-arm" ]]; then + ninja -j 16 -C ${GITHUB_WORKSPACE}/out/${BUILD_PLATFORM}_${{matrix.config}} ${BUILD_TARGET} + else + ninja -C ${GITHUB_WORKSPACE}/out/${BUILD_PLATFORM}_${{matrix.config}} ${BUILD_TARGET} + fi shell: bash - name: Show Sccache Stats From b10d8154c752b87e52e40381d21875900bcae453 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Thu, 13 Jun 2024 19:46:12 +0000 Subject: [PATCH 07/11] Add gradle clean up step Change-Id: Ica6b7a17a1d3c7ad77025c6a954070c7acf139d9 --- starboard/android/shared/install_target.gni | 28 +++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/starboard/android/shared/install_target.gni b/starboard/android/shared/install_target.gni index ad1b07bf7918..95493d629c67 100644 --- a/starboard/android/shared/install_target.gni +++ b/starboard/android/shared/install_target.gni @@ -30,6 +30,9 @@ template("install_target") { not_needed(invoker, [ "type" ]) installable_target_name = invoker.installable_target_name + target_output = "$root_out_dir/lib${installable_target_name}.so" + gradle_content_dir = "$sb_install_output_dir/$installable_target_name/$sb_install_content_subdir" + gradle_files_dir = "$root_out_dir/gradle/$installable_target_name" action("build_${target_name}_apk") { forward_variables_from(invoker, [ "testonly" ]) @@ -37,9 +40,6 @@ template("install_target") { deps = invoker.deps deps += [ ":$installable_target_name" ] - target_output = "$root_out_dir/lib${installable_target_name}.so" - gradle_content_dir = "$sb_install_output_dir/$installable_target_name/$sb_install_content_subdir" - gradle_files_dir = "$root_out_dir/gradle/$installable_target_name" if (is_gold) { gradle_build_type = "release" } else { @@ -93,9 +93,26 @@ template("install_target") { "-P", "evergreenCompatible=$sb_is_evergreen_compatible", "assembleCobalt_$gradle_build_type", + "-Dorg.gradle.daemon=$use_parallel_build", + "-Dorg.gradle.parallel=$use_parallel_build", "-Dorg.gradle.workers.max=$num_gradle_workers", - "-Dorg.gradle.workers.parallel=$use_parallel_build", - "-Dorg.gradle.workers.daemon=$use_parallel_build", + ] + } + + action("clean_${target_name}_gradle_files") { + forward_variables_from(invoker, [ "testonly" ]) + + deps = [ ":build_${invoker.target_name}_apk" ] + + # TODO: Fake output. + outputs = + [ "${target_out_dir}/${target_name}-${invoker.target_name}.stamp" ] + + script = "//starboard/build/run_bash.py" + args = [ + "rm", + "-rf", + rebase_path(gradle_files_dir), ] } @@ -104,6 +121,7 @@ template("install_target") { deps = [ ":$installable_target_name", ":build_${target_name}_apk", + ":clean_${target_name}_gradle_files", ] } } From 37139ad12566c1ffc9e9979865ec62b639ca0988 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Fri, 14 Jun 2024 00:25:01 +0000 Subject: [PATCH 08/11] test Change-Id: I31d01ec745f7c7e0fdd131bb0e4cb19c0f5b3435 --- .github/actions/build/action.yaml | 144 ++++++++++++++++++++---------- .github/actions/gn/action.yaml | 2 +- 2 files changed, 96 insertions(+), 50 deletions(-) diff --git a/.github/actions/build/action.yaml b/.github/actions/build/action.yaml index def417691ea2..daff112f2e4f 100644 --- a/.github/actions/build/action.yaml +++ b/.github/actions/build/action.yaml @@ -17,8 +17,7 @@ runs: run: | set -x env - - if [[ -z ${COBALT_EVERGREEN_LOADER+x} ]]; then + if [ -z ${COBALT_EVERGREEN_LOADER+x} ]; then BUILD_PLATFORM="${{ matrix.target_platform }}" BUILD_TARGET="default" if [[ "${{ matrix.config }}" =~ ^(debug|devel)$ ]]; then @@ -36,52 +35,98 @@ runs: # Specify build targets for EG AOSP loader build. if [[ "${BUILD_PLATFORM}" == "android-arm" && "${{ matrix.config }}" =~ ^(debug|devel)$ ]]; then BUILD_TARGET="${BUILD_TARGET} \ - audio_test_evergreen_loader_install \ - base_unittests_evergreen_loader_install \ - base_test_evergreen_loader_install \ - bindings_test_evergreen_loader_install \ - browser_test_evergreen_loader_install \ - components_metrics_tests_evergreen_loader_install \ - crypto_impl_test_evergreen_loader_install \ - crypto_unittests_evergreen_loader_install \ - csp_test_evergreen_loader_install \ - cssom_test_evergreen_loader_install \ - css_parser_test_evergreen_loader_install \ - cwrappers_test_evergreen_loader_install \ - dom_parser_test_evergreen_loader_install \ - dom_test_evergreen_loader_install \ - extension_test_evergreen_loader_install \ - graphics_system_test_evergreen_loader_install \ - js_profiler_test_evergreen_loader_install \ - layout_test_evergreen_loader_install \ - layout_tests_evergreen_loader_install \ - loader_test_evergreen_loader_install \ - math_test_evergreen_loader_install \ - media_capture_test_evergreen_loader_install \ - media_session_test_evergreen_loader_install \ - media_stream_test_evergreen_loader_install \ - media_test_evergreen_loader_install \ - memory_store_test_evergreen_loader_install \ - metrics_test_evergreen_loader_install \ - network_test_evergreen_loader_install \ - net_unittests_evergreen_loader_install \ - overlay_info_test_evergreen_loader_install \ - persistent_settings_test_evergreen_loader_install \ - png_utils_test_evergreen_loader_install \ - render_tree_test_evergreen_loader_install \ - renderer_test_evergreen_loader_install \ - scroll_engine_tests_evergreen_loader_install \ - speech_test_evergreen_loader_install \ - storage_test_evergreen_loader_install \ - text_encoding_test_evergreen_loader_install \ - watchdog_test_evergreen_loader_install \ - web_animations_test_evergreen_loader_install \ - webdriver_test_evergreen_loader_install \ - web_test_evergreen_loader_install \ - websocket_test_evergreen_loader_install \ - worker_test_evergreen_loader_install \ - xhr_test_evergreen_loader_install \ - zip_unittests_evergreen_loader_install" + audio_test \ + base_unittests \ + base_test \ + bindings_test \ + browser_test \ + components_metrics_tests \ + crypto_impl_test \ + crypto_unittests \ + csp_test \ + cssom_test \ + css_parser_test \ + cwrappers_test \ + dom_parser_test \ + dom_test \ + extension_test \ + graphics_system_test \ + js_profiler_test \ + layout_test \ + layout_tests \ + loader_test \ + math_test \ + media_capture_test \ + media_session_test \ + media_stream_test \ + media_test \ + memory_store_test \ + metrics_test \ + network_test \ + net_unittests \ + overlay_info_test \ + persistent_settings_test \ + png_utils_test \ + render_tree_test \ + renderer_test \ + scroll_engine_tests \ + speech_test \ + storage_test \ + text_encoding_test \ + watchdog_test \ + web_animations_test \ + webdriver_test \ + web_test \ + websocket_test \ + worker_test \ + xhr_test \ + zip_unittests" + BUILD_TARGET_INSTALL="audio_test_evergreen_loader_install \ + base_unittests_evergreen_loader_install \ + base_test_evergreen_loader_install \ + bindings_test_evergreen_loader_install \ + browser_test_evergreen_loader_install \ + components_metrics_tests_evergreen_loader_install \ + crypto_impl_test_evergreen_loader_install \ + crypto_unittests_evergreen_loader_install \ + csp_test_evergreen_loader_install \ + cssom_test_evergreen_loader_install \ + css_parser_test_evergreen_loader_install \ + cwrappers_test_evergreen_loader_install \ + dom_parser_test_evergreen_loader_install \ + dom_test_evergreen_loader_install \ + extension_test_evergreen_loader_install \ + graphics_system_test_evergreen_loader_install \ + js_profiler_test_evergreen_loader_install \ + layout_test_evergreen_loader_install \ + layout_tests_evergreen_loader_install \ + loader_test_evergreen_loader_install \ + math_test_evergreen_loader_install \ + media_capture_test_evergreen_loader_install \ + media_session_test_evergreen_loader_install \ + media_stream_test_evergreen_loader_install \ + media_test_evergreen_loader_install \ + memory_store_test_evergreen_loader_install \ + metrics_test_evergreen_loader_install \ + network_test_evergreen_loader_install \ + net_unittests_evergreen_loader_install \ + overlay_info_test_evergreen_loader_install \ + persistent_settings_test_evergreen_loader_install \ + png_utils_test_evergreen_loader_install \ + render_tree_test_evergreen_loader_install \ + renderer_test_evergreen_loader_install \ + scroll_engine_tests_evergreen_loader_install \ + speech_test_evergreen_loader_install \ + storage_test_evergreen_loader_install \ + text_encoding_test_evergreen_loader_install \ + watchdog_test_evergreen_loader_install \ + web_animations_test_evergreen_loader_install \ + webdriver_test_evergreen_loader_install \ + web_test_evergreen_loader_install \ + websocket_test_evergreen_loader_install \ + worker_test_evergreen_loader_install \ + xhr_test_evergreen_loader_install \ + zip_unittests_evergreen_loader_install" fi fi @@ -96,7 +141,8 @@ runs: # TODO(todo): Half workers for EG AOSP build as it runs out of memory while building. if [[ -n ${COBALT_EVERGREEN_LOADER} && "${BUILD_PLATFORM}" == "android-arm" ]]; then - ninja -j 16 -C ${GITHUB_WORKSPACE}/out/${BUILD_PLATFORM}_${{matrix.config}} ${BUILD_TARGET} + ninja -C ${GITHUB_WORKSPACE}/out/${BUILD_PLATFORM}_${{matrix.config}} ${BUILD_TARGET} + ninja -j 1 -C ${GITHUB_WORKSPACE}/out/${BUILD_PLATFORM}_${{matrix.config}} ${BUILD_TARGET_INSTALL} else ninja -C ${GITHUB_WORKSPACE}/out/${BUILD_PLATFORM}_${{matrix.config}} ${BUILD_TARGET} fi diff --git a/.github/actions/gn/action.yaml b/.github/actions/gn/action.yaml index 1ba3a688e713..1ce2f8a3a7b0 100644 --- a/.github/actions/gn/action.yaml +++ b/.github/actions/gn/action.yaml @@ -15,7 +15,7 @@ runs: if: startsWith(${{matrix.target_platform}}, 'android') run: | echo "ANDROID_HOME=/root/starboard-toolchains/AndroidSdk/" >> $GITHUB_ENV - echo "COBALT_GRADLE_BUILD_COUNT=4" >> $GITHUB_ENV + echo "COBALT_GRADLE_BUILD_COUNT=2" >> $GITHUB_ENV PROJECT_NAME=$(gcloud config get-value project) echo "GCS_NIGHTLY_PATH=gs://${PROJECT_NAME}-build-artifacts" >> $GITHUB_ENV - name: GN From b53dae26b5b45057f06d094679f1db239f7a8e08 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Thu, 20 Jun 2024 22:55:00 +0000 Subject: [PATCH 09/11] Add explicit crashpad dependecy to android apk Change-Id: I3c5b13a3d8fad52175c91f8923ff6dd83f94c946 --- starboard/android/shared/install_target.gni | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/starboard/android/shared/install_target.gni b/starboard/android/shared/install_target.gni index 95493d629c67..77e37262cb1c 100644 --- a/starboard/android/shared/install_target.gni +++ b/starboard/android/shared/install_target.gni @@ -40,6 +40,11 @@ template("install_target") { deps = invoker.deps deps += [ ":$installable_target_name" ] + # The gradle build expects libcrashpad_handler.so to be present in the out directory. + if (sb_is_evergreen_compatible) { + deps += [ "//starboard/loader_app:copy_crashpad_handler_named_as_so" ] + } + if (is_gold) { gradle_build_type = "release" } else { From d9d046bea780ebfd7b68ec2a8a465632c82bed3a Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Thu, 20 Jun 2024 22:55:22 +0000 Subject: [PATCH 10/11] Unify gradle paths Change-Id: Ia34dda84ff18817ecd019fb06c324af246d1d3a1 --- starboard/android/shared/install_target.gni | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/starboard/android/shared/install_target.gni b/starboard/android/shared/install_target.gni index 77e37262cb1c..d5b6cc46b2e3 100644 --- a/starboard/android/shared/install_target.gni +++ b/starboard/android/shared/install_target.gni @@ -67,8 +67,7 @@ template("install_target") { cobalt_gradle_dir = rebase_path(gradle_files_dir) cobalt_product_dir = rebase_path(root_out_dir) cobalt_library_dir = rebase_path(root_out_dir) - project_cache_dir = - rebase_path("$root_build_dir/gradle/$installable_target_name/cache") + project_cache_dir = rebase_path("$gradle_files_dir/cache") use_parallel_build = num_gradle_workers != "1" script = "//starboard/build/run_bash.py" From 0c869ae06370b672a31a0f3a62fd4cf7113701f3 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Thu, 19 Sep 2024 15:34:36 -0700 Subject: [PATCH 11/11] Only build default targets and nplb --- .github/actions/build/action.yaml | 101 ++---------------------------- 1 file changed, 5 insertions(+), 96 deletions(-) diff --git a/.github/actions/build/action.yaml b/.github/actions/build/action.yaml index daff112f2e4f..b907238a1e63 100644 --- a/.github/actions/build/action.yaml +++ b/.github/actions/build/action.yaml @@ -24,9 +24,7 @@ runs: BUILD_TARGET="all" fi else - # TODO: We should build evergreen compat targets here too. - # nplb_evergreen_loader_install - # nplb_evergreen_compat_tests_evergreen_loader_install + BUILD_PLATFORM="${COBALT_EVERGREEN_LOADER}" BUILD_TARGET="loader_app_install elf_loader_sandbox_install native_target/crashpad_handler" @@ -34,99 +32,10 @@ runs: # TODO(todo): Use gn to query for targets. # Specify build targets for EG AOSP loader build. if [[ "${BUILD_PLATFORM}" == "android-arm" && "${{ matrix.config }}" =~ ^(debug|devel)$ ]]; then - BUILD_TARGET="${BUILD_TARGET} \ - audio_test \ - base_unittests \ - base_test \ - bindings_test \ - browser_test \ - components_metrics_tests \ - crypto_impl_test \ - crypto_unittests \ - csp_test \ - cssom_test \ - css_parser_test \ - cwrappers_test \ - dom_parser_test \ - dom_test \ - extension_test \ - graphics_system_test \ - js_profiler_test \ - layout_test \ - layout_tests \ - loader_test \ - math_test \ - media_capture_test \ - media_session_test \ - media_stream_test \ - media_test \ - memory_store_test \ - metrics_test \ - network_test \ - net_unittests \ - overlay_info_test \ - persistent_settings_test \ - png_utils_test \ - render_tree_test \ - renderer_test \ - scroll_engine_tests \ - speech_test \ - storage_test \ - text_encoding_test \ - watchdog_test \ - web_animations_test \ - webdriver_test \ - web_test \ - websocket_test \ - worker_test \ - xhr_test \ - zip_unittests" - BUILD_TARGET_INSTALL="audio_test_evergreen_loader_install \ - base_unittests_evergreen_loader_install \ - base_test_evergreen_loader_install \ - bindings_test_evergreen_loader_install \ - browser_test_evergreen_loader_install \ - components_metrics_tests_evergreen_loader_install \ - crypto_impl_test_evergreen_loader_install \ - crypto_unittests_evergreen_loader_install \ - csp_test_evergreen_loader_install \ - cssom_test_evergreen_loader_install \ - css_parser_test_evergreen_loader_install \ - cwrappers_test_evergreen_loader_install \ - dom_parser_test_evergreen_loader_install \ - dom_test_evergreen_loader_install \ - extension_test_evergreen_loader_install \ - graphics_system_test_evergreen_loader_install \ - js_profiler_test_evergreen_loader_install \ - layout_test_evergreen_loader_install \ - layout_tests_evergreen_loader_install \ - loader_test_evergreen_loader_install \ - math_test_evergreen_loader_install \ - media_capture_test_evergreen_loader_install \ - media_session_test_evergreen_loader_install \ - media_stream_test_evergreen_loader_install \ - media_test_evergreen_loader_install \ - memory_store_test_evergreen_loader_install \ - metrics_test_evergreen_loader_install \ - network_test_evergreen_loader_install \ - net_unittests_evergreen_loader_install \ - overlay_info_test_evergreen_loader_install \ - persistent_settings_test_evergreen_loader_install \ - png_utils_test_evergreen_loader_install \ - render_tree_test_evergreen_loader_install \ - renderer_test_evergreen_loader_install \ - scroll_engine_tests_evergreen_loader_install \ - speech_test_evergreen_loader_install \ - storage_test_evergreen_loader_install \ - text_encoding_test_evergreen_loader_install \ - watchdog_test_evergreen_loader_install \ - web_animations_test_evergreen_loader_install \ - webdriver_test_evergreen_loader_install \ - web_test_evergreen_loader_install \ - websocket_test_evergreen_loader_install \ - worker_test_evergreen_loader_install \ - xhr_test_evergreen_loader_install \ - zip_unittests_evergreen_loader_install" + # TODO(oxv): We should build evergreen compat targets here too. + # nplb_evergreen_compat_tests_evergreen_loader_install + # TODO(oxv): Build all test targets. + BUILD_TARGET="${BUILD_TARGET} nplb_evergreen_loader_install" fi fi