From 63f02a6dcf0ff74f945944b04c66f9d73109599f Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Mon, 5 Jun 2017 14:44:41 -0400 Subject: [PATCH] Install sccache on all builders This is in a new `servo-build-dependencies.ci` SLS for 2 reasons: - sccache is a CI detail, not a hard dependency, so this separate file will not be invoked by `mach bootstrap` - Can target Windows without needing to update the main servo-build-depenendencies.init file for compatibility --- buildbot/master/files/config/environments.py | 1 + servo-build-dependencies/ci-map.jinja | 24 ++++++++++++++++++++ servo-build-dependencies/ci.sls | 14 ++++++++++++ top.sls | 3 +++ 4 files changed, 42 insertions(+) create mode 100644 servo-build-dependencies/ci-map.jinja create mode 100644 servo-build-dependencies/ci.sls diff --git a/buildbot/master/files/config/environments.py b/buildbot/master/files/config/environments.py index 185609c9..cda99bc0 100644 --- a/buildbot/master/files/config/environments.py +++ b/buildbot/master/files/config/environments.py @@ -63,6 +63,7 @@ def without(self, to_unset): r'C:\Program Files\Amazon\cfn-bootstrap', r'C:\Program Files\Git\cmd', r'C:\Program Files (x86)\WiX Toolset v3.10\bin', + r'C:\sccache', ]), 'SERVO_CACHE_DIR': r'C:\Users\Administrator\.servo', }) diff --git a/servo-build-dependencies/ci-map.jinja b/servo-build-dependencies/ci-map.jinja new file mode 100644 index 00000000..92ef466b --- /dev/null +++ b/servo-build-dependencies/ci-map.jinja @@ -0,0 +1,24 @@ +{% + set sccache = salt['grains.filter_by']({ + 'defaults': { + 'destination': '/usr/local/bin/sccache', + 'version': '2017-05-12', + }, + 'MacOS': { + 'platform': 'x86_64-apple-darwin', + 'sha384': 'b967518efa0d612baf683d3c69a73009fd00c3a58f8445f156701cd0c0579c4f4815890a6922a8f85989366e7cbe7940' + }, + 'Ubuntu': { + 'platform': 'x86_64-unknown-linux-musl', + 'sha384': '901e93dd5536c251f6daae8bfdcc7db1c430f419ceb6f47e25e1cdaf0671c7e465cfcb7bd7d6c683dbc7a2d7fdc45b83' + }, + 'Windows': { + 'destination': 'C:\sccache\sccache.exe', + 'platform': 'x86_64-pc-windows-msvc', + 'sha384': '96c83298fc00874371eb1e2ee3d30d0dcc35a34240a8782509019ed1d6477dd9cd888a40cf9af12ef74c935fa0585697' + } + }, + base='defaults', + grain='os', + ) +%} diff --git a/servo-build-dependencies/ci.sls b/servo-build-dependencies/ci.sls new file mode 100644 index 00000000..29c1d359 --- /dev/null +++ b/servo-build-dependencies/ci.sls @@ -0,0 +1,14 @@ +{% from 'common/map.jinja' import root %} +{% from tpldir ~ '/ci-map.jinja' import sccache %} + +sccache: + file.managed: + - name: {{ sccache.destination }} + - source: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/{{ sccache.version }}-sccache-{{ sccache.platform }} + - source_hash: sha384={{ sccache.sha384 }} + - user: {{ root.user }} + {% if grains['os'] != 'Windows' %} + - group: {{ root.group }} + - mode: 755 + {% endif %} + - makedirs: True diff --git a/top.sls b/top.sls index 1c457fc2..cb10c174 100644 --- a/top.sls +++ b/top.sls @@ -1,6 +1,9 @@ # NOTE: Ensure all node types are covered in .travis.yml base: + '*': + - servo-build-dependencies.ci + 'not G@os:Windows': - match: compound - admin