Bug 1694161 - run non-unified sanity targeting MacOS. r=firefox-build-system-reviewers,mhentges
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Sat, 27 Feb 2021 08:05:46 +0000
changeset 569018 2a6899090f7941ac78d5fce119e6e8bc97d98d14
parent 569017 0a1d820cfd7ce683b472e341d20805555668295c
child 569019 5978eab7b4a3964ceb73931018df219f4a5aba76
push id137355
push userbpostelnicu@mozilla.com
push dateSat, 27 Feb 2021 08:08:17 +0000
treeherderautoland@5978eab7b4a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, mhentges
bugs1694161
milestone88.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1694161 - run non-unified sanity targeting MacOS. r=firefox-build-system-reviewers,mhentges Differential Revision: https://phabricator.services.mozilla.com/D105977
taskcluster/ci/source-test/clang.yml
taskcluster/scripts/misc/source-test-clang-setup-macos64.sh
--- a/taskcluster/ci/source-test/clang.yml
+++ b/taskcluster/ci/source-test/clang.yml
@@ -18,18 +18,16 @@ job-defaults:
     treeherder:
         kind: other
         tier: 2
     run:
         using: run-task
         tooltool-downloads: public
     fetches:
         toolchain:
-            - linux64-clang
-            - linux64-rust
             - linux64-cbindgen
             - linux64-nasm
             - linux64-node
     when:
         # Extension list from https://hg.mozilla.org/mozilla-central/file/default/python/mozbuild/mozbuild/mach_commands.py#l1664
         files-changed:
             - '**/*.c'
             - '**/*.cpp'
@@ -48,17 +46,19 @@ tidy:
         symbol: cpp(clang-tidy)
     run:
         cwd: '{checkout}'
         command: >-
             source taskcluster/scripts/misc/source-test-clang-setup.sh &&
             ./mach --log-no-times static-analysis check --outgoing --output $HOME/clang-tidy.json --format json
     fetches:
         toolchain:
+            - linux64-clang
             - linux64-clang-tidy
+            - linux64-rust
     worker:
         artifacts:
             - type: file
               name: public/code-review/clang-tidy.json
               path: /builds/worker/clang-tidy.json
 
 format:
     description: Run clang-format on C/C++ patches
@@ -67,17 +67,19 @@ format:
     run:
         cwd: '{checkout}'
         command: >-
             source taskcluster/scripts/misc/source-test-clang-setup.sh &&
             ./mach --log-no-times clang-format --outgoing --output $HOME/clang-format.json --format json &&
             ./mach --log-no-times clang-format --outgoing --output $HOME/clang-format.diff --format diff
     fetches:
         toolchain:
+            - linux64-clang
             - linux64-clang-tidy
+            - linux64-rust
     worker:
         artifacts:
             - type: file
               name: public/code-review/clang-format.json
               path: /builds/worker/clang-format.json
             - type: file
               name: public/code-review/clang-format.diff
               path: /builds/worker/clang-format.diff
@@ -88,31 +90,57 @@ external:
         symbol: cpp(clang-tidy-external)
     run:
         cwd: '{checkout}'
         command: >-
             source taskcluster/scripts/misc/source-test-clang-setup.sh &&
             ./mach --log-no-times static-analysis check --checks="-*,mozilla-civet-*" --outgoing --output $HOME/clang-tidy.json --format json
     fetches:
         toolchain:
+            - linux64-clang
             - linux64-clang-tidy-external
+            - linux64-rust
     worker:
         artifacts:
             - type: file
               name: public/code-review/clang-tidy.json
               path: /builds/worker/clang-tidy.json
 
-non-unified:
+linux64-non-unified:
     description: Run syntax test for non-unified build on C/C++ files.
     treeherder:
-        symbol: cpp(non-unified)
+        symbol: cpp(non-unified-linux64)
         tier: 1
     attributes:
         code-review: false
     run-on-projects: ['integration']
     run:
         cwd: '{checkout}'
         command: >-
             source taskcluster/scripts/misc/source-test-clang-setup.sh &&
             taskcluster/scripts/misc/source-test-clang-non-unified.sh
     fetches:
         toolchain:
+            - linux64-clang
             - linux64-clang-tidy
+            - linux64-rust
+
+macosx64-non-unified:
+    description: Run syntax test for non-unified build on C/C++ files.
+    treeherder:
+        symbol: cpp(non-unified-macos64)
+        tier: 1
+    attributes:
+        code-review: false
+    run-on-projects: ['integration']
+    run:
+        cwd: '{checkout}'
+        command: >-
+            source taskcluster/scripts/misc/source-test-clang-setup-macos64.sh &&
+            taskcluster/scripts/misc/source-test-clang-non-unified.sh
+    fetches:
+        toolchain:
+            - linux64-llvm-dsymutil
+            - linux64-rust-macos
+            - linux64-rust-size
+            - linux64-cctools-port
+            - linux64-clang-macosx-cross
+            - macosx64-sdk-10.12
new file mode 100644
--- /dev/null
+++ b/taskcluster/scripts/misc/source-test-clang-setup-macos64.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+source $HOME/checkouts/gecko/taskcluster/scripts/misc/source-test-common.sh
+
+# Add clang-tidy to PATH
+export PATH=$MOZ_FETCHES_DIR/clang-tidy/bin:$PATH
+export PATH=$MOZ_FETCHES_DIR/cctools/bin:$MOZ_FETCHES_DIR/llvm-dsymutil/bin:$PATH
+
+# Use toolchain clang
+export LD_LIBRARY_PATH=$MOZ_FETCHES_DIR/clang/lib
+
+# Write custom mozconfig
+export MOZCONFIG=$GECKO_PATH/mozconfig
+
+# Add to mozconfig all the appropriate options
+cat <<EOT >> $MOZCONFIG
+# Enable debug mode
+ac_add_options --enable-debug
+# Enable GC zeal, a testing and debugging feature that helps find GC-related bugs in JSAPI applications.
+ac_add_options --enable-gczeal
+# Do not treat warnings as errors
+ac_add_options --disable-warnings-as-errors
+
+export MACOS_SDK_DIR=$MOZ_FETCHES_DIR/MacOSX10.12.sdk
+
+export DSYMUTIL=$GECKO_PATH/build/macosx/llvm-dsymutil
+mk_add_options "export REAL_DSYMUTIL=$MOZ_FETCHES_DIR/llvm-dsymutil/bin/dsymutil"
+
+ac_add_options --target=x86_64-apple-darwin
+
+EOT
+
+# Mach lookup clang-tidy in clang-tools
+mkdir -p $MOZBUILD_STATE_PATH/clang-tools
+ln -s $MOZ_FETCHES_DIR/clang-tidy $MOZBUILD_STATE_PATH/clang-tools/clang-tidy