Skip to content
Permalink
Browse files

Update CI to use Clang instead of outdated GCC.

  • Loading branch information...
jdm committed May 6, 2019
1 parent 4328713 commit 8420b299ca18644c130e1cefbdba4f089b89b3a2
Showing with 64 additions and 17 deletions.
  1. +2 −0 appveyor.yml
  2. +37 −13 etc/ci/buildbot_steps.yml
  3. +16 −1 etc/taskcluster/decision_task.py
  4. +9 −3 python/servo/build_commands.py
@@ -32,6 +32,8 @@ environment:
C:\\Program Files\\AppVeyor\\BuildAgent;"
CC: "clang-cl.exe"
CXX: "clang-cl.exe"
LINKER: "lld-link.exe"
PYTHON3: "C:\\Python37-x64\\python.exe"

matrix:
- TARGET: nightly-x86_64-pc-windows-msvc
@@ -6,20 +6,32 @@ env:
GST_DEBUG: '3'

mac-rel-wpt2:
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
- ./mach test-wpt --release --processes 4 --total-chunks 6 --this-chunk 2 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed
- ./mach filter-intermittents wpt-errorsummary.log --log-intermittents intermittents.log --log-filteredsummary filtered-wpt-errorsummary.log --tracker-api default --reporter-api default

mac-rel-wpt3:
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
- ./mach test-wpt --release --processes 4 --total-chunks 6 --this-chunk 3 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed
- ./mach filter-intermittents wpt-errorsummary.log --log-intermittents intermittents.log --log-filteredsummary filtered-wpt-errorsummary.log --tracker-api default --reporter-api default

mac-rel-wpt4:
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
@@ -29,6 +41,10 @@ mac-rel-wpt4:
- ./mach filter-intermittents async-parsing-errorsummary.log --log-intermittents async-parsing-intermittents.log --log-filteredsummary filtered-async-parsing-errorsummary.log --tracker-api default --reporter-api default

mac-rel-css1:
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
@@ -37,6 +53,10 @@ mac-rel-css1:
- bash ./etc/ci/lockfile_changed.sh

mac-rel-css2:
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
@@ -45,8 +65,8 @@ mac-rel-css2:

linux-rel-intermittent:
env:
CC: gcc-5
CXX: g++-5
CC: clang-4.0
CXX: clang++-4.0
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
@@ -57,8 +77,8 @@ linux-rel-intermittent:

linux-rel-nogate:
env:
CC: gcc-5
CXX: g++-5
CC: clang-4.0
CXX: clang++-4.0
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
@@ -69,6 +89,10 @@ linux-rel-nogate:
- ./etc/ci/clean_build_artifacts.sh

mac-rel-intermittent:
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
@@ -78,8 +102,8 @@ linux-rel-wpt:
env:
CCACHE: sccache
RUSTC_WRAPPER: sccache
CC: gcc-5
CXX: g++-5
CC: clang-4.0
CXX: clang++-4.0
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
@@ -97,8 +121,8 @@ linux-rel-css:
env:
CCACHE: sccache
RUSTC_WRAPPER: sccache
CC: gcc-5
CXX: g++-5
CC: clang-4.0
CXX: clang++-4.0
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
@@ -111,8 +135,8 @@ linux-rel-css:

linux-nightly:
env:
CC: gcc-5
CXX: g++-5
CC: clang-4.0
CXX: clang++-4.0
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
@@ -154,18 +178,18 @@ magicleap-nightly:
arm64:
env:
AR: /usr/bin/aarch64-linux-gnu-ar
AS: /usr/bin/aarch64-linux-gnu-as
AS: /usr/bin/aarch64-linux-gnu-gcc
CC: /usr/bin/clang-4.0
CFLAGS: --target=aarch64-unknown-linux-gnu -I/usr/aarch64-linux-gnu/include/ -fuse-ld=/home/servo/buildbot/slave/arm64/build/support/arm64/fake-ld.sh -Wno-error=unused-command-line-argument
CPP: /usr/bin/clang-4.0 -E
CPPFLAGS: -I/usr/aarch64-linux-gnu/include
CXX: /usr/bin/clang++-4.0
CXXFLAGS: --target=aarch64-unknown-linux-gnu -I/usr/aarch64-linux-gnu/include/ -I/usr/aarch64-linux-gnu/include/c++/4.8.4/aarch64-linux-gnu -fuse-ld=/home/servo/buildbot/slave/arm64/build/support/arm64/fake-ld.sh -Wno-error=unused-command-line-argument
EXPAT_LIB_DIR: /usr/lib/aarch64-linux-gnu
HOST_CC: gcc-5
HOST_CC: clang-4.0
# test-tidy doesn't like empty strings
HOST_CFLAGS: --target=x86_64-unknown-linux-gnu
HOST_CXX: g++-5
HOST_CXX: clang++-4.0
# test-tidy doesn't like empty strings
HOST_CXXFLAGS: --target=x86_64-unknown-linux-gnu
LD: /usr/bin/aarch64-linux-gnu-ld
@@ -133,6 +133,10 @@ def mocked_only():
"LIB": "%HOMEDRIVE%%HOMEPATH%\\gst\\gstreamer\\1.0\\x86_64\\lib;%LIB%",
"GSTREAMER_1_0_ROOT_X86_64": "%HOMEDRIVE%%HOMEPATH%\\gst\\gstreamer\\1.0\\x86_64\\",
},
"all": {
"PYTHON3": "%HOMEDRIVE%%HOMEPATH%\\python3\\python.exe",
"LINKER": "lld-link.exe",
},
}

windows_sparse_checkout = [
@@ -256,6 +260,8 @@ def android_arm32_dev_from_macos():
macos_build_task("Dev build (macOS)")
.with_treeherder("Android ARMv7")
.with_script("""
export HOST_CC="$(brew --prefix llvm)/bin/clang"
export HOST_CXX="$(brew --prefix llvm)/bin/clang++"
./mach bootstrap-android --accept-all-licences --build
./mach build --android --dev
""")
@@ -685,9 +691,18 @@ def windows_build_task(name, package=True, arch="x86_64"):
task = (
windows_task(name)
.with_max_run_time_minutes(60)
.with_env(**build_env, **windows_build_env[arch])
.with_env(
**build_env,
**windows_build_env[arch],
**windows_build_env["all"]
)
.with_repo(sparse_checkout=windows_sparse_checkout)
.with_python2()
.with_directory_mount(
"https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-amd64.zip",
sha256="6de14c9223226cf0cd8c965ecb08c51d62c770171a256991b4fddc25188cfa8e",
path="python3",
)
.with_rustup()
.with_repacked_msi(
url=("https://gstreamer.freedesktop.org/data/pkg/windows/" +
@@ -309,6 +309,12 @@ def build(self, target=None, release=False, dev=False, jobs=None,
env["CC"] = "clang-cl.exe"
env["CXX"] = "clang-cl.exe"

host = host_triple()
if 'apple-darwin' in host and (not target or target == host):
if 'CXXFLAGS' not in env:
env['CXXFLAGS'] = ''
env["CXXFLAGS"] += "-mmacosx-version-min=10.10"

if android:
if "ANDROID_NDK" not in env:
print("Please set the ANDROID_NDK environment variable.")
@@ -550,7 +556,7 @@ def build(self, target=None, release=False, dev=False, jobs=None,

# The toolchain commands
env.setdefault("AR", path.join(env["ANDROID_TOOLCHAIN_DIR"], "bin", "aarch64-linux-android-ar"))
env.setdefault("AS", path.join(env["ANDROID_TOOLCHAIN_DIR"], "bin", "aarch64-linux-android-as"))
env.setdefault("AS", path.join(env["ANDROID_TOOLCHAIN_DIR"], "bin", "aarch64-linux-android-gcc"))
env.setdefault("CC", path.join(env["ANDROID_TOOLCHAIN_DIR"], "bin", "aarch64-linux-android-clang"))
env.setdefault("CPP", path.join(env["ANDROID_TOOLCHAIN_DIR"], "bin", "aarch64-linux-android-clang -E"))
env.setdefault("CXX", path.join(env["ANDROID_TOOLCHAIN_DIR"], "bin", "aarch64-linux-android-clang++"))
@@ -563,8 +569,8 @@ def build(self, target=None, release=False, dev=False, jobs=None,
# Undo all of that when compiling build tools for the host
env.setdefault("HOST_CFLAGS", "")
env.setdefault("HOST_CXXFLAGS", "")
env.setdefault("HOST_CC", "gcc")
env.setdefault("HOST_CXX", "g++")
env.setdefault("HOST_CC", "/usr/local/opt/llvm/bin/clang")
env.setdefault("HOST_CXX", "/usr/local/opt/llvm/bin/clang++")
env.setdefault("HOST_LD", "ld")

# Some random build configurations

0 comments on commit 8420b29

Please sign in to comment.
You can’t perform that action at this time.