mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
mach: Expose a --skip-static-analysis
to mach boostrap
(#32587)
This should speed up runners which just need to run the WPT tests. Fixes #32582.
This commit is contained in:
parent
30dad2565f
commit
e331cc67c3
6 changed files with 15 additions and 10 deletions
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
sudo apt update
|
sudo apt update
|
||||||
python3 ./mach bootstrap
|
python3 ./mach bootstrap --skip-lints
|
||||||
- name: Set LIBCLANG_PATH # This is needed for bindgen in mozangle.
|
- name: Set LIBCLANG_PATH # This is needed for bindgen in mozangle.
|
||||||
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
|
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
|
||||||
- name: Compile docs
|
- name: Compile docs
|
||||||
|
|
2
.github/workflows/linux-wpt.yml
vendored
2
.github/workflows/linux-wpt.yml
vendored
|
@ -55,7 +55,7 @@ jobs:
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -qy --no-install-recommends mesa-vulkan-drivers
|
sudo apt install -qy --no-install-recommends mesa-vulkan-drivers
|
||||||
python3 ./mach bootstrap
|
python3 ./mach bootstrap --skip-lints
|
||||||
- name: Sync from upstream WPT
|
- name: Sync from upstream WPT
|
||||||
if: ${{ inputs.wpt-sync-from-upstream }}
|
if: ${{ inputs.wpt-sync-from-upstream }}
|
||||||
run: |
|
run: |
|
||||||
|
|
2
.github/workflows/mac-wpt.yml
vendored
2
.github/workflows/mac-wpt.yml
vendored
|
@ -45,7 +45,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
gtar -xzf target.tar.gz
|
gtar -xzf target.tar.gz
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
python3 ./mach bootstrap
|
python3 ./mach bootstrap --skip-lints
|
||||||
- name: Smoketest
|
- name: Smoketest
|
||||||
run: python3 ./mach smoketest --${{ inputs.profile }}
|
run: python3 ./mach smoketest --${{ inputs.profile }}
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|
|
@ -200,7 +200,8 @@ def bootstrap_command_only(topdir):
|
||||||
try:
|
try:
|
||||||
force = '-f' in sys.argv or '--force' in sys.argv
|
force = '-f' in sys.argv or '--force' in sys.argv
|
||||||
skip_platform = '--skip-platform' in sys.argv
|
skip_platform = '--skip-platform' in sys.argv
|
||||||
servo.platform.get().bootstrap(force, skip_platform)
|
skip_lints = '--skip-lints' in sys.argv
|
||||||
|
servo.platform.get().bootstrap(force, skip_platform, skip_lints)
|
||||||
except NotImplementedError as exception:
|
except NotImplementedError as exception:
|
||||||
print(exception)
|
print(exception)
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -43,12 +43,15 @@ class MachCommands(CommandBase):
|
||||||
@CommandArgument('--skip-platform',
|
@CommandArgument('--skip-platform',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Skip platform bootstrapping.')
|
help='Skip platform bootstrapping.')
|
||||||
def bootstrap(self, force=False, skip_platform=False):
|
@CommandArgument('--skip-lints',
|
||||||
|
action='store_true',
|
||||||
|
help='Skip tool necessary for linting.')
|
||||||
|
def bootstrap(self, force=False, skip_platform=False, skip_lints=False):
|
||||||
# Note: This entry point isn't actually invoked by ./mach bootstrap.
|
# Note: This entry point isn't actually invoked by ./mach bootstrap.
|
||||||
# ./mach bootstrap calls mach_bootstrap.bootstrap_command_only so that
|
# ./mach bootstrap calls mach_bootstrap.bootstrap_command_only so that
|
||||||
# it can install dependencies without needing mach's dependencies
|
# it can install dependencies without needing mach's dependencies
|
||||||
try:
|
try:
|
||||||
servo.platform.get().bootstrap(force, skip_platform)
|
servo.platform.get().bootstrap(force, skip_platform, skip_lints)
|
||||||
except NotImplementedError as exception:
|
except NotImplementedError as exception:
|
||||||
print(exception)
|
print(exception)
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -54,13 +54,14 @@ class Base:
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def bootstrap(self, force: bool, skip_platform: bool):
|
def bootstrap(self, force: bool, skip_platform: bool, skip_lints: bool):
|
||||||
installed_something = False
|
installed_something = False
|
||||||
if not skip_platform:
|
if not skip_platform:
|
||||||
installed_something |= self._platform_bootstrap(force)
|
installed_something |= self._platform_bootstrap(force)
|
||||||
installed_something |= self.install_taplo(force)
|
if not skip_lints:
|
||||||
installed_something |= self.install_cargo_deny(force)
|
installed_something |= self.install_taplo(force)
|
||||||
installed_something |= self.install_crown(force)
|
installed_something |= self.install_cargo_deny(force)
|
||||||
|
installed_something |= self.install_crown(force)
|
||||||
|
|
||||||
if not installed_something:
|
if not installed_something:
|
||||||
print("Dependencies were already installed!")
|
print("Dependencies were already installed!")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue