Skip to content

Commit

Permalink
Remove raspi 2 monolithic builders (#1858)
Browse files Browse the repository at this point in the history
Change default raspi builders to modular from monolithic

Raspi- sb version13 , 14 monolithic builders can't be built modularly(
as building modularly requires sb15 and above . These builders are
removed from the build matrix. Note that sb version 13, 14 are being
built by evergreen.

Make raspi-2-skia build modularly.

b/307977106
  • Loading branch information
niranjanyardi authored Oct 27, 2023
1 parent 24e20dd commit 74a344b
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 80 deletions.
28 changes: 0 additions & 28 deletions .github/config/raspi-2-modular.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/config/raspi-2-skia.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"platform":"raspi-2-skia",
"target_platform":"raspi-2-skia",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments": "is_clang=false"
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false"
}
]
}
24 changes: 2 additions & 22 deletions .github/config/raspi-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
},
"platforms": [
"raspi-2",
"raspi-2-sbversion-13",
"raspi-2-sbversion-14",
"raspi-2-sbversion-15"
],
"includes": [
Expand All @@ -24,33 +22,15 @@
"platform":"raspi-2",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments": "is_clang=false",
"dimension": "release_version=regex:10.*"
},
{
"name":"sbversion-13",
"platform":"raspi-2-sbversion-13",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"is_clang=false",
"sb_api_version": "sb_api_version=13",
"dimension": "release_version=regex:10.*"
},
{
"name":"sbversion-14",
"platform":"raspi-2-sbversion-14",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"is_clang=false",
"sb_api_version": "sb_api_version=14",
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false",
"dimension": "release_version=regex:10.*"
},
{
"name":"sbversion-15",
"platform":"raspi-2-sbversion-15",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"is_clang=false",
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false",
"sb_api_version": "sb_api_version=15",
"dimension": "release_version=regex:10.*"
}
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/raspi-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,3 @@ jobs:
with:
platform: raspi-2-skia
nightly: ${{ github.event.inputs.nightly }}
raspi-2-modular:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: raspi-2-modular
nightly: ${{ github.event.inputs.nightly }}
modular: true
3 changes: 2 additions & 1 deletion starboard/raspi/2/args.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
target_platform = "raspi-2"
target_os = "linux"
target_cpu = "arm"
is_clang = false
build_with_separate_cobalt_toolchain = true
use_asan = false
6 changes: 6 additions & 0 deletions starboard/raspi/2/skia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ static_library("starboard_platform") {
configs += [ "//starboard/build/config:starboard_implementation" ]
public_deps = [ "//starboard/raspi/shared:starboard_platform" ]
}

if (build_with_separate_cobalt_toolchain) {
group("starboard_platform_with_main") {
deps = [ "//starboard/raspi/2:starboard_platform_with_main" ]
}
}
19 changes: 19 additions & 0 deletions starboard/raspi/2/skia/starboard_loader.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2023 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "starboard/event.h"

int main(int argc, char** argv) {
return SbRunStarboardMain(argc, argv, SbEventHandle);
}
21 changes: 21 additions & 0 deletions starboard/raspi/2/skia/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import("//build/config/clang/clang.gni")
import("//build/toolchain/gcc_toolchain.gni")
import("//starboard/build/toolchain/cobalt_toolchains.gni")
import("//starboard/raspi/shared/toolchain/raspi_shared_toolchain.gni")

gcc_toolchain("target") {
Expand All @@ -29,3 +30,23 @@ gcc_toolchain("target") {
is_clang = false
}
}

cobalt_clang_toolchain("cobalt") {
variables = {
native_linker_path = gcc_toolchain_cxx
}
}

gcc_toolchain("starboard") {
cc = gcc_toolchain_cc
cxx = gcc_toolchain_cxx
ld = cxx

ar = gcc_toolchain_ar

tail_lib_dependencies = "-l:libpthread.so.0 -l:libdl.so.2"

toolchain_args = {
is_clang = false
}
}
8 changes: 3 additions & 5 deletions starboard/raspi/shared/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
from starboard.tools import abstract_launcher
from starboard.shared import retry

IS_MODULAR_BUILD = os.getenv('MODULAR_BUILD', '0') == '1'


class TargetPathError(ValueError):
pass
Expand Down Expand Up @@ -146,9 +144,9 @@ def _GetAndCheckTestFile(self, target_name):
def _GetAndCheckTestFileWithFallback(self):
try:
return self._GetAndCheckTestFile(self.target_name + '_loader')
except TargetPathError as e:
if IS_MODULAR_BUILD:
raise e
except TargetPathError:
# For starboard level test targets like player_filter_tests built as an
# executable, return the target name.
return self._GetAndCheckTestFile(self.target_name)

def _InitPexpectCommands(self):
Expand Down
14 changes: 0 additions & 14 deletions starboard/raspi/shared/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,9 @@
# limitations under the License.
"""Starboard Raspberry Pi Platform Test Filters."""

import os
from starboard.tools.testing import test_filter

# pylint: disable=line-too-long
_MODULAR_BUILD_FILTERED_TESTS = {
'nplb': [
'SbSystemGetStackTest.SunnyDayStackDirection',
'SbSystemGetStackTest.SunnyDay',
'SbSystemGetStackTest.SunnyDayShortStack',
'SbSystemSymbolizeTest.SunnyDay'
'MemoryReportingTest.CapturesOperatorDeleteNothrow',
'SbAudioSinkTest.*', 'SbDrmTest.AnySupportedKeySystems'
],
'player_filter_tests': [test_filter.FILTER_ALL],
}

_FILTERED_TESTS = {
'nplb': [
Expand Down Expand Up @@ -62,8 +50,6 @@
'PlayerComponentsTests/PlayerComponentsTest.*',
],
}
if os.getenv('MODULAR_BUILD', '0') == '1':
_FILTERED_TESTS = _MODULAR_BUILD_FILTERED_TESTS


class TestFilters(object):
Expand Down

0 comments on commit 74a344b

Please sign in to comment.