aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/post_build_commands.py
Commit message (Collapse)AuthorAgeFilesLines
* mach: Extract binary select into common_command_arguments (#33205)Samson2024-08-281-19/+12
| | | | | | | | | | | | | | | | | | | * Extract binary select into common_command_arguments Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixups Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Small English edit Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* mach: introduce `BuildTarget` abstraction (#33114)Mukilan Thiyagarajan2024-08-261-6/+6
| | | | | | | | | | | | | | | | Introduce a new `BuildTarget` abstraction to centralize the code for supporting different ways of choosing the build target (e.g --android, --target x86_64-linux-android , --target aarch64-linux-ohos). This is currently handled in an adhoc fashion in different commands ( mach package, install, run) leading to a proliferation of keyword parameters for the commands and duplicated logic. The patch introduces a new `allow_target_configuration` decorator to do the validation and parsing of these parameters into the appropriate `BuildTarget` subclass, which is now stored as an instance attribute of the CommandBase class. All the code that previously relied on `self.cross_compile_target` has been switched to use the BuildTarget. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: fix application name used in ./mach run (#32652)Mukilan Thiyagarajan2024-07-011-4/+7
| | | | | | | This patch also switches the code to python format strings so that the application name can be interpolated where needed. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: Rename the Android app to reflect servo.org ownership and ↵Martin Robinson2024-06-241-4/+4
| | | | | `servoshell` (#32554) Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Add `--with-asan` (#31429)Samson2024-06-161-4/+4
|
* Document library crates only in mach doc (#32429)Ngo Iok Ui (Wu Yu Wei)2024-06-021-0/+3
| | | | | | | | | * Document library crates only in mach doc * Fix typo --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Do not use crown when building docs (#32220)Samson2024-05-041-0/+1
|
* Stop publishing the Rust book in mach doc and doc.servo.org (#32142)Delan Azabani2024-04-241-23/+2
|
* Preliminary Android build support (#31086)Mukilan Thiyagarajan2024-01-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Android build * Fixes * More fixes - Still failing in the linking step * More work on getting linking working Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: use mozjs with ndk r25c. loads servo.org more android build fixes. * fix ./mach run for android and make it follow logs Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * add experimental logic for compositor pause/resume Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * pass DPI from android to simpleservo Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ci: add android workflow Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * switch to ANDROID_SDK_ROOT and ANDROID_NDK_ROOT vars Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * upgrade gradle to 4.10.1 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * upgrade to gradle 5.1.1 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * upgrade to gradle 8 and agp 8 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * make compositing work again with external present Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: improve mach support for non-NixOS and CI Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix sampler compilation bug introduced in #30490 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ci: add android build to main workflow Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * gradle: set MinSdk = targetSdk = 30 NDK requires we compile against the minSdk API level which is 30 in our case. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * add instructions for android in README.md Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: move servosurface to servoview Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: uncomment the mediasession callbacks on MainActivity Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: fix crash on MainAtivity.onDestroy Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: drop VR, arm 5 and unused code This commit drops: * support for google, oculusvr * support for arm5 architecture and also removes * fakeld scripts * unused java code Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * cleanup shell.nix Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: add FIXMEs for gstreamer code Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: remove commented code and debug logs Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * cleanup ServoView.java Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * mach: comment call to download gstreamer deps for android Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * disable bluetooth for jniapi as blurdroid is broken Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fixup! README.md * fixup! remove change in Cargo.toml * fixup! move shell variables together * fixup! cleanup jniapi/Cargo.toml comments * delete commented gstreamer related android code Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * remove unused config variable in servbuild Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: more cleanup Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * force no_static_freetype only for android * use actions to manage sdk, ndk and java Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * rename embedder event names to be more clear. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * link to startup crash issue Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix lint issues Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * upgrade env_logger to 0.10 with duplicate exception libservo and android_logger can use env_logger 0.10 but quickcheck is still stuck on 0.8 and has not seen any activity in the last 2 years. This commit adds a duplicate exception until the quickcheck dependency can be upgraded (or replaced) Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: fix comments Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * disable jemalloc on android Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fixup! replace linux with android in cfg --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* build: Use `--keep-going` in `./mach doc` (#31119)Martin Robinson2024-01-181-0/+5
| | | | | | | | | | The documentation build for `gstreamer-gl-x11` depends on nightly Rust for some reason, which breaks our doc build. Use `--keep-going` to prevent breakage in dependencies from breaking our doc build. This unfortunately hides issues in our own documentation build. NB: It isn't possible to exclude dependencies with `--exclude` unless you are using `--workspace`. We would probably like to do that, but we have crates with the same name, preventing using `--workspace`.
* Fix the build on Ubuntu 20.04 (#31019)Martin Robinson2024-01-071-1/+1
| | | | | | | | Ubuntu 20.04 doesn't have a new enough version of GStreamer, so automatically disable media when running on that platform. This also cleans up the media detection a bit, putting the result in a `enable-media` variable and moving some of the logic into the build scripts themselves rather than the platform module.
* Remove `__future__` imports that are no longer necessary (#30661)Martin Robinson2023-11-021-2/+0
| | | These are no longer necessary as we always use Python 3.
* Make the `--release`/`--dev` more consistent and less surprising (#30091)Martin Robinson2023-08-141-43/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some issues with the way that the `--release` and `--dev` arguments were handled in mach commands. - Not all commands accepted them in the same way. For instance `./mach test-wpt` didn't really accept them at all. - If you did not pass either of them, mach would try to guess which build you meant. This guess was often quite surprising as it wasn't printed and it depended on the state of the your target directory, which is difficult to remember. - The `dev` profile is colloquially called a "debug" profile and some commands accepted `-d` or `--debug...` like arguments, but `--debug` with `./mach run` meant run in a debugger. It was easy to mix this up. This change: - Centralizes where build type argument processing happens. Now it the same shared decorator in CommandBase. - Uses a `BuildType` enum instead of passing around two different booleans. This reduces the error checking for situations where both are true. - Be much less clever about guessing what build to use. Now if you don't specify a build type, `--dev` is chosen. I think this behavior matches cargo. - Makes it so that `./mach test-wpt` accepts the exact same arguments and has the same behavior as other commands. In addition, the suite correct for `test-wpt` is removed. There are only two suites now and it's quite unlikely that people will confuse WPT tests for rust unit tests.
* Fix the docs build (#30058)Martin Robinson2023-08-021-1/+3
| | | | | | Type inference was incorrectly inferring that our `check_output()` helper was returning `str` when in reality, it returns `bytes`. This fixes the caller that was no longer decoding those bytes and fixes the type annotation on the function.
* Make rustup a requirement and switch to `rust-toolchain.toml` (#30056)Martin Robinson2023-08-011-4/+2
| | | | | | | | | | | | | | This change makes rustup a requirement for building Servo with `./mach` and switches to the newer `rust-toolchain.toml` format. The goal here is to make mach builds more similar to non-mach builds. - The new format allows listing the required components, removing some of the complexity from our mach scripts. - This means we must raise the required version of rustup to 1.23. The current version is 1.26. - We no longer wrap every call to cargo and rustc in "rustup run" calls as both cargo and rustc will take care of installing and using all necessary components specified in `rust-toolchain.toml` when run inside the project directory.
* Clean up rustdoc runMartin Robinson2023-06-201-10/+2
| | | | | | | | | 1. The options specified in `rustdoc-with-private` are essentially the default now so we can remove this script. 2. `./mach browse-doc` is redundant with `./mach doc --open` which uses the underlying cargo functionality to browse the documentation. Fixes #29888.
* Clean up cross-compilation and featuresMartin Robinson2023-05-251-11/+3
| | | | | | | | | | | | Integrate cross-compilation and media-stack handling into the `build_like_command_arguments` decorator. This removes a lot of repetition in the code and standardizes how targets are selected for all similar commands. Now cross compilation targets, feature flags, and helper variables are stored in the CommandBase instance. This also avoids having to continuously pass these arguments down to functions called by the commands.
* Implement `bootstrap-gstreamer` for all platformsMartin Robinson2023-05-251-10/+11
| | | | | | | | | | | | | | | | | | This change makes it so that the Platform classes can now handle installing GStreamer dependencies and properly setting up the environment including when cross-compiling. For Windows and Linux is now installed into `target/dependencies/gstreamer` when not installed system-wide. In addition: 1. Creating and moving existing environment path append helpers to `util.py`. 2. Combining the `set_run_env` and `build_dev` functions and moving some outside code into them so that it can be shared. Now code that used to call `set_run_env` calls `build_dev` and then `os.environ.update(...)`. 3. Adding Python typing information in many places. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Removed MagicLeap occurrences from Python filesmichaelgrigoryan252023-05-221-2/+2
|
* Improve winit/mach segfault outputDelan Azabani2023-02-281-1/+4
|
* Unbreak lldb invocations.Josh Matthews2022-03-081-2/+1
|
* Support extra arguments when running with --debug.Josh Matthews2021-03-051-1/+1
|
* Port some code to Python3Vincent Ricard2021-02-181-1/+2
|
* Fix Gstreamer undefined symbol errorKunal Mohan2020-07-021-0/+1
|
* Fix doc buildFernando Jiménez Moreno2020-06-301-1/+3
|
* Fix remaining flake8 warningsKagami Sascha Rosylight2020-06-211-4/+4
|
* Update surfman to 0.2 and remove glutinAlan Jeffrey2020-04-171-2/+1
|
* Add missing argument to set_osmesa_env.Josh Matthews2020-02-241-1/+1
|
* Install `rust-docs` rustup component in `./mach doc`Simon Sapin2020-01-021-1/+1
|
* mach: run `rustup target add` in `ensure_bootstrapped`Simon Sapin2020-01-021-1/+1
|
* Mach: rename default_toolchain to rust_toolchainSimon Sapin2020-01-021-3/+2
|
* Extract media_stack pick into CommandBaseTuncer Ayaz2019-11-211-12/+1
|
* Implement `./mach check --media-stack`Tuncer Ayaz2019-11-211-4/+0
| | | | While at it, extract --media-stack flag into command_base.py.
* Implement `./mach doc --media-stack={dummy|gstreamer}`Tuncer Ayaz2019-11-211-1/+22
|
* Allow setting GST_DEBUG on Android through machFernando Jiménez Moreno2019-10-141-0/+3
|
* Generate apis.html and css-properties.json for docs as part of crates’ ↵Simon Sapin2019-07-301-13/+0
| | | | | | | | build scripts … rather than as an extra step after `cargo doc`. This helps always using the correct set of CSS properties (for layout 2013 v.s. 2020).
* Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020}Simon Sapin2019-07-291-3/+8
| | | | Renaming the variable helped make sure I looked at every use.
* Share more `./mach build` logic with mach check, doc, test-unitSimon Sapin2019-07-021-6/+3
| | | | Fixes #23659
* Rename {azure,raqote}_backend feature flags to canvas2d-{azure,raqote}Simon Sapin2019-07-011-1/+1
|
* Fix docs.Josh Matthews2019-06-031-0/+2
|
* Refactoring of the Glutin port in preparation of the compositor refactoring.Paul Rouget2019-04-291-1/+1
|
* Generate apis.html in ./mach docSimon Sapin2018-12-121-0/+5
|
* Generate CSS properties docs in ./mach docSimon Sapin2018-12-121-0/+4
|
* Copy from etc/doc.servo.org in `./mach doc`Simon Sapin2018-12-121-3/+8
|
* com.mozilla to org.mozillaPaul Rouget2018-10-021-3/+3
|
* Enable use of RUST_LOG with mach run --android.Josh Matthews2018-09-201-0/+3
|
* new android port: fix android build and testsPaul Rouget2018-07-311-8/+12
|
* Add ./mach test-android-startupSimon Sapin2018-07-021-4/+2
|
* mach android-emulator: avoid mach error messages for Python exceptionsSimon Sapin2018-07-021-1/+1
|
* Add "./mach android-emulator"Simon Sapin2018-07-021-0/+14
|