aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-06-22 00:28:54 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-06-22 11:14:00 +0200
commita57c49a4bb5d5bbb69d7250e43334fada621e9b0 (patch)
tree924e008ab3179995d68c7ac798700324d48c79a3
parent7aaad0aa7eac2d0c98ff17091013fda77359397d (diff)
downloadservo-a57c49a4bb5d5bbb69d7250e43334fada621e9b0.tar.gz
servo-a57c49a4bb5d5bbb69d7250e43334fada621e9b0.zip
Implement `./mach bootstrap` for MacOS
-rw-r--r--.github/workflows/mac.yml3
-rw-r--r--README.md7
-rw-r--r--etc/homebrew/Brewfile1
-rw-r--r--python/servo/platform/macos.py15
4 files changed, 20 insertions, 6 deletions
diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml
index 2724f5044de..c169df3693f 100644
--- a/.github/workflows/mac.yml
+++ b/.github/workflows/mac.yml
@@ -57,8 +57,7 @@ jobs:
- name: Bootstrap
run: |
python3 -m pip install --upgrade pip virtualenv
- python3 ./mach bootstrap-gstreamer
- brew install gnu-tar
+ python3 ./mach bootstrap
- name: Release build
run: |
python3 ./mach build --release --with-${{ env.LAYOUT }}
diff --git a/README.md b/README.md
index 042065368de..efdf478175a 100644
--- a/README.md
+++ b/README.md
@@ -23,12 +23,11 @@ manually, try the [manual build setup][manual-build].
### macOS
- Install [Xcode](https://developer.apple.com/xcode/)
+- Install [Homebrew](https://brew.sh/)
- Run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
-- Run `./mach bootstrap-gstreamer`.
- *This will install the recommended version of GStreamer globally on your system.*
-- Run `brew bundle install --file=etc/homebrew/Brewfile`
- Run `pip install virtualenv`
-
+- Run `./mach bootstrap`<br/>
+ *Note: This will install the recommended version of GStreamer globally on your system.*
### Linux
diff --git a/etc/homebrew/Brewfile b/etc/homebrew/Brewfile
index 008f8628d59..b9a8874a0a5 100644
--- a/etc/homebrew/Brewfile
+++ b/etc/homebrew/Brewfile
@@ -1,3 +1,4 @@
# Runtime dependencies
brew "xz"
+brew "gnu-tar"
diff --git a/python/servo/platform/macos.py b/python/servo/platform/macos.py
index 0f5ca632b2f..38169e9a75a 100644
--- a/python/servo/platform/macos.py
+++ b/python/servo/platform/macos.py
@@ -54,6 +54,21 @@ class MacOS(Base):
return False
return True
+ def _platform_bootstrap(self, _cache_dir: str, force: bool) -> bool:
+ installed_something = False
+ try:
+ brewfile = os.path.join(util.SERVO_ROOT, "etc", "homebrew", "Brewfile")
+ output = subprocess.check_output(
+ ['brew', 'bundle', 'install', "--file", brewfile]
+ ).decode("utf-8")
+ print(output)
+ installed_something = "Installing" in output
+ except subprocess.CalledProcessError as e:
+ print("Could not run homebrew. Is it installed?")
+ raise e
+ installed_something |= self._platform_bootstrap_gstreamer(False)
+ return installed_something
+
def _platform_bootstrap_gstreamer(self, force: bool) -> bool:
if not force and self.is_gstreamer_installed(cross_compilation_target=None):
return False