Commit graph

1037 commits

Author SHA1 Message Date
Mukilan Thiyagarajan
1efecf9b50
Use system lld on NixOS instead of rust-lld (#30123)
The -Zgcc-ld=lld flag makes rust use the rust-lld
linker that is distributed as part of rust toolchain.
However, this flag doesn't work on nixos correctly
as
  1) rust-lld needs to be patched to have the correct rpath
     to find libz.so
  2) the bin/gcc-ld/ld.lld wrapper which calls rust-lld also
     needs to be patched to use the correct dynamic loader
  3) rust-lld doesn't respect NIX_LDFLAGS which contains
     the additional search path derived from buildInputs.
     The system linkers on nixos are wrapped so that
     NIX_LDFLAGS is added as the rpath to the final binary.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-08-18 06:18:05 +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
Martin Robinson
bce7622cde
Switch to rustls and webpki-roots (#30025)
This change replaces OpenSSL with rustls and also the manually curated
CA certs file with webpki-roots (effectively the same thing, but as a
crate).

Generally speaking the design of the network stack is the same. Changes:

- Code around certificate overrides needed to be refactored to work with
  rustls so the various thread-safe list of certificates is refactored
  into `CertificateErrorOverrideManager`
- hyper-rustls takes care of setting ALPN protocols for HTTP requests,
  so for WebSockets this is moved to the WebSocket code.
- The safe set of cypher suites is chosen, which seem to correspond to
  the "Modern" configuration from [1]. This can be adjusted later.
- Instead of passing a string of PEM CA certificates around, an enum is
  used that includes parsed Certificates (or the default which reads
  them from webpki-roots).
- Code for starting up an SSL server for testing is cleaned up a little,
  due to the fact that the certificates need to be overriden explicitly
  now. This is due to the fact that the `webpki` crate is more stringent
  with self-signed certificates than SSL (CA certificates cannot used as
  end-entity certificates). [2]

1. https://wiki.mozilla.org/Security/Server_Side_TLS
2. https://github.com/briansmith/webpki/issues/114

Fixes #7888.
Fixes #13749.
Fixes #26835.
Fixes #29291.
2023-08-08 14:00:10 +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
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
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
f017169ae4
Update scripts to reflect new WPT directory name 2023-06-26 10:48:02 +02:00
Martin Robinson
f4578afdfe
Rename metadata directories
This renames:
 - `tests/wpt/metadata` → `tests/wpt/meta-legacy-layout`
 - `tests/wpt/metadata-layout-2020` → `tests/wpt/meta`
 - `tests/wpt/mozilla/meta` → `tests/wpt/mozilla/meta-legacy-layout`
 - `tests/wpt/mozilla/meta-layout-2020` → `tests/wpt/mozilla/meta`
2023-06-22 21:15:41 +02:00
Martin Robinson
a57c49a4bb Implement ./mach bootstrap for MacOS 2023-06-22 11:14:00 +02:00
Martin Robinson
4d7f250159
Clean up rustdoc run
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.
2023-06-20 12:42:43 +02:00
michaelgrigoryan25
44390874e5 Remove magicleap related references from config files 2023-05-22 16:26:30 +04:00
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
80087f31c8 Workaround bug in gstreamer binaries
The official gstreamer .pkg distribution should contain
'relocatable' dylibs, but as discovered in #29732,
some dylibs have absolute links to liblzma.5.dylibs

Since /opt/homebrew is the default install location
on Apple Silicion, this will cause the packaging &
build steps to fail, even if 'xz' package is installed
via homebrew.

This is a temporary fix until upstream fixes the bug
and makes the package truly 'relocatable'.

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-05-12 19:03:47 +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
faa0769fcc Don't report test results for closed PRs
When doing a try run, bors will often push the last closed merge onto
the branch before pushing the change to try. This means that test
results get reported on closed PRs. There are two issues with this:

1. Doing too much work on the bots.
2. Extra results on closed PRs.

This changes fixes the second issue.

Fixes #29583.
2023-05-05 08:41:01 +02:00
bors-servo
0e8d0b4ca5
Auto merge of #29670 - mrobinson:improve-wpt-output, r=delan
Make WPT results output more useful

Before when a subtest failed, the text of the failed assertion was not printed. This changes makes sure that it is printed in both the console and the aggregated test output.

Also fix a couple typing errors.

<!-- 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 these are improvements to build tools.

<!-- 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-27 14:17:58 +02:00
sagudev
219afcc9a8 WPT results aggregating based on layout 2023-04-27 09:05:02 +02:00
Martin Robinson
379b3d03c8 Make WPT results output more useful
Before when a subtest failed, the text of the failed assertion was not
printed. This changes makes sure that it is printed in both the console
and the aggregated test output.

Also fix a couple typing errors.
2023-04-26 10:13: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
7ab48556b0
Auto merge of #29623 - mrobinson:wpt-import-one-week, r=mukilan
Import WPT tests every week instead of every day

We often have multiple imports stacked up which makes it more confusing to land each one. In addition, giving a week to do the import will give us more margin to triage failing tests and hopefully to be able to use intermittent expectations for flaky tests.

<!-- 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 this just change the frequency of a scheduled action.

<!-- 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 07:56:05 +02:00
Martin Robinson
728021d69e Import WPT tests every week instead of every day
We often have multiple imports stacked up which makes it more confusing
to land each one. In addition, giving a week to do the import will give
us more margin to triage failing tests and hopefully to be able to use
intermittent expectations for flaky tests.
2023-04-12 15:14:03 +02:00
Martin Robinson
72dbf0e752 Handle non-UTF8 diffs in the WPT upstream script
The output of `git diff` and `git show` can include non-UTF8 text or
binary data, so the WPT upstream script should handle this properly.

Fixes #29620.
2023-04-12 13:37:52 +02:00
Martin Robinson
f4b5b9f85f Fix the WPT export script
- Have the WPT exporter script use the WPT_SYNC_TOKEN for checking out
  wpt.
- Make sure the local WPT repository is unshallow when pushing.
- When searching for existing PRs use the main GitHub search API,
  as the pull request search does not seem to properly process
  the "head" parameter.
- When deleting branches in the downstream WPT repository, use
  the full URL to avoid trying to modify the upstream repository.
2023-04-11 13:37:50 +02:00
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
Mifom
11892c7f84 Update shell.nix
Replace deprecated xlibsWrapper with just xorg.libX11
2023-04-09 23:35:17 +03:00
sagudev
7d0865c12b WPT agregated results also as github check 2023-04-03 09:13:04 +02:00
Samson
910406fcff
Update wpt-nightly-update.sh with right paths from workflows 2023-04-01 06:39:16 +02:00
Martin Robinson
bf61f5404c Fix permissions of etc/ci/wpt-nightly-update.sh
The permissions were mistakenly modified in a previous change.

Fixes #29550.
2023-03-28 11:04:47 +02:00
Martin Robinson
95bfad3ac5 Add Layout 2020 support to nightly WPT update 2023-03-24 18:33:07 +01:00
Martin Robinson
e09b05e618 Be more verbose when a command fails in the WPT upstream script 2023-03-23 13:11:16 +01:00
Martin Robinson
ec9cbeefd8 Merge forbidden panic check into test-tidy
This cleans up the GitHub actions yaml a bit and ensures that developers
are running this check locally before submitting changes. In addition,
it allows adding tests for this check. Finally, this change fixes the
tidy tests by upgrading voluptuous for Python 3.10 as well as by
reverting an inadvertent change for NixOS compatibility on one of the
dummy testing files.
2023-03-22 15:37:56 +01:00
Martin Robinson
5e30ce8532 Filter unknown flaky tests when filtering known intermittents
There are two kinds of flaky/intermittent tests in Servo. The
traditional kind is the test that fails on the CI, but has an associated
bug indicating that the test is an intermittent failure. Many of these
tests have completely unstable results, for instance those where an
unpredictable set of subtests fail. It's impossible to generate stable
results for these, so we have traditionally simply discard these
unexpected results.

Another kind of intermittent test is one that will produce an expected
result when rerun (ie will flake). Some of these are also labeled with
bugs, while some are not. In some cases, there is flakiness in some core
Servo functionality that can lead to *any* test flaking, such as a race
condition that can lead to an early screenshot for reftests. When these
kinds of tests do not have associated bugs, they cause the CI to fail.
In this case, it is impossible to label these tests as intermittent
because it can literally be any test.

This change, reruns failed tests in order to detect unlabeled tests in
the second category. Instead of blocking the CI when the second run
leads to expected results, the CI will now pass, but the flake will be
reported to the new flakiness dashboard. This prevents unrelated flakes
from slowing down the merge queue.
2023-02-21 12:10:02 +01:00
Martin Robinson
2784c0e69d Add support for the intermittent dashboard
Use the new intermittent dashboard to report intermittents and get
information about open bugs. This is now used to filter out
known-intermittents from results. In addition, this also allows the
scripts to report bug information to the GitHub. Display that in all
output.
2023-02-15 12:59:33 +01:00
Martin Robinson
5b3f147110 Make two small improvements to try result comment
Sort the test names alphabetically so that they are stable between try
runs and also include the action URL in the comment when possible.
2023-02-10 16:50:53 +01:00
Martin Robinson
d2a66fef0c Output test results as a GitHub comment
After filtering intermittents, output the results as JSON. Update the
GitHub workflow to aggregate this JSON data into an artifact and use the
aggregated data to generate a GitHub comment with details about the try
run. The idea here is that this comment will make it easier to track
intermittent tests and notice when a change affects a test marked as
intermittent -- either causing it to permanently fail or fixing it.
2023-02-04 17:11:02 +01:00
Martin Robinson
cc1ccf8aff ci: Produce a single WPT log artifact
GitHub supports adding files to an artifact in parallel, as long as the
filenames are unique. This makes it easier to download build results
when more than a single builder fails.
2023-02-02 15:54:04 +01:00
Martin Robinson
a18baf6719 Fix upstreaming of WPT changes
The GitHub Action needs access to Servo repository secrets, so switch to
using the 'pull_request_target' event. Since these PRs have more
complete access to the Servo repository, do not execute the version of
the upstream script that comes with the PR. Instead, simply fetch the
changes. To make this work, the script no longer expects the PR commit
to be checked out, merely that they exist in the repository somewhere.
2023-01-25 12:17:59 +01:00
Martin Robinson
772e086677 Enable the Github Action-based WPT upstream script 2023-01-20 20:19:27 +01:00
Martin Robinson
659597281b Add a script to upstream WPT changes via a GitHub Action
This is a modified version of the webhook found at
servo/upstream_wpt_webhook and deployed via SaltStack. It is updated to
use modern Python and to assume that GitHub Actions will fetch the
appropriate source code locally before the script is run.

Fixes #29206.
Fixes #23798.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-01-17 11:49:56 +01:00
yvt
57eb5a56d1 chore(nix): replace pkgconfig with pkg-config
`pkgconfig` has been renamed to `pkg-config` in nixpkgs.
2022-10-07 01:40:54 +09:00
yvt
71a6a00d26 chore(nix): add AppKit to buildInputs on Darwin
Signed-off-by: yvt <i@yvt.jp>
2022-09-16 00:37:07 +09:00
cybai
49d94cb08b Run WPT sync nightly on GitHub Action 2022-08-16 00:14:55 +09:00
Nathan Lefler
881e01ab7e Update nix-shell package names
"xlibs" has been renamed to "xorg"
"x11" has been renamed to "xlibsWrapper"

Signed-off-by: Nathan Lefler <nathan@lefler.me>
2022-07-31 23:57:58 +00:00
Greg Myers
829a736f96
Fix typos in markdown files
Fixes a number of typographical errors across
markdown documentation files.
2022-01-14 16:46:10 -07:00
yvt
e4cd5a1c96 chore(nix): define LD_LIBRARY_PATH outside shellHook
For consistency with other environment variables defined in the same
file.
2021-10-16 01:27:59 +09:00
yvt
e61d7f808a chore(nix): add libxkbcommon to LD_LIBRARY_PATH 2021-10-16 01:27:59 +09:00
yvt
9e71bd6a70 chore(ci): remove the auto-generation of main.yml 2021-07-18 21:35:24 +09:00
bors-servo
42d7892d88
Auto merge of #28473 - jdm:codesign-build, r=jdm
Enable codesigning for non-nightly UWP builds
2021-07-02 18:23:22 -04:00
Josh Matthews
57bc79b0d5 Use codesigning in UWP builds. 2021-07-02 18:22:49 -04:00