Bug 1883806 - Setup CI jobs for iOS and iOS Simulator builds. r=firefox-build-system-reviewers,taskgraph-reviewers,releng-reviewers,jcristau,ahochheiden

Differential Revision: https://phabricator.services.mozilla.com/D203702
This commit is contained in:
Mike Hommey 2024-03-11 20:12:28 +00:00
parent ed1b29169a
commit f41ed66b89
14 changed files with 269 additions and 4 deletions

View file

@ -225,13 +225,27 @@ with only_when(target_is_ios):
) )
def ios_sdk_min_version(): def ios_sdk_min_version():
return "16.4" return "17.4"
@depends("--with-ios-sdk", host, target) @depends(target)
def ios_sdk_name(target):
return "iPhone{}{}.sdk".format(
"Simulator" if target.raw_os == "ios-sim" else "OS",
ios_sdk_min_version(),
)
@depends(
"--with-ios-sdk",
host,
target,
bootstrap_path(ios_sdk_name, when=depends("--with-ios-sdk")(lambda x: not x)),
)
@imports(_from="__builtin__", _import="Exception") @imports(_from="__builtin__", _import="Exception")
@imports(_from="os.path", _import="isdir") @imports(_from="os.path", _import="isdir")
@imports(_from="os", _import="listdir") @imports(_from="os", _import="listdir")
def ios_sdk(sdk, host, target): def ios_sdk(sdk, host, target, bootstrapped):
if bootstrapped:
sdk = [bootstrapped]
if sdk: if sdk:
sdk = sdk[0] sdk = sdk[0]
try: try:

View file

@ -0,0 +1,3 @@
. $topsrcdir/mobile/ios/config/mozconfigs/ios-sim/opt
ac_add_options --enable-debug

View file

@ -0,0 +1,8 @@
ac_add_options --enable-project=mobile/ios
ac_add_options --target=aarch64-apple-ios-sim
ac_add_options --disable-tests
ac_add_options --enable-clang-plugin
ac_add_options --disable-warnings-as-errors
. "$topsrcdir/build/mozconfig.cache"
. "$topsrcdir/build/mozconfig.automation"

View file

@ -0,0 +1,3 @@
. $topsrcdir/mobile/ios/config/mozconfigs/ios/opt
ac_add_options --enable-debug

View file

@ -0,0 +1,8 @@
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_CHECK=0
. $topsrcdir/mobile/ios/config/mozconfigs/ios/opt
ac_add_options --enable-debug
ac_add_options --enable-mozsearch-plugin

View file

@ -0,0 +1,7 @@
ac_add_options --enable-project=mobile/ios
ac_add_options --disable-tests
ac_add_options --enable-clang-plugin
ac_add_options --disable-warnings-as-errors
. "$topsrcdir/build/mozconfig.cache"
. "$topsrcdir/build/mozconfig.automation"

View file

@ -42,6 +42,7 @@ EXCLUSIVE_COMPONENTS = [
"linux", "linux",
"macosx", "macosx",
"windows", "windows",
"ios",
# broad test harness categories # broad test harness categories
"awsy", "awsy",
"condprofile", "condprofile",

View file

@ -0,0 +1,127 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
job-defaults:
index:
product: firefox
treeherder:
tier: 2
worker-type: b-linux-gcp
worker:
max-run-time: 7200
run-on-projects: ['mozilla-central']
run:
using: mozharness
actions: [get-secrets, build]
secrets: true
script: "mozharness/scripts/fx_desktop_build.py"
config:
- builds/releng_base_firefox.py
extra-config:
app_name: mobile/ios
stage_platform: ios
disable_package_metrics: true
use-sccache: true
fetches:
toolchain:
- linux64-cctools-port
- linux64-clang
- linux64-dump_syms
- linux64-hfsplus
- linux64-libdmg
- linux64-rust-ios
- linux64-rust-size
- linux64-cbindgen
- linux64-nasm
- linux64-node
- linux64-sccache
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
ios/debug:
description: "ios debug"
index:
job-name: ios-debug
treeherder:
platform: ios/debug
symbol: B
run:
extra-config:
mozconfig_platform: ios
mozconfig-variant: debug
fetches:
toolchain:
- ios-sdk
ios/opt:
description: "ios opt"
index:
job-name: ios-opt
treeherder:
platform: ios/opt
symbol: B
run:
extra-config:
mozconfig_platform: ios
mozconfig-variant: opt
fetches:
toolchain:
- ios-sdk
ios-non-unified/plain:
description: "ios non-unified"
index:
job-name: ios-non-unified-plain
treeherder:
platform: ios/plain
symbol: Bp-nu
worker:
env:
PERFHERDER_EXTRA_OPTIONS: non-unified
MOZ_AUTOMATION_BUILD_SYMBOLS: '0'
run:
extra-config:
mozconfig_platform: ios
extra_mozconfig_content:
- ac_add_options --disable-unified-build
mozconfig-variant: opt
fetches:
toolchain:
- ios-sdk
ios-sim/debug:
description: "ios-sim debug"
index:
job-name: ios-sim-debug
treeherder:
platform: ios/debug
symbol: Bsim
worker:
env:
PERFHERDER_EXTRA_OPTIONS: ios-sim
run:
extra-config:
mozconfig_platform: ios-sim
mozconfig-variant: debug
fetches:
toolchain:
- ios-sim-sdk
ios-sim/opt:
description: "ios-sim opt"
index:
job-name: ios-sim-opt
treeherder:
platform: ios/opt
symbol: Bsim
worker:
env:
PERFHERDER_EXTRA_OPTIONS: ios-sim
run:
extra-config:
mozconfig_platform: ios-sim
mozconfig-variant: opt
fetches:
toolchain:
- ios-sim-sdk

View file

@ -22,6 +22,7 @@ jobs-from:
- android.yml - android.yml
- android-asan.yml - android-asan.yml
- android-stuff.yml - android-stuff.yml
- ios.yml
- linux.yml - linux.yml
- linux-base-toolchains.yml - linux-base-toolchains.yml
- macosx.yml - macosx.yml

View file

@ -99,6 +99,46 @@ jobs:
- sysroot-x86_64-linux-gnu - sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi - sysroot-wasm32-wasi
ios-searchfox/debug:
description: "ios Debug Cross-compile Searchfox"
index:
job-name: ios-searchfox-debug
treeherder:
platform: ios/debug
worker-type: b-linux-gcp
worker:
max-run-time: 10800
env:
PERFHERDER_EXTRA_OPTIONS: searchfox
MOZSEARCH_PLATFORM: "ios"
run:
using: mozharness
actions: [get-secrets, build]
config:
- builds/releng_base_firefox.py
script: "mozharness/scripts/fx_desktop_build.py"
secrets: true
keep-artifacts: false
extra-config:
app_name: mobile/ios
stage_platform: ios
mozconfig_platform: ios
disable_package_metrics: true
mozconfig-variant: debug-searchfox
fetches:
toolchain:
- linux64-clang
- linux64-hfsplus
- linux64-libdmg
- linux64-nasm
- linux64-node
- linux64-rust-ios
- linux64-cbindgen
- linux64-dump_syms
- ios-sdk
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
win64-searchfox/debug: win64-searchfox/debug:
description: "Win64 Searchfox Debug (clang-cl)" description: "Win64 Searchfox Debug (clang-cl)"
index: index:

View file

@ -46,3 +46,39 @@ macosx64-sdk-14.2:
- macosx64-sdk - macosx64-sdk
- macosx64-sdk-toolchain - macosx64-sdk-toolchain
- MacOSX14.2.sdk - MacOSX14.2.sdk
ios-sdk-17.4:
description: "iPhoneOS17.4 SDK"
treeherder:
symbol: TM(ios17.4)
# Because it's using an internal tooltool artifact, it can't be used as a local-toolchain for
# bootstrap. But we still want to use the same script as local-toolchains.
attributes:
local-toolchain: false
run:
script: private_local_toolchain.sh
arguments:
- unpack-sdk.py
- http://taskcluster/tooltool.mozilla-releng.net/sha512/7d9f1f1e0d4963fbafc8ec20ee604665e99d66699db2515f388b3b061aaab83349815e1ef862922f4f46ffbe1ac2d86fb00701802c7a9994c74f6e1d32894c34
- 7d9f1f1e0d4963fbafc8ec20ee604665e99d66699db2515f388b3b061aaab83349815e1ef862922f4f46ffbe1ac2d86fb00701802c7a9994c74f6e1d32894c34
- Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
toolchain-artifact: project/gecko/mac-sdk/iPhoneOS17.4.sdk.tar.zst
toolchain-alias: ios-sdk
ios-sim-sdk-17.4:
description: "iPhoneSimulator17.4 SDK"
treeherder:
symbol: TM(ios-sim-17.4)
# Because it's using an internal tooltool artifact, it can't be used as a local-toolchain for
# bootstrap. But we still want to use the same script as local-toolchains.
attributes:
local-toolchain: false
run:
script: private_local_toolchain.sh
arguments:
- unpack-sdk.py
- http://taskcluster/tooltool.mozilla-releng.net/sha512/7d9f1f1e0d4963fbafc8ec20ee604665e99d66699db2515f388b3b061aaab83349815e1ef862922f4f46ffbe1ac2d86fb00701802c7a9994c74f6e1d32894c34
- 7d9f1f1e0d4963fbafc8ec20ee604665e99d66699db2515f388b3b061aaab83349815e1ef862922f4f46ffbe1ac2d86fb00701802c7a9994c74f6e1d32894c34
- Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
toolchain-artifact: project/gecko/mac-sdk/iPhoneSimulator17.4.sdk.tar.zst
toolchain-alias: ios-sim-sdk

View file

@ -134,6 +134,20 @@ linux64-rust-macos-1.76:
] ]
toolchain-alias: linux64-rust-macos toolchain-alias: linux64-rust-macos
linux64-rust-ios-1.76:
description: "rust repack with ios-cross support"
treeherder:
symbol: TL(rust-ios)
run:
arguments: [
'--channel', '1.76.0',
'--host', 'x86_64-unknown-linux-gnu',
'--target', 'x86_64-unknown-linux-gnu',
'--target', 'aarch64-apple-ios',
'--target', 'aarch64-apple-ios-sim',
]
toolchain-alias: linux64-rust-ios
linux64-rust-android-1.76: linux64-rust-android-1.76:
description: "rust repack with android-cross support" description: "rust repack with android-cross support"
treeherder: treeherder:

View file

@ -1072,6 +1072,7 @@ def target_tasks_searchfox(full_task_graph, parameters, graph_config):
"searchfox-macosx64-searchfox/debug", "searchfox-macosx64-searchfox/debug",
"searchfox-win64-searchfox/debug", "searchfox-win64-searchfox/debug",
"searchfox-android-armv7-searchfox/debug", "searchfox-android-armv7-searchfox/debug",
"searchfox-ios-searchfox/debug",
"source-test-file-metadata-bugzilla-components", "source-test-file-metadata-bugzilla-components",
"source-test-file-metadata-test-info-all", "source-test-file-metadata-test-info-all",
"source-test-wpt-metadata-summary", "source-test-wpt-metadata-summary",

View file

@ -1486,8 +1486,10 @@ items from that key's value."
if build_platform == "android-geckoview-docs": if build_platform == "android-geckoview-docs":
return return
main_platform = "android" main_platform = "android"
elif build_platform.startswith("ios"):
return
else: else:
err = "Build platform {} didn't start with 'mac', 'linux', 'win', or 'android'".format( err = "Build platform {} didn't start with 'mac', 'linux', 'win', 'android' or 'ios'".format(
build_platform build_platform
) )
self.fatal(err) self.fatal(err)