Commit graph

266 commits

Author SHA1 Message Date
Martin Robinson
1d79f5dad2
Make the --release/--dev more consistent and less surprising (#30091)
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.
2023-08-14 10:21:29 +00:00
Samson
efa38401c6
Support mac wpt builds (#29867)
* Add wpt-mac builds

* Fix wpt reporting check run tag

* There can only be five concurrent mac runners
2023-08-11 17:26:15 +00:00
Mukilan Thiyagarajan
cedd59361e
Pass --layout-2013 flag in 'WPT import' job (#30077)
PR #30048 switched `./mach update-wpt` to use 2020 layout engine by default.  Since the WPT import job was not passing any flags when updating 2013 expectations, it was not using the correct metadata files, leading to failures when landing the recent [wpt sync PR](https://github.com/servo/servo/pull/30075)
2023-08-07 13:40:30 +00:00
Martin Robinson
51fa6c7e18
Checkout the PR when triggering try from PR comments (#30069)
Fixes #30067.
2023-08-04 07:06:43 +00:00
Martin Robinson
6f4f237fbd
Remove lzma path workaround for MacOS (#30053)
Now that the new version of GStreamer fixes this issue, we can remove
the workarounds for this problem as well as all of the homebrew
bootstrapping logic.
2023-08-01 11:11:46 +00:00
Martin Robinson
9fa67685f4
Remove unnecessary join()s from GitHub Actions (#30040)
`contains()` works on arrays as well as strings, so the `join` is
unnecessary when trying to detect job statuses.
2023-07-28 05:26:19 +00:00
Martin Robinson
4d627318af
More tweaks for the try GitHub Action (#30029)
- Don't trigger try jobs when comments are deleted or edited.
- Don't report success for cancelled jobs.
2023-07-27 08:06:36 +00:00
Martin Robinson
4d200084f8
Never skip workflows for explicitly triggered try jobs (#30027)
Do not do the duplicate workflow checks for main workflow jobs triggered
by 'issue_comment' GitHub Actions. This prevents try jobs from being
skipped. This issue was not detected in my testing, because the main
workflow does not run in personal repositories and 'issue_comment'
actions cannot be tested from PRs.
2023-07-26 05:00:01 +00:00
Martin Robinson
a0cbe449a6
Fix getting login from try GitHub Action payload (#30026) 2023-07-25 15:57:33 +00:00
Martin Robinson
f7fcc6e900
Fixes for the try GitHub Action (#30024)
1. Properly handle multi-line comments
2. Don't skip duplicate workflows when explicitly running try
2023-07-25 10:33:26 +00:00
Martin Robinson
7508d8321a
Make "@bors-servo try" a GitHub Action (#30014)
This is the last piece of the puzzle to turning off bors. This makes
functionality provided by bors to understand "@bors-servo try" a GitHub
Action. For now the syntax is more or less the same, but we can modify
it in the future and even add support for custom configuration options
(more specific build combinations or even passing compiler flags).

The big difference between this and what bors does is that there is no
merge commit. GitHub simply runs tests on the version of the branch that
is on a pull request. There is always the risk that tests might start
failing when a branch is rebased, but this offers a bit more control
because you can easily rebase from the PR and the merge queue will check
this as well.
2023-07-24 15:15:33 +00:00
Martin Robinson
da5b861b3c
Fix WPT sync and simplify the update scripts (#29999)
Much of the code used to import WPT tests from upstream has been moved
to the WPT repository itself, so this can be reused. In addition,
simplify the workflows by merging the entire process into mach and also
directly into the GitHub workflow. This should fix WPT imports after
combining compilation of layout and legacy layout.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-07-17 13:55:57 +00:00
Martin Robinson
4c8b47adbb
Mark skipped CI workflows as successful (#30001)
When the decision job decides that a workflow should be skipped because
an identical one has already run, that workflow should be marked as
successful and not unsuccessful.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-07-17 13:38:25 +00:00
Martin Robinson
c86faae371
Fix the WPT update (#29996)
- No longer issue the bors-servo r+ comment as we use the merge queue
   now.
 - Explicitly trigger all layout tests so that results are generated.
2023-07-13 23:15:41 +00:00
Martin Robinson
d5202a4a98
Enable the GitHub merge queue (#29989)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-07-13 07:45:48 +00:00
Mukilan Thiyagarajan
ef88355248 Fix package name for windows nightly
Also remove the 2020 specific packages.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-07-09 13:48:57 +05:30
bors-servo
1543912589
Auto merge of #29980 - mrobinson:splitoff, r=mrobinson
Split the WPT workflow from the Linux one

This allows running tests for only one layout system at a time. This was
originally part of #29950, but was lost in the shuffle.

<!-- 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 improve the CI.

<!-- 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-07-06 20:49:36 +02:00
Samson
3242ad2ca3
Split the WPT workflow from the Linux one
This allows running tests for only one layout system at a time. This was
originally part of #29950, but was lost in the shuffle.
2023-07-06 20:36:07 +02:00
Martin Robinson
ac8ab15f8b Fix upload of build timings on Windows
Fixes #29948.
2023-07-06 19:15:27 +02:00
Martin Robinson
d31cdb682f
Make the choice of layout runtime setting
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
2023-07-06 14:49:24 +02:00
bors-servo
d931cf49aa
Auto merge of #29963 - mrobinson:run-unit-tests-when-using-try-platform, r=atbrakhi
When using "try-<platform>" trigger unit tests

There is currently no way to trigger unit tests using the bors-servo try
infrastructure. This change makes it so that using try-<platform>
triggers unit tests for that platform. This will be especially useful
when testing changes for Windows before trying to land them.

<!-- 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 are just GitHub Actions changes.

<!-- 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-07-04 13:51:28 +02:00
Mukilan Thiyagarajan
5f36dcf9cc Run main workflow for merge queue events
This PR configures the main workflow (currently
used by bors via auto & try branches) to run
on 'merge_group' events emitted when pull requests
are added to GitHub merge queue.

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-07-04 15:30:15 +05:30
Martin Robinson
69c830a6e0
When using "try-<platform>" trigger unit tests
There is currently no way to trigger unit tests using the bors-servo try
infrastructure. This change makes it so that using try-<platform>
triggers unit tests for that platform. This will be especially useful
when testing changes for Windows before trying to land them.
2023-07-04 11:36:16 +02:00
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
bors-servo
7590b47dbd
Auto merge of #29901 - mukilan:switch-nightly-to-2020-layout, r=mrobinson
Default nightly builds to layout 2020

This PR switches the filenames used by nightly builds so that the default `servo-latest.{ext}` packages use the 2020 engine and the 'servo-latest-legacy-layout.{ext}` packages use the 2013 engine.

Since the platform workflows are reused by  the main, quick-check, PR and WPT import flows and since the 2013/2020 flags are also controlled by try branches, I've kept the changes isolated to  `nightly.yml` and `package_commands.py` and have avoided changing the input parameters. If we want to deault all the workflows to 2020, I can decline this PR and raise a new one.

---
<!-- 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 modify packaging logic.
2023-06-21 15:12:34 +02:00
Mukilan Thiyagarajan
bca529da92 Default nightly builds to layout 2020
Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-06-21 16:14:02 +05:30
Martin Robinson
1abbfeb1cf Fix the rustdoc build after recent changes
If passing --disable-minification, we must also enable unstable-options.
This was happening before, but by accident.
2023-06-21 11:38:59 +02:00
bors-servo
9aeed659dc
Auto merge of #29866 - mrobinson:run-unit-tests-on-main-workflow, r=atbrakhi
Run unit tests on the main Linux workflow

Not running unit tests on the main Linux workflow makes it faster, but also allows merging changes that break the unit tests. This change fixes that.

---
<!-- 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 are CI changes.

<!-- 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-06-09 22:41:41 +02:00
Martin Robinson
951a244ad1 Run unit tests on the main Linux workflow 2023-06-09 13:35:41 +02:00
sagudev
b3e4413f4e Use C drive as target directory 2023-06-09 10:07:55 +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
49aa0b6e06 Use Python 3.9 on linux workflows
It looks like the dist-packages of python 3.8
on the runner has an older version of ssl package
which is now causing nightly builds to fail.
2023-05-18 19:44:37 +05:30
Martin Robinson
8522647555 Run the Layout 2020 tests in main workflow
Also fix report_aggregated_expected_results.py which was reporting an
error when there were no failing tests. This is more commonly an issue
with Layout 2020 because if runs fewer tests and was causing builds to
show up as failing even when they were not.
2023-05-17 11:25:03 +02:00
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
sagudev
219afcc9a8 WPT results aggregating based on layout 2023-04-27 09:05:02 +02:00
sagudev
b4c465e6a2 Run wpt only on try-wpt,try-wpt-2020 branches 2023-04-27 08:50:16 +02:00
sagudev
200f90cf9f Add try-wpt-2020 runner 2023-04-25 09:53:01 +02:00
sagudev
8bed625d28 Use defined layout for wpt test 2023-04-25 09:53:01 +02:00
Martin Robinson
8a04877cd6 Fix the path to the WPT export script after a rename 2023-04-23 18:41:24 +02:00
bors-servo
2268a0f3c3
Auto merge of #29639 - mrobinson:reorganize-wpt-python, r=mukilan
Reorganize Servo's WPT Python scripts

This change moves all of Servo's WPT Python support scripts into one directory as they were previously scattered throughout the directory structure. This should allow more code reuse and make it easier to understand how everything fits together.

The changes:

- `tests/wpt/update` → `python/wpt/importer`
- `etc/ci/upstream-wpt-changes/wptupstreamer` → `python/wpt/exporter`
- `etc/ci/upstream-wpt-changes/test.py` → `python/wpt/test.py`
- `etc/ci/upstream-wpt-changes/tests` → `python/wpt/tests`
- `tests/wpt/servowpt.py` → - `python/wpt/update.py` - `python/wpt/run.py`
- `tests/wpt/manifestupdate.py` → `python/wpt/manifestupdate.py`

This change also removes
 - The ability to run the `update-wpt` and `test-wpt` commands without using `mach`. These didn't work very well, because it was difficult to get all of the wptrunner and mach dependencies installed outside of the Python virtualenv. It's simpler if they are always run through `mach`.
- The old WPT change sync / upstreaming script that was no longer used. This allows this code to pass `test-tidy` now.

<!-- 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] There are tests for these changes

<!-- 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-04-23 14:23:57 +02:00
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
Martin Robinson
e2cf3e8d1a Reorganize Servo's WPT Python scripts
This change moves all of Servo's WPT Python support scripts into one
directory as they were previously scattered throughout the directory
structure. This should allow more code reuse and make it easier to
understand how everything fits together.

The changes:

- `tests/wpt/update` → `python/wpt/importer`
- `etc/ci/upstream-wpt-changes/wptupstreamer` → `python/wpt/exporter`
- `etc/ci/upstream-wpt-changes/test.py` → `python/wpt/test.py`
- `etc/ci/upstream-wpt-changes/tests` → `python/wpt/tests`
- `tests/wpt/servowpt.py` →
    - `python/wpt/update.py`
    - `python/wpt/run.py`
- `tests/wpt/manifestupdate.py` → `python/wpt/manifestupdate.py`

This change also removes
 - The ability to run the `update-wpt` and `test-wpt` commands without
   using `mach`. These didn't work very well, because it was difficult
   to get all of the wptrunner and mach dependencies installed outside
   of the Python virtualenv. It's simpler if they are always run through
   `mach`.
- The old WPT change upstreaming script that was no longer used.
2023-04-20 12:24:55 +02:00
bors-servo
9acb9cc5cf
Auto merge of #29632 - sagudev:ci-cache-win, r=jdm
Use ccache on windows workflow

Because `sccache` is not working when setting `CCACHE=sccache` I used ccache which is taking cache hits.

I would certainly love to share some timings, but I found out that windows builds have very inconsistent timings.
2023-04-19 04:27:06 +02:00
sagudev
d939c9a8b7 ccache 2023-04-14 10:57:49 +02:00
bors-servo
083a96a8d7
Auto merge of #29630 - sagudev:ci-win-gstream, r=jdm
Use GStreamer in Windows workflow

I accidental came across https://github.com/servo/servo/projects/26 and can't helped but to fix one. (Few were already fixed but not closed).

Test run: 8306052042

---
<!-- 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 #28277

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it is only CI

<!-- 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-04-13 15:10:16 +02:00