mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #29909 - mrobinson:mach-bootstrap-macos, r=mukilan
Implement `./mach bootstrap` for MacOS <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they just change build scripts. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
a98dcfffe0
4 changed files with 20 additions and 6 deletions
3
.github/workflows/mac.yml
vendored
3
.github/workflows/mac.yml
vendored
|
@ -57,8 +57,7 @@ jobs:
|
||||||
- name: Bootstrap
|
- name: Bootstrap
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip virtualenv
|
python3 -m pip install --upgrade pip virtualenv
|
||||||
python3 ./mach bootstrap-gstreamer
|
python3 ./mach bootstrap
|
||||||
brew install gnu-tar
|
|
||||||
- name: Release build
|
- name: Release build
|
||||||
run: |
|
run: |
|
||||||
python3 ./mach build --release --with-${{ env.LAYOUT }}
|
python3 ./mach build --release --with-${{ env.LAYOUT }}
|
||||||
|
|
|
@ -23,12 +23,11 @@ manually, try the [manual build setup][manual-build].
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
- Install [Xcode](https://developer.apple.com/xcode/)
|
- 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 `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 `pip install virtualenv`
|
||||||
|
- Run `./mach bootstrap`<br/>
|
||||||
|
*Note: This will install the recommended version of GStreamer globally on your system.*
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# Runtime dependencies
|
# Runtime dependencies
|
||||||
|
|
||||||
brew "xz"
|
brew "xz"
|
||||||
|
brew "gnu-tar"
|
||||||
|
|
|
@ -54,6 +54,21 @@ class MacOS(Base):
|
||||||
return False
|
return False
|
||||||
return True
|
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:
|
def _platform_bootstrap_gstreamer(self, force: bool) -> bool:
|
||||||
if not force and self.is_gstreamer_installed(cross_compilation_target=None):
|
if not force and self.is_gstreamer_installed(cross_compilation_target=None):
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue