Commit graph

65 commits

Author SHA1 Message Date
Martin Robinson
ae9a9e1d17
Combine all script tests into test-scripts
Remove:
    - tidy self test support from `./mach test`
    - `./mach test-idl`

Adds a `./mach test-scripts` command that is responsible for running all
Python script tests. Run this during the CI to catch regressions in
changes to scripts. The WebIDL tests are still *very* slow and there are
from Gecko, so only run them when "-a" is passed meaning all tests.
2023-06-29 19:09:33 +02:00
Martin Robinson
e679e1f793 Collect build timings on GitHub CI
This will help to investigate slow builds on GitHub.
2023-06-23 15:14:40 +02:00
Martin Robinson
a57c49a4bb Implement ./mach bootstrap for MacOS 2023-06-22 11:14:00 +02:00
Martin Robinson
019b88770a Update mozjs to get new mach version
The mozjs repository now has a version of mach that works more
consistently with newer versions of Python.

Fixes #29142.
2023-06-04 23:52:33 +02:00
bors-servo
e9a7787a4d
Auto merge of #29781 - mrobinson:bootstrap-gstreamer, r=mukilan
Implement `bootstrap-gstreamer` for all platforms

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, prepackaged GStreamer is now installed into `target/dependencies/gstreamer` when not installed system-wide. In addition this change:

1. The Environment path append helper is moved to `util.py` and a new `prepend` version is added.
2. `set_run_env` and `build_dev` functions are combined and include more code from callers so environment setup is more often in the same place. Now code that used to call `set_run_env` calls `build_dev` and then `os.environ.update(...)`. We can further refine this with the `is_build` argument later.
4. Python typing information is added in many places.

<!-- 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 fix #25335
- [x] These changes do not require tests because they are to the 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. -->
2023-05-25 13:43:45 +02:00
Martin Robinson
7d20f16d9f
Implement bootstrap-gstreamer for all platforms
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>
2023-05-25 08:22:21 +02:00
Mukilan Thiyagarajan
a5238ed7a5 Upload nightly builds for layout2020 variant
We'd like to start offering servo nightly builds
with layout 2020 engine so that users can test
the new layout without building servo. These new
builds will be offered in addition to the current
2013 builds until we switch over to 2020 as the default.
2023-05-24 21:54:43 +05:30
Mukilan Thiyagarajan
8cfb19a8fb Consume official GStreamer binaries on MacOS
This PR re-enables support for the gstreamer mediastack
in macOS by consuming the official binary '.pkg' files
from gstreamer.freedesktop.org

To maintain symmetry with other platforms, the '.pkg'
files are uploaded to servo-build-deps and fetched from
there using the new script 'etc/install_macos_gstreamer.sh'.

Unlike the Homebrew version, the official GStreamer is
distributed as a 'relocatable' framework i.e the dylibs all
have @rpath-relative install names and also link to other
dylibs using @rpath relative path. To address this difference
the 'servo' binary needs to be patched with 'install_name_tool'
to add an LC_RPATH command that sets the relative paths
that the dynamic linker should search when trying to satify
dependencies. In Servo's case, this will be a path relative to
the 'servo' binary itself i.e '@executable_path/lib/'

The additional 'lib' is due to a flaw in the gstreamer
packaging where the install names of some of the dylibs
have the prefix '@rpath/lib' and some of them just have '@rpath'.

This PR also fixes a couple of issues present in the
`mach build` process on MacOS:
1. `mach build` process was not copying transitive dependencies
   of servo binary but only the first level dylibs
2. `mach build` process didn't patch the links to dylibs
   in servo binary (and dependencies). This meant though
   (some) dylibs were copied to local path, the binary
   still loaded the dylibs from system GStreamer installation
   i.e homebrew instead of the copieds dylibs

The build and runtime dependencies in etc/homebrew/Brewfile
and etc/homebrew/Brewfile-build have also been removed in This
PR.

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-05-12 00:14:38 +05:30
Martin Robinson
2db364b4b1 Build on Mac with the dummy media stack
This is a temporary fix for broken GStreamer homebrew packages.

Fixes 29653.
2023-04-23 12:50:00 +02:00
Mukilan Thiyagarajan
f1ba708cf7 Upload nightly builds to Github Releases
This change extends the `mach upload-nightly` command to
publish the nightly builds for all platforms as GH Release
assets.

The GH releases are made on a separate repository so
that we can persist older nightly builds without having
to accumulate git tags for them.

Some design tradeoffs in this approach are:
1. To allow the 'latest' link from servo.org to remain stable,
the release assets are named 'servo-latest.{ext}' instead of
containing the release tag/date.
2. The release is created as draft and published atomically
when all platforms have been built successfully. This allows
us to link to the 'latest' alias from servo.org while
gauranteeing that it contains builds for all platforms.
The other option here would be to have code in servo.org UI
that uses GH API to find the most recent release with a
successful build for a given platform.
3. The tags in the nightly repo are all based on the same
commit that has no relation to servo code base.

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-04-12 21:02:07 +05:30
Martin Robinson
bc3abf9953 Remove more Taskcluster and Treeherder integration
Servo no longer uses Taskcluster and Treeherder, so this change removes
script references to those services and support files.
2023-04-10 23:04:17 +02:00
sagudev
76e9c68ac7 Nightly workflow using platform workflows 2023-04-06 18:43:33 +02:00
sagudev
ec5b646b50 Package in platform workflows 2023-04-06 16:19:08 +02:00
sagudev
91de41a70a Sccache in actions (linux & mac) 2023-04-02 07:18:51 +02:00
sagudev
1a84fcc9e1 Abstract platform-specific workflows into separate files 2023-03-30 15:49:45 +02:00