Skip to content

Commit

Permalink
Add Chrobalt build configs (#4248)
Browse files Browse the repository at this point in the history
This adds Chrobalt specific build configs into the build matrix

b/354062221
  • Loading branch information
kaidokert authored Oct 11, 2024
1 parent 7e79f1a commit 8b563ac
Show file tree
Hide file tree
Showing 15 changed files with 259 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build Cobalt
description: Builds Cobalt targets
name: Build Chrobalt
description: Builds Chrobalt targets
inputs:
targets:
description: "List of ninja targets for Chrobalt build."
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/docker/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Docker Image Build
description: Builds Cobalt build docker images.
description: Builds Chrobalt build docker images.
inputs:
docker_service:
description: "Docker compose service."
Expand Down
27 changes: 27 additions & 0 deletions .github/config/android-chrobalt-arm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

{
"docker_service": "linux",
"platforms": [
"android-chrobalt-arm"
],
"targets": [
"base_unittests",
"sql_unittests",
"net_unittests",
"url_unittests",
"ipc_tests",
"mojo_unittests",
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"system_webview_apk",
"system_webview_shell_apk"
],
"includes": [
{
"name":"arm",
"platform":"android-chrobalt-arm"
}
]
}
26 changes: 26 additions & 0 deletions .github/config/android-chrobalt-arm64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"docker_service": "linux",
"platforms": [
"android-chrobalt-arm64"
],
"targets": [
"base_unittests",
"sql_unittests",
"net_unittests",
"url_unittests",
"ipc_tests",
"mojo_unittests",
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"system_webview_apk",
"system_webview_shell_apk"
],
"includes": [
{
"name":"arm64",
"platform":"android-chrobalt-arm64"
}
]
}
26 changes: 26 additions & 0 deletions .github/config/android-chrobalt-x86.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"docker_service": "linux",
"platforms": [
"android-chrobalt-x86"
],
"targets": [
"base_unittests",
"sql_unittests",
"net_unittests",
"url_unittests",
"ipc_tests",
"mojo_unittests",
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"system_webview_apk",
"system_webview_shell_apk"
],
"includes": [
{
"name":"x86",
"platform":"android-chrobalt-x86"
}
]
}
24 changes: 24 additions & 0 deletions .github/config/linux-chrobalt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"docker_service": "linux",
"platforms": [
"linux-chrobalt-x64x11"
],
"targets": [
"base_unittests",
"sql_unittests",
"net_unittests",
"url_unittests",
"ipc_tests",
"mojo_unittests",
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell"
],
"includes": [
{
"name":"x64",
"platform":"linux-chrobalt-x64x11"
}
]
}
25 changes: 25 additions & 0 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,28 @@ jobs:
with:
platform: android-x86
nightly: ${{ github.event.inputs.nightly }}
# Chrobalt specific build configs
android-chrobalt-arm64:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: android-chrobalt-arm64
nightly: ${{ github.event.inputs.nightly }}
android-chrobalt-arm:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: android-chrobalt-arm
nightly: ${{ github.event.inputs.nightly }}
android-chrobalt-x86:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: android-chrobalt-x86
nightly: ${{ github.event.inputs.nightly }}
10 changes: 10 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
default: false

jobs:
# This is default Chromium build config
linux-x64:
uses: ./.github/workflows/main.yaml
permissions:
Expand All @@ -29,3 +30,12 @@ jobs:
with:
platform: linux
nightly: ${{ github.event.inputs.nightly }}
# This is default Chrobalt build config
linux-chrobalt:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: linux-chrobalt
nightly: ${{ github.event.inputs.nightly }}
6 changes: 3 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Reusable Cobalt CI workflow.
# Reusable Chrobalt CI workflow.

name: main

on:
workflow_call:
inputs:
platform:
description: 'Cobalt platform.'
description: 'Chrobalt platform.'
required: true
type: string
nightly:
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
SCCACHE_IDLE_TIMEOUT: 0 # prevent sccache server from shutting down after long idle.
# We want temp folder to be on tmpfs which makes workloads faster.
# However, dind container ends up having / folder mounted on overlay
# filesystem, whereas /__w which contains Cobalt source code is on tmpfs.
# filesystem, whereas /__w which contains Chrobalt source code is on tmpfs.
TMPDIR: /__w/_temp
steps:
- name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions chrobalt/build/configs/android-chrobalt-arm/args.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target_os = "android"
target_cpu = "arm"

is_chrobalt=true
4 changes: 4 additions & 0 deletions chrobalt/build/configs/android-chrobalt-arm64/args.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target_os = "android"
target_cpu = "arm64"

is_chrobalt=true
4 changes: 4 additions & 0 deletions chrobalt/build/configs/android-chrobalt-x86/args.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target_os = "android"
target_cpu = "x86"

is_chrobalt=true
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Use sccache
cc_wrapper = "sccache"
target_os = "linux"
target_cpu = "x64"

is_chrobalt=true

enable_nacl=false
use_dawn=false
skia_use_dawn=false
# enable_vulkan=false

use_ozone=true

# Enterprise stuff
enable_print_content_analysis=false
Expand Down Expand Up @@ -83,3 +86,4 @@ enable_vr=false
use_kerberos=false

toolkit_views = true
chrome_pgo_phase = 0
89 changes: 89 additions & 0 deletions chrobalt/build/configs/linux-x64/args.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
target_os = "linux"
target_cpu = "x64"

is_chrobalt=true

enable_nacl=false
use_dawn=false
skia_use_dawn=false
# enable_vulkan=false

use_ozone=true

# Enterprise stuff
enable_print_content_analysis=false
# enterprise_client_certificates=false
enterprise_cloud_content_analysis=false
enterprise_content_analysis=true
enterprise_data_controls=true
enterprise_local_content_analysis=false
enterprise_watermark=false


optional_trace_events_enabled = false
enable_plugins = false
enable_pdf = false
enable_printing = false
enable_cast_receiver = false
enable_paint_preview=false
cast_streaming_enable_remoting = false

#
enable_background_contents=false
enable_background_mode=false
enable_chrome_notifications=false
enable_click_to_call=false

enable_system_notifications=false

enable_webui_certificate_viewer=false

enable_hidpi = false

enable_library_cdms = false

# disable swiftshader
enable_swiftshader = false
enable_swiftshader_vulkan = false
swiftshader_optimized_debug_build=false
use_swiftshader_with_subzero=false
angle_enable_swiftshader=false
dawn_use_swiftshader=false


# Disable webnn neural networks | tflite
webnn_use_tflite = false
enable_maldoca = false
enable_reading_list = false
enable_remoting = false
enable_screen_ai_service = true

# linux system interfaces
use_bluez = false
use_cups = false
use_dbus = false
use_mpris = false
use_udev = false
use_qt = false
use_qt6 = false

# printing stuff
enable_oop_basic_print_dialog = false
enable_basic_print_dialog = false
enable_basic_printing = false
enable_oop_basic_print_dialog = false
enable_oop_printing = false
enable_oop_printing_no_oop_basic_print_dialog=false
enable_print_content_analysis= false
enable_print_preview=false
enable_printing=false
enable_printing_tests=false
use_cups=false

enable_vr=false

# Network stuff
use_kerberos=false

toolkit_views = true
chrome_pgo_phase = 0
11 changes: 8 additions & 3 deletions chrobalt/build/gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,15 @@ def main(out_directory: str, platform: str, build_type: str,
'-p',
'--platform',
default='linux',
choices=['linux-x64x11',
'android-arm',
choices=[
'linux-x64x11',
'linux-chrobalt-x64x11',
'android-arm',
'android-arm64',
'android-x86',
'android-x86',
'android-chrobalt-arm',
'android-chrobalt-arm64',
'android-chrobalt-x86',
'linux'],
help='The platform to build.')
parser.add_argument('-c',
Expand Down

0 comments on commit 8b563ac

Please sign in to comment.