Bug 1625806 - Build libotr as a toolchain dependency. r=darktrojan a=rjl
authorRob Lemley <rob@thunderbird.net>
Thu, 04 Jun 2020 01:55:18 +0000
changeset 39430 95d5fbf2c50e2a710d82f822262ff29cdd006eb2
parent 39429 6bf06da9c1b4268d5f6788e8b9a3de833f20a995
child 39431 695db41fd3cdcf24fea72f1ef998d28bb58ee561
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersdarktrojan, rjl
bugs1625806
Bug 1625806 - Build libotr as a toolchain dependency. r=darktrojan a=rjl The thirdparty build kind has problems with indexing that never really worked out. By using the existing toolchain kind we can rely on that indexing that has seen a lot more use and be more confident that it works right. Depends on D78205 Differential Revision: https://phabricator.services.mozilla.com/D78206
taskcluster/ci/thirdparty/kind.yml
taskcluster/ci/thirdparty/libotr.yml
taskcluster/ci/toolchain/kind.yml
taskcluster/ci/toolchain/libotr.yml
deleted file mode 100644
--- a/taskcluster/ci/thirdparty/kind.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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/.
----
-loader: taskgraph.loader.transform:loader
-
-kind-dependencies:
-    - toolchain
-
-transforms:
-    - comm_taskgraph.transforms.thirdparty:transforms
-    - taskgraph.transforms.job:transforms
-    - taskgraph.transforms.task:transforms
-
-jobs-from:
-    - libotr.yml
--- a/taskcluster/ci/toolchain/kind.yml
+++ b/taskcluster/ci/toolchain/kind.yml
@@ -1,19 +1,19 @@
 # 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/.
 ---
-loader: comm_taskgraph.loader.reference:loader
-base-path: taskcluster/ci
+loader: comm_taskgraph.loader.merge:loader
+reference-base-path: taskcluster/ci
 
 kind-dependencies:
     - fetch
 
-jobs:
+reference-jobs:
     - linux64-binutils
     - linux64-cbindgen
     - linux64-cctools-clang-9-port
     - linux64-cctools-port
     - linux64-clang
     - linux64-clang-7
     - linux64-clang-9
     - linux64-clang-macosx-cross
@@ -59,8 +59,17 @@ jobs:
     - win64-nasm
     - win64-pdbstr
     - win64-node
     - win64-rust
     - win64-rust-1.41
     - win64-rust-size
     - win64-sccache
     - win64-winchecksec
+
+transforms:
+    - taskgraph.transforms.try_job:transforms
+    - taskgraph.transforms.job:transforms
+    - taskgraph.transforms.cached_tasks:transforms
+    - taskgraph.transforms.task:transforms
+
+jobs-from:
+    - libotr.yml
rename from taskcluster/ci/thirdparty/libotr.yml
rename to taskcluster/ci/toolchain/libotr.yml
--- a/taskcluster/ci/thirdparty/libotr.yml
+++ b/taskcluster/ci/toolchain/libotr.yml
@@ -1,76 +1,72 @@
 # 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:
     description: 'libotr library build'
-    index:
-        product: thunderbird
-    treeherder:
-        symbol: libotr
+    worker-type: b-linux
     worker:
-        docker-image: {in-tree: "deb8-toolchain-build"}
-    when:
-        files-changed:
-            - comm/third_party/README.libgcrypt
-            - comm/third_party/README.libgpg-error
-            - comm/third_party/README.libotr
-            - comm/third_party/libgcrypt
-            - comm/third_party/libgpg-error
-            - comm/third_party/libotr
-    thirdparty:
-        script: 'build-libotr.sh'
-        artifact: 'libotr.tar.xz'
-
+        max-run-time: 1800
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        tier: 1
+    run-on-projects: []
+    run:
+        using: comm-toolchain-script
+        script: build-libotr.sh
+        toolchain-artifact: public/build/libotr.tar.xz
 
-libotr-linux64:
+linux32-libotr:
     treeherder:
-        platform: linux64/opt
-    thirdparty:
-        args: ['linux64']
-    toolchain:
-        - linux64-clang
-        - linux64-binutils
+        symbol: TL(lib32otr)
+    run:
+        arguments: ['linux32']
+    fetches:
+        toolchain:
+            - linux64-clang
+            - linux64-binutils
 
-libotr-linux32:
+linux64-libotr:
     treeherder:
-        platform: linux32/opt
-    thirdparty:
-        args: ['linux32']
-    toolchain:
-        - linux64-clang
-        - linux64-binutils
+        symbol: TL(libotr)
+    run:
+        arguments: ['linux64']
+    fetches:
+        toolchain:
+            - linux64-clang
+            - linux64-binutils
 
-libotr-macosx64:
+macosx64-libotr:
     worker:
         env:
             # We just use the browser manifest, since we don't need anything different
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-releng.manifest"
     treeherder:
-        platform: osx-cross/opt
+        symbol: TM(libotr)
     run:
+        arguments: ['macosx64']
         tooltool-downloads: internal
-    thirdparty:
-        args: ['macosx64']
-    toolchain:
-        - linux64-binutils
-        - linux64-cctools-port
-        - linux64-clang-macosx-cross
-        - linux64-llvm-dsymutil
+    fetches:
+        toolchain:
+            - linux64-binutils
+            - linux64-cctools-port
+            - linux64-clang-macosx-cross
+            - linux64-llvm-dsymutil
 
-libotr-win32:
+win32-libotr:
     worker:
         docker-image: {in-tree: tb-debian-mingw}
     treeherder:
-        platform: windows2012-32/opt
-    thirdparty:
-        args: ['win32']
+        symbol: TW32(libotr)
+    run:
+        arguments: ['win32']
 
-libotr-win64:
+win64-libotr:
     worker:
         docker-image: {in-tree: tb-debian-mingw}
     treeherder:
-        platform: windows2012-64/opt
-    thirdparty:
-        args: ['win64']
+        symbol: TW64(libotr)
+    run:
+        arguments: ['win64']