aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/devenv_commands.py
Commit message (Collapse)AuthorAgeFilesLines
* Make the `--release`/`--dev` more consistent and less surprising (#30091)Martin Robinson2023-08-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Support mac wpt builds (#29867)Samson2023-08-111-1/+11
| | | | | | | * Add wpt-mac builds * Fix wpt reporting check run tag * There can only be five concurrent mac runners
* Make rustup a requirement and switch to `rust-toolchain.toml` (#30056)Martin Robinson2023-08-011-9/+13
| | | | | | | | | | | | | | 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.
* Remove old code for out-of-date CA stores (#30031)Martin Robinson2023-07-271-3/+2
| | | | | This code was written to handle both Python 2 (which we no longer support) and old Windows CI machines that did not have up-to-date CA stores. I think we can remove this now.
* Clean up cross-compilation and featuresMartin Robinson2023-05-251-37/+16
| | | | | | | | | | | | 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-6/+3
| | | | | | | | | | | | | | | | | | 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-6/+6
|
* Remove some unused python codeMartin Robinson2023-05-201-57/+8
| | | | | | | | | This change removes: - The custom `--dry-run` support for `cargo-update`. The real cargo command now has `--dry-run` support and this code was broken for Python 3. - The Python 2 version of TemporaryDirectory. This is no longer needed as we require Python 3.
* Add try-wpt-2020 runnersagudev2023-04-251-1/+1
|
* Auto merge of #29610 - mrobinson:notify, r=mukilanbors-servo2023-04-131-7/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use notify-py to send notifications - Use notify-py to send notifications, but use a custom notifier on Linux since transient (ie non-sticky) notifications are not supported. - Add an icon to the notification. - Don't send a notification after doing `./mach check` because that can trigger notifications when `rust-analyzer` is working. --- <!-- 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 notifications. <!-- 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. -->
| * Use notify-py to send notificationsMartin Robinson2023-04-131-7/+0
| | | | | | | | | | | | | | | | - Use notify-py to send notifications, but use a custom notifier on Linux since transient (ie non-sticky) notifications are not supported. - Add an icon to the notification. - Don't send a notification after doing `./mach check` because that can trigger notifications when `rust-analyzer` is working.
* | Replace usage of six.moves.urllib with urllibMartin Robinson2023-04-101-3/+3
|/ | | | | | Also organize some of the imports. Now that Servo only uses Python 3, this module is unnecessary. This is part of the gradual migration to using only Python 3.
* mach try & partitioned try jobssagudev2023-03-211-0/+38
|
* Add cargo-fix and cargo-clippy to machsagudev2023-02-181-0/+48
|
* Port `./mach rustup` to Python 3Simon Sapin2021-02-251-3/+3
|
* Fix remaining flake8 warningsKagami Sascha Rosylight2020-06-211-2/+2
|
* mach + rustup: use the minimal profile and install rustc-devSimon Sapin2020-01-021-2/+2
|
* mach: run `rustup target add` in `ensure_bootstrapped`Simon Sapin2020-01-021-1/+1
|
* Extract media_stack pick into CommandBaseTuncer Ayaz2019-11-211-12/+1
|
* Implement `./mach check --media-stack`Tuncer Ayaz2019-11-211-2/+20
| | | | While at it, extract --media-stack flag into command_base.py.
* Make `./mach rustup` install the rustc-dev componentSimon Sapin2019-11-121-1/+1
|
* Use urllib from six module in order to be compatible with Python3marmeladema2019-10-161-2/+2
|
* Share more `./mach build` logic with mach check, doc, test-unitSimon Sapin2019-07-021-6/+3
| | | | Fixes #23659
* Remove `./mach cargo`.Simon Sapin2019-07-011-22/+9
| | | | | | Not all cargo subcommands take `--manifest-path`. Use plain `cargo` instead (rustup reads the `rust-toolchain` file) or consider adding new mach sub-commands.
* Fix certifi import error while running ./match bootstrapShanavas M2019-01-031-3/+3
| | | | Fixes #22590
* Run rustfmt on test-tidyPyfisch2018-11-061-13/+0
| | | | | Add ./mach fmt command. Mach installs rustfmt if needed.
* com.mozilla to org.mozillaPaul Rouget2018-10-021-1/+1
|
* Auto merge of #21809 - servo:features, r=SimonSapinbors-servo2018-09-271-0/+2
|\ | | | | | | | | | | | | | | | | | | | | Only build ports/servo by default (except Android), add `./mach build --libsimpleservo` Fixes #21314 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21809) <!-- Reviewable:end -->
| * Only add --manifest-path if not already presentSimon Sapin2018-09-261-2/+1
| |
| * Only build ports/servo by default (except Android), add `./mach build ↵Simon Sapin2018-09-251-0/+3
| | | | | | | | | | | | --libsimpleservo` Fixes #21314
* | Add mach command to setup remote debugging on Android devices.Josh Matthews2018-09-251-1/+57
|/
* Make ndk-stack mach command support x86 builds.Josh Matthews2018-09-051-1/+2
|
* Remove trailing whitespace in devenv_commandsjosh2018-08-101-2/+2
|
* Merge branch 'master' into masterJosh Brudnak2018-08-101-1/+25
|\
| * mach: Add ndk-stack command for android crash logs.Josh Matthews2018-08-081-0/+24
| |
* | Add rustfmt command to devenv commandsJoshBrudnak2018-08-091-0/+13
|/
* Remove geckolib-related build commands.Emilio Cobos Álvarez2018-05-171-48/+2
|
* Use rustup.rs instead of custom bootstrapSimon Sapin2018-01-101-27/+12
| | | | Fixes #11361, closes #18874
* mach: Remove redundant with(crate_dir).Emilio Cobos Álvarez2017-12-131-9/+2
|
* mach: Fix cargo-geckolib check / cargo-geckolib build after #19476.Emilio Cobos Álvarez2017-12-101-9/+18
|
* Use workspace.default-members to specify default crates for 'cargo build'Simon Sapin2017-12-071-1/+1
| | | | | | | | | | | … and 'cargo test', etc. Include Servo and its unit tests, but not Stylo because that would try to compile the style crate with incompatible feature flags: https://github.com/rust-lang/cargo/issues/4463 `workspace.default-members` was added in https://github.com/rust-lang/cargo/pull/4743. Older Cargo versions ignore it.
* Only pass cafile argument to urlopen in Python versions that support it.Simon Sapin2017-10-191-2/+3
|
* Bootstrap from official static.rust-lang.org when SNI is availableSimon Sapin2017-10-181-2/+2
|
* Fix './mach check' to build ports/servo, not components/servoSimon Sapin2017-10-121-1/+1
|
* Use upstream wptrunner from web-platform-tests.Josh Matthews2017-10-051-26/+0
|
* './mach rustup': Use alternate S3 URL that doesn’t require SNISimon Sapin2017-09-121-1/+1
| | | | … to hopefully fix https://travis-ci.org/servo/servo-with-rust-nightly/ builds.
* Switch back to pinning Rust by Nightly date instead of commit hash…Simon Sapin2017-08-311-23/+7
| | | | | | | | | | | | | | | | | | … this time using a `rust-toolchain` file compatible with rustup: https://github.com/rust-lang-nursery/rustup.rs/#the-toolchain-file And upgrade to rustc 1.21.0-nightly (c11f689d2 2017-08-29) ---- Now if both `system-rust` and `system-cargo` are set to `true` in `.servobuild`’s `[tools]` section, and the corresponding `rustc` and `cargo` binaries are in fact rustup’s wrappers, then rustup will use the correct version based on `rust-toolchain`. CC https://github.com/servo/servo/issues/11361 Unlike https://github.com/servo/servo/pull/17927, this does not make mach use rustup directly.
* Fix bootstrapping during `mach rustup` without system cargoSimon Sapin2017-07-211-0/+3
| | | | https://travis-ci.org/servo/servo-with-rust-nightly/builds/255611949#L989
* Update to cargo 0.21.0-nightly (eb6cf012a 2017-07-02)Simon Sapin2017-07-191-15/+0
| | | | | Cargo binaries are now produced on Rust’s CI, not Cargo’s. Remove cargo-commit-hash and find Cargo based on rust-commit-hash.
* Add 'mach check' and 'mach check-geckolib'Simon Sapin2017-05-131-18/+52
|