Bug 1386588 - Avoid wildcards in toolchain resources lists. r?gps
Those resources are used to compute a unique identifier for the
toolchain, and changes to those files will change the unique identifier,
and lead to the toolchain being rebuilt.
Using wildcards, especially in the build-clang directory, makes all the
files from there used for the unique identifier, even files irrelevant.
The side effect is that any change to any json file for clang toolchains
currently triggers *all* clang toolchains to be rebuilt, which is a
waste of resources and time.
But while it is tempting to list all the files involved, it is also
tedious and error-prone. Specifically, listing the relevant patch files
for clang toolchain builds is bound to end up outdated. OTOH, we're not
trying to mitigate bad actors here, but just to avoid shooting ourselves
in the foot. And patch files are, in practice, not changed. The jsons
are changed to reference them or not, but the patches themselves don't
change in relevant ways. They may be updated for new versions of clang,
which require a json change anyways. So we ignore the patch files.
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -12,17 +12,18 @@ linux64-clang:
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: desktop-build}
max-run-time: 36000
run:
using: toolchain-script
script: build-clang-linux.sh
resources:
- - 'build/build-clang/**'
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-linux64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-artifact: public/build/clang.tar.xz
toolchains:
- linux64-gcc
linux64-clang-tidy:
description: "Clang-tidy build"
index:
@@ -37,17 +38,18 @@ linux64-clang-tidy:
worker:
docker-image: {in-tree: desktop-build}
max-run-time: 36000
run:
using: toolchain-script
script: build-clang-tidy-linux.sh
resources:
- 'build/clang-plugin/**'
- - 'build/build-clang/**'
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-tidy-linux64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-artifact: public/build/clang-tidy.tar.xz
toolchains:
- linux64-gcc
linux64-gcc:
description: "GCC toolchain build"
treeherder:
@@ -58,17 +60,18 @@ linux64-gcc:
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: desktop-build}
max-run-time: 36000
run:
using: toolchain-script
script: build-gcc-linux.sh
resources:
- - 'build/unix/build-gcc/**'
+ - 'build/unix/build-gcc/build-gcc.sh'
+ - 'build/unix/build-gcc/checksums'
toolchain-artifact: public/build/gcc.tar.xz
linux64-binutils:
description: "Binutils toolchain build"
treeherder:
kind: build
platform: toolchains/opt
symbol: TL(binutil)
@@ -76,17 +79,17 @@ linux64-binutils:
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: desktop-build}
max-run-time: 36000
run:
using: toolchain-script
script: build-binutils-linux.sh
resources:
- - 'build/unix/build-binutils/**'
+ - 'build/unix/build-binutils/build-binutils.sh'
toolchain-artifact: public/build/binutils.tar.xz
linux64-cctools-port:
description: "cctools-port toolchain build"
treeherder:
kind: build
platform: toolchains/opt
symbol: TL(cctools)
@@ -114,17 +117,17 @@ linux64-hfsplus:
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: desktop-build}
max-run-time: 36000
run:
using: toolchain-script
script: build-hfsplus-linux.sh
resources:
- - 'build/unix/build-hfsplus/**'
+ - 'build/unix/build-hfsplus/build-hfsplus.sh'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-artifact: public/build/hfsplus-tools.tar.xz
toolchains:
- linux64-clang
linux64-libdmg:
description: "libdmg-hfsplus toolchain build"
treeherder:
--- a/taskcluster/ci/toolchain/macosx.yml
+++ b/taskcluster/ci/toolchain/macosx.yml
@@ -15,17 +15,18 @@ macosx64-clang:
max-run-time: 36000
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
run:
using: toolchain-script
script: build-clang-macosx.sh
tooltool-downloads: internal
resources:
- - 'build/build-clang/**'
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-macosx64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-artifact: public/build/clang.tar.xz
toolchains:
- linux64-cctools-port
- linux64-clang
- linux64-gcc
macosx64-clang-tidy:
@@ -45,17 +46,18 @@ macosx64-clang-tidy:
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
run:
using: toolchain-script
script: build-clang-tidy-macosx.sh
tooltool-downloads: internal
resources:
- 'build/clang-plugin/**'
- - 'build/build-clang/**'
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-tidy-macosx64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-artifact: public/build/clang-tidy.tar.xz
toolchains:
- linux64-cctools-port
- linux64-clang
- linux64-gcc
macosx64-cctools-port:
--- a/taskcluster/ci/toolchain/windows.yml
+++ b/taskcluster/ci/toolchain/windows.yml
@@ -13,17 +13,18 @@ win32-clang-cl:
worker:
max-run-time: 36000
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
run:
using: toolchain-script
script: build-clang32-windows.sh
resources:
- - 'build/build-clang/**'
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-win32.json'
- 'taskcluster/scripts/misc/build-clang-windows-helper32.sh'
toolchain-artifact: public/build/clang.tar.bz2
win64-clang-cl:
description: "Clang-cl toolchain build"
treeherder:
kind: build
platform: toolchains/opt
@@ -33,17 +34,18 @@ win64-clang-cl:
worker:
max-run-time: 36000
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
run:
using: toolchain-script
script: build-clang64-windows.sh
resources:
- - 'build/build-clang/**'
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-win64.json'
- 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
toolchain-artifact: public/build/clang.tar.bz2
win32-clang-tidy:
description: "Clang-tidy toolchain build"
index:
product: static-analysis
job-name: win32-clang-tidy
@@ -56,17 +58,19 @@ win32-clang-tidy:
worker:
max-run-time: 36000
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
run:
using: toolchain-script
script: build-clang-tidy32-windows.sh
resources:
- - 'build/build-clang/**'
+ - 'build/clang-plugin/**'
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-tidy-win32.json'
- 'taskcluster/scripts/misc/build-clang-windows-helper32.sh'
toolchain-artifact: public/build/clang-tidy.tar.bz2
win64-clang-tidy:
description: "Clang-tidy toolchain build"
index:
product: static-analysis
job-name: win64-clang-tidy
@@ -79,17 +83,19 @@ win64-clang-tidy:
worker:
max-run-time: 36000
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
run:
using: toolchain-script
script: build-clang-tidy64-windows.sh
resources:
- - 'build/build-clang/**'
+ - 'build/clang-plugin/**'
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-tidy-win32.json'
- 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
toolchain-artifact: public/build/clang-tidy.tar.bz2
win64-sccache:
description: "sccache toolchain build"
treeherder:
kind: build
platform: toolchains/opt