Commit Graph

134 Commits

Author SHA1 Message Date
shuppy
f9fd3968e5 Fix -p servo lib target build (and fix CI check accordingly) (#43170)
the `-p servo` (formerly libservo) lib target was busted for anyone
genuinely consuming it as a library, but we didn’t catch it because the
CI job designed to check it built `-p servo` with --all-targets, which
unlike library consumers pulls in [dev-dependencies].

this patch fixes the compile error, and fixes the CI check to build `-p
servo` in a more realistic configuration.

Testing: tested in CI, and locally with `cargo build -p servo --locked`
Fixes: #43168

Signed-off-by: delan azabani <dazabani@igalia.com>
2026-03-11 09:21:59 +00:00
Jonathan Schwender
e23f052412 Rename libservo to servo (#43141)
As discussed on zulip we would like to rename `libservo` to `servo`
(again) before a future crates.io release.
Servo is a library, so the `lib` prefix is somewhat redundant. We
already renamed the binary of ServoShell to `servoshell`, to reduce
confusion of users of what servo is.

Note: This PR does not touch all occurrences of `libservo`. Specifically
CI job names remain untouched, since the risk of breaking something is
higher here, harder to test for and the name not user facing.

Testing: CI testing of this change should give us good confidence.
Manual testing of `./mach doc` and `./mach build` showed no issues on
macos. [Full try
run](https://github.com/jschwe/servo/actions/runs/22909562747)

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-03-10 20:55:14 +00:00
Euclid Ye
819b3533c3 ci: Fail the action if artifact not found when uploading; Update actions/upload-artifact to v7 (#43114)
- Rename instead of copy the `cargo-timings` folder
- Fail the action if artifact not found in upload-artifact. This should
prevent things like #43102
- Update `actions/upload-artifact` to v7

Testing: If this can merge, it is successful.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-09 17:24:52 +00:00
Sam
9394cdfa4c CI: Force lld in MSRV Linux build (#43075)
when using rust-toolchain rust this is already default

Testing: None
Fixes: #43070

---------

Signed-off-by: Sam <16504129+sagudev@users.noreply.github.com>
2026-03-07 09:33:09 +00:00
Jonathan Schwender
1632e61ed6 servoshell: Rename executable to servoshell. (#42958)
This should help clarify the difference between servo the library /
engine and servoshell the browser (demo).

Other changes: 

- Removed etc/servo.sb ( [apple sandbox profile
format](https://angelica.gitbook.io/hacktricks/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-sandbox#sandbox-profiles))
since it is not needed anymore. See [this
comment](https://github.com/servo/servo/pull/42958#discussion_r2876253489)
for more details.

Testing: This is a very invasive change, and there are bound to be
scripts / places I have overlooked. Searching for usages of `servo` is
very hard, since it's also the name of the library.
Try run: https://github.com/servo/servo/actions/runs/22637676818

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2026-03-07 08:08:38 +00:00
Euclid Ye
29d20d56cf ci: Add jackd2 to dependency of Media Examples (#42947)
Testing: Output log is reduced to 910 lines in
[try](https://github.com/servo/servo/actions/runs/22567021352/job/65365322261#step:8:910).
Previously, it is 1400 lines, and we get error in [when start dummy
audio
device](https://github.com/servo/servo/actions/runs/22502937019/job/65194401381#step:7:13).
Fixes: Part of #42934?

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-02 09:15:40 +00:00
Jonathan Schwender
37dfa42731 Unify servo package naming (#42916)
This is a preparation for publishing to crates.io. Changes include:
- Add `servo-` prefixes to avoid name collisions on crates.io
- Use `-` instead of `_` in package names.
- Rename the crates to their original names in Cargo.toml,
  to keep the diff minimal
- Rename `media` to `servo-media-thread` to avoid name collision with
  `servo-media` (originally from the media repository).

This is an outcome of the previous discussion at [#general > Switch
remaining git dependencies to
crates.io](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Switch.20remaining.20git.20dependencies.20to.20crates.2Eio/with/576336288)

Testing: This should be mostly covered by our CI, but some amount of
breakage is to be expected, since some package names could still be
referenced from scripts which are not tested or run in CI. [mach try
run](https://github.com/jschwe/servo/actions/runs/22502945949)

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-03-01 14:15:27 +00:00
Sam
05dccf627c CI: Always switch apt mirrors before apt (#42819)
Default azure mirror suck and we already used this in linux/linux-wpt
workflows.

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-02-24 16:16:29 +00:00
webbeef
a4c5ca1070 net: Use the user locale for the Accept-Language header and navigator language (#41919)
That respects the user locale better than hardcoding en-US. This can
also be manually set with the `LANG` environment variable.

Testing: Manual testing with the devtools to check the header sent and
the value of `navigator.language`

Signed-off-by: webbeef <me@webbeef.org>
2026-02-23 13:05:21 +00:00
Martin Robinson
eeb31a3cec deps: Merge the servo/media repository (#42369)
This change merges http://github.com/servo/media into this repository.
It is only used by Servo and version upgrades are complicated by having
two repositories. In addition, this avoids the need to refer to
individual commit hashes in the Servo `Cargo.toml`. The hope is that
merging these two repositories will lead to better code organization /
simplification like we have seen with the WebXR support. Initiailly, the
idea was that this media support could be shared with the wider Rust
ecosystem, but I think that hasn't worked out as planned due to the fact
that it is difficult to use the various media packaes outside of the
Servo project and the fact that no one seems to be doing this.

Some changes were made when importing the code:
- The second commit in this PR addresses new clippy warnings from the
imported code.
 - GStreamer Packages are no longer renamed in the media code, so that
   they are named the same as they are currently in Servo.
 - Some examples are not ported as they require being run interactively
   and depend on older version of important libraries like winit.
   Having these dependencies in the core part of Servo isn't very
   convenient. Removed examples:
   - `audio_decoder.rs`: This is meant to be run interactively with a
     file so isn't very useful for testing.
   - Depended on winit GUI (`player` subdirectory):
     - `media_element_source_node.rs`
     - `play_media_stream.rs`
     - `simple_player.rs`
     - `muted_player.rs`
   - `siple_webrtc.rs`: Depended on `webrtc` library:

Testing: This is covered by existing tests. In addition, the job which
runs
the media examples is added to the unit test workflow.

---------

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-02-06 17:00:03 +00:00
Euclid Ye
962fde45f2 ci: Add 30 mins timeout to bootstrap of bencher, android, ohos, linux UT & WPT (#42249)
Also increases timeout from 10 mins to 30mins for linux build job.
Fixes: #42247

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-01-30 05:36:10 +00:00
Olexandr88
1165f7cde7 ci: bump upload-artifact to v6 (#42212)
Bump GitHub Actions upload-artifact to v6 across workflows

---------

Signed-off-by: Olexandr88 <radole1203@gmail.com>
2026-01-28 11:11:33 +00:00
Jonathan Schwender
8c85c9d1bd Further release workflow improvements (#41932)
- Allowing overriding the target repository, to allow generating regular
servo releases directly
- Releases to servo/servo require manual publishing (policy decision)
- Generate artifact attestation for the remaining artifacts.
- Remove unused `GITHUB_HOMEBREW_TOKEN` secret
- Since getting the names of release artifacts right, and keeping them
in sync can be error-prone, we now use artifact-ids and pass them around
via `outputs`, so we can't accidentally get the artifact name wrong.
- Fix a deprecation warning in `upload_nightly.py` by explicitly
creating an `Auth.Token` object, instead of just passing the token as a
string.
- We can't use `${{ env.RELEASE_REPO }}` when calling the reusable
upload_release.yml workflow, so we need to copy the expression.
- To be able to use the github token to upload releases to servo/servo
(without adding another secret, which could be leaked), we need to add
`permissions: content: write` to the release job. The nightly job
doesn't need this permission, hence there is some unfortunate
duplication. This should be improved in future work, where we can
refactor the upload_python script, to support uploading all artifacts
from a single job, instead of one per platform as we have now.

Testing:
- [manual run for servo/servo, i.e. "regular
release"](https://github.com/servo/servo/actions/runs/21217481628)
- [manual run for
servo/servo-nightly-builds](https://github.com/servo/servo/actions/runs/21214516079)

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-01-22 04:32:11 +00:00
shuppy
9e15e318f5 ci: Run mach bootstrap with --yes (#42058)
Testing: <https://github.com/servo/servo/actions/runs/21233325728>
Fixes: #42052

Signed-off-by: delan azabani <dazabani@igalia.com>
2026-01-22 03:04:09 +00:00
shuppy
e49afc31b2 ci: Run WPT jobs on self-hosted runners (#41062)
this patch enables WPT runs to use self-hosted runners, using the
changes in servo/ci-runners#90, servo/ci-runners#91,
servo/ci-runners#92, and servo/ci-runners#93 (see servo/ci-runners#21
for more details).

fallback to GitHub-hosted runners is included for now, but we can use
three self-hosted runners to do what required twenty GitHub-hosted
runners in the same amount of time (20 minutes). in the future, we may
be able to run WPT faster than that by decreasing --timeout-multiplier
or further increasing --processes, if we fix the flakes.

Testing:
- <https://github.com/servo/servo/actions/runs/19951033498> (18 **22**
18min, 0 stable unexpected)
- <https://github.com/servo/servo/actions/runs/19952863638> (18 **19**
**19**min, 0 stable unexpected)
- <https://github.com/servo/servo/actions/runs/19952882829> (16 **24**
16min, 0 stable unexpected)
- <https://github.com/servo/servo/actions/runs/19952885991> (15 **20**
**20**min, 0 stable unexpected)
- <https://github.com/servo/servo/actions/runs/19953672646> (16 **20**
18min, 0 stable unexpected)
- <https://github.com/servo/servo/actions/runs/19953675013> (**18** 17
**18**min, 0 stable unexpected)
- <https://github.com/servo/servo/actions/runs/21129181925> (16 **19**
18min, 0 stable unexpected)

Fixes: part of #38141

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Signed-off-by: delan azabani <dazabani@igalia.com>
2026-01-19 09:02:49 +00:00
Jonathan Schwender
f0b2db0994 CI: Refactor nightly release process (#41882)
This change moves the upload and attestation steps to the nightly
workflow. This results in overall slightly more code, but reduces the
amount of code that has access to extra privileges.

Additionally, this refactoring will allow to easily change the target
repo for the nightly release, i.e. allowing us to reuse the nightly
workflow for our monthly releases in the servo/servo repo (in a
follow-up PR).

We change upload_nightly to get an additional `packages` parameter, that
we use instead of a hardcoded table of expected packages per platform.
`download-artifact` doesn't preserve the whole directory structure, so
it would be a bit cumbersome to preserve that.
Since we anyway only use the upload script in CI, we can just directly
specify the packages in the CI, which also makes things slightly more
flexibel if we want to add new packages or platforms.

There are still more improvements to come, specifically also to the
`upload_nightly` script, with the goal to minimize the amount of code
that needs to be trusted.

Testing: Manually triggering the [release
workflow](https://github.com/servo/servo/actions/runs/20996682863/job/60358012404)
via workflow-dispatch.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-01-15 07:10:18 +00:00
shuppy
0a1dc7d2b8 ci: Free disk space in Linux libservo/MSRV jobs (#41509)
Fixes: #41502

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-12-24 06:35:39 +00:00
Euclid Ye
81c09a6239 CI: Use requested profile for Benchmark + Do not build/upload duplicate Linux artifact (#41367)
There are two duplicate artifacts for Linux:
1. release-binary-linux
2. linux-release 

When I unzip them, they have exactly same size and number of files, with
slightly different folder structure.

This PR only keeps `linux-release` from `./mach package` to save some
workload/space for the runner. We rename it to `release-binary-linux` to
be consistent with other OS artifacts.

Also fixed a bug where we always used release build for benchmark
instead of requested profile:
For `test-speedometer` and `test-dromaeo`, instead of passing hard-coded
profile `-r`, we use `--bin ${{ inputs.binary-path }} --profile ${{
inputs.profile }}` instead. Both `--bin` and `--profile` are necessary,
as the binary path assumed by the profile is not always correct.

Testing: Try run:
Full:
https://github.com/servo/servo/actions/runs/20330441348

macOS ARM (as it is not included in full profile nowadays):
https://github.com/servo/servo/actions/runs/20331385391

x86_64:
https://github.com/servo/servo/actions/runs/20332775039

Bencher:
https://github.com/servo/servo/actions/runs/20359208540

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-12-22 01:29:54 +00:00
Jonathan Schwender
746eb68e0c ci: Update condition to upload test results to codecov (#40988)
This should fix comments about missing junit.xml files, when the CI job
failed before executing the unit-tests.

Testing: Not tested, this is essentially a speculative fix. Not sure how
to test it.
Fixes: #40985

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-12-02 04:42:14 +00:00
Jonathan Schwender
6a2e91f9f1 CI: Add retries for unit-tests with code-coverage (#40899)
Some unit-tests are flaky, so we rerun them normally. We didn't do this
until now when measuring coverage, which has been a source of failures
for the coverage job.
Additionally, we can also remove the install lld step, since we are now
using a newer version of Rust, where we can just use lld out of the box.

Testing: [mach try
linux-coverage](https://github.com/servo/servo/actions/runs/19704473261)

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-11-26 13:32:46 +00:00
shuppy
795e5b4fb3 ci: Remove self-hosted runner timeout jobs (#40876)
the runner timeout jobs are a helpful safeguard against bugs (or github
infra failures) that cause jobs to not get picked up by self-hosted
runners, but all they do is wait two minutes and cancel the run,
clogging up our github-hosted runner capacity (limited to 60).

this patch removes the timeout jobs, based on the expectation that our
CI system is reliable enough to not need that automated safeguard.

if you have a build that gets stuck on “Waiting for a runner to pick up
this job...”, it may be a bug or a github infra failure. you can cancel
the build yourself, but please take a screenshot and report it first!

Testing:
- [mach try windows linux
lint](https://github.com/servo/servo/actions/runs/19659755273)

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-11-25 12:02:24 +00:00
shuppy
82ef0523b3 ci: Use new queue API for self-hosted runners (#40852)
this patch enables CI jobs to queue for self-hosted runners by bumping
our actions to servo/ci-runners#69, and bumping our runner-select and
runner-timeout jobs to ubuntu-24.04 (for better retry support in curl).

this should further speed up our builds by allowing more jobs to run on
self-hosted runners: if a job would take 5x as long on github-hosted
runners, then we can wait up to 80% of that time for a self-hosted
runner and still win.

for now, though, jobs will queue for self-hosted runners for up to
[**one
hour**](44317e3cd8/actions/runner-select/action.yml (L131-L133))
(note that you won’t have to wait if the servers are down). if your
request for a self-hosted runner can’t be satisfied immediately, it will
look like
[this](https://github.com/servo/servo/actions/runs/19624089967/job/56189690571#step:2:161):

```
POST https://ci0.servo.org/queue/enqueue?unique_id=92a9e758-f8e2-4301-b4a4-304178a656ae&qualified_repo=servo/servo&run_id=19624089967

POST https://ci0.servo.org/queue/take/92a9e758-f8e2-4301-b4a4-304178a656ae
curl: (22) The requested URL returned error: 503
curl: (22) The requested URL returned error: 503
curl: (22) The requested URL returned error: 503
... [repeating for up to one hour]
```

to check where you are in the queue, go to
<https://ci0.servo.org/queue/> (it’s currently very rudimentary):

<img width="1370" height="797" alt="image"
src="https://github.com/user-attachments/assets/57d7e651-8250-48f4-8321-df5c575924ac"
/>

Testing:
- mach try windows:
[1](https://github.com/servo/servo/actions/runs/19624074289/job/56189642435#step:2:161),
[2](https://github.com/servo/servo/actions/runs/19624077577/job/56189654083#step:2:161),
[3](https://github.com/servo/servo/actions/runs/19624079336/job/56189657185#step:2:161),
[4](https://github.com/servo/servo/actions/runs/19624089967/job/56189690571#step:2:161),
[5](https://github.com/servo/servo/actions/runs/19624100902/job/56189714525#step:2:161),
[6](https://github.com/servo/servo/actions/runs/19624102672/job/56189717605#step:2:161)
- mach try windows linux lint:
[1](https://github.com/servo/servo/actions/runs/19624555146),
[2](https://github.com/servo/servo/actions/runs/19624560177),
[3](https://github.com/servo/servo/actions/runs/19624562199),
[4](https://github.com/servo/servo/actions/runs/19624564171),
[5](https://github.com/servo/servo/actions/runs/19624566167),
[6](https://github.com/servo/servo/actions/runs/19624568092)

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-11-25 02:25:21 +00:00
Sam
8cd19d58ec CI: only upload test results to codecov if unit-test are actually run (#40739)
This should prevent comments like this:
https://github.com/servo/servo/pull/40736#issuecomment-3552372357

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-11-19 14:24:13 +00:00
Jonathan Schwender
403e3d49d0 Replace codecov/test-results-action (#40718)
https://github.com/codecov/test-results-action
The repository now carries a deprecation warning and warns about upload
issues (which we seem to be hitting).
Migrate to the codecov action as recommended.

Testing: CI change
Fixes: Should hopefully fix CI errors.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-11-18 14:34:11 +00:00
Jonathan Schwender
eca996ada3 Upload junit report of unit-tests in CI (#39897)
This should help identify flaky unit tests, since codecov will gather
statistics of tests (of the last 60 days) and allow us to easily
identify flaky unit-tests. [Test page on
codecov](https://app.codecov.io/github/servo/servo/tests) based on an
uploaded report from a try run.
Additionally add a catch-all parameter for `test-unit` which is passed
through to the `cargo nextest` invocation, useful for e.g. stressing a
test via `--stress-count`.

Testing: Manually tested with [try
run](https://github.com/servo/servo/actions/runs/18529823800)

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-11-17 15:07:56 +00:00
Sam
c20aeaa10a CI: use --profile instead of profile shorthands (#38644)
Before, we used shorthands for profiles selection (`--release`,
`--production`), but it would be more correct to just use actual
`--profile` so we do not need shorthands for all of them.

Motivation: I want to create "profiling" builds in CI.

Testing: CI change is covered by CI.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-11-16 07:21:02 +00:00
WaterWhisperer
a6cc0ec0fe chore: Update actions/checkout to @v5 (#40606)
update all occurences (in `servo/.github`) to v5

Testing: None
Fixes: #40604

Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
2025-11-13 14:00:19 +00:00
eri
eb6ca612c3 Remove tshark from mach bootstrap (#40506)
`mach bootstrap` no longer installs Wireshark, as it isn't useful for
people not working directly on DevTools support. The linux runner that
runs `mach test-scripts` now installs it manually, skipping the security
prompt.

Testing: Manual test of `mach test-scripts`
Fixes: #40503

Signed-off-by: eri <eri@igalia.com>
2025-11-08 18:42:33 +00:00
shuppy
900f0605bc ci: Move runner-select and runner-timeout to servo/ci-runners (#40235)
continuing from #40234, this patch moves the runner-select and
runner-timeout composite actions to
[servo/ci-runners](https://github.com/servo/ci-runners), avoiding an
extra checkout step. the action calls are locked to a commit, to avoid
problems when making breaking changes.

while [servo/actions](https://github.com/servo/actions) is a reasonable
place to store this action, i’m planning to document our self-hosted CI
system and potentially make it usable by other projects, and this action
is effectively part of that system. that said, actions in that repo will
undergo
[review](00deefd2be)
as if they were in this repo. feel free to check the actions being
adopted in this patch:
[runner-select](0b9edd4938/actions/runner-select/action.yml),
[runner-timeout](0b9edd4938/actions/runner-timeout/action.yml).

Testing:
- GitHub-hosted:
[full](https://github.com/delan/servo/actions/runs/19126025419),
[coverage](https://github.com/delan/servo/actions/runs/19126126210/job/54656556991)
- self-hosted:
[full](https://github.com/servo/servo/actions/runs/19126029083),
[coverage](https://github.com/servo/servo/actions/runs/19126130030/job/54656604357)

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-11-06 10:55:10 +00:00
shuppy
c0f51d53fa ci: Extract fast checkout steps into composite action (#40234)
this patch extracts the “faster checkout” steps we use for jobs that may
run on self-hosted runners into a composite action. the action is stored
in [servo/ci-runners](https://github.com/servo/ci-runners), to avoid an
extra checkout step, and the action calls are locked to a commit, to
avoid problems when making breaking changes.

while [servo/actions](https://github.com/servo/actions) is a reasonable
place to store this action, i’m planning to document our self-hosted CI
system and potentially make it usable by other projects, and this action
is effectively part of that system. that said, actions in that repo will
undergo
[review](00deefd2be)
as if they were in this repo.

Testing:
- self-hosted:
[windows](https://github.com/servo/servo/actions/runs/19125076579/job/54653625055#step:2:25),
[lint](https://github.com/servo/servo/actions/runs/19125076579/job/54653630737#step:2:21)
- GitHub-hosted:
[windows](https://github.com/delan/servo/actions/runs/19125003933/job/54653410264#step:2:25),
[lint](https://github.com/delan/servo/actions/runs/19125003933/job/54653410010#step:2:21)

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-11-06 04:46:09 +00:00
Jonathan Schwender
4fb71cc17e ci: Fix unit-test coverage (#40317)
`linker-features` stabilized in rust 1.90, so using it with -Z causes ci
to fail.
lld is also the default on linux now, so we can just remove the feature.

Testing: [Try
run](https://github.com/servo/servo/actions/runs/18976287667)
Fixes: #40313

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-10-31 15:27:37 +00:00
shuppy
57c164cb97 ci: Tokenless self-hosted runner select (#39900)
one of the biggest gaps in our self-hosted runner coverage is that pull
request checks can’t run on self-hosted runners, because reserving a
runner currently requires a MONITOR_API_TOKEN secret that is unavailable
to pull requests.

this patch replaces the authenticated requests to POST
/profile/&lt;image>/take?unique_id&amp;qualified_repo&amp;run_id with
unauthenticated requests to [POST
/select-runner?unique_id&amp;qualified_repo&amp;run_id](05c1f39552 (diff-b0e8b5236a6e3e0caf095b712a138e85b40d207453f8a436c43de989f4d5eabeR236)),
in the runner select jobs. to guard the CI monitors against abuse, the
runner select job must prove that its request was genuine by uploading a
small artifact containing the parameters of that request, which the
monitors can then
[verify](05c1f39552 (diff-b0e8b5236a6e3e0caf095b712a138e85b40d207453f8a436c43de989f4d5eabeR253-R286)).
once the job is marked as done, the monitors will
[refuse](05c1f39552 (diff-b0e8b5236a6e3e0caf095b712a138e85b40d207453f8a436c43de989f4d5eabeR242-R252))
further reservation requests.

note that the old authenticated endpoint still works, so this patch can
be reverted if anything breaks, or we can turn it off with the usual
methods (force-github-hosted-runner or NO_SELF_HOSTED_RUNNERS).

Testing:
- before (38min)
<https://github.com/servo/servo/actions/runs/18547747551/job/52869138042>
- after (8min)
<https://github.com/servo/servo/actions/runs/18834479889/job/53732619984>

Fixes: part of #38141

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-10-27 10:05:49 +00:00
shuppy
3c274f89cf ci: Disable devtools tests for now (#39898)
they are still flaky, and i don’t have time to debug them yet.

Related: #39273

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-10-15 13:58:24 +00:00
Jonathan Schwender
6d0db7d623 Fix coverage job on self-hosted runners by installing nextest. (#39895)
`./mach test-unit` now requires nextest.
`./mach bootstrap` is skipped on self-hosted runners, which don't have
nextest installed yet, so we need to install it manually. The action is
also much faster than installing from source, so this also benefits the
github-hosted coverage job.

Testing: Not needed, this just installs another tool in CI.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-10-15 12:14:08 +00:00
Jonathan Schwender
8ec1e6e731 ci: Use nextest --retries in CI (#39817)
Follow-up to #39812, using nextests builtin retry feature to rerun flaky
unit-tests.
This also adds a per-test timeout, replacing the global timeout set for
the retry action. We could also add a global timeout for nextest tests,
but per-test timeouts should be sufficient and noticably speedup CI when
individual unit tests get stuck.

Testing: [mach
try](https://github.com/servo/servo/actions/runs/18519094535) running
the unit-tests with retries in CI.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-10-15 08:59:15 +00:00
Jonathan Schwender
4b578671b0 testing: Use nextest for unit-tests (#39812)
Nextest is a powerful test runner, with many advantages over cargo test.
Among others it will run each test in a separate process, provide a
summary of the completed test execution, supports output formats like
JUnit, and can handle flaky test by retrying. This PR does not use most
of these advanced features yet though, that will be left to future PRs.

The change also uncovered racy tests in `net` which rely on someone
initializing the `ASYNC_RUNTIME` before the test in questions is run. By
explicitly accessing the lazy static in a common setup routine, we make
sure it is initialized.

CLI differences of `cargo test` vs `cargo nextest`: 

- The `--profile` option in nextest is not the cargo profile, but refers
to nextest configuration profiles.
- `--nocapture` is a direct argument to nextest, not to the testharness,
so we can remove the preceding `--` seperator.

Testing: Tested by running unit-tests in CI
Fixes: #39797

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-10-14 19:29:54 +00:00
Jonathan Schwender
967c92fa6c Add unittest code coverage to CI (#39855)
Re-land #39789, which was reverted due to #39842. The missing coverage
input in the try-label workflow is added now.

Testing: Manually verified that all occurrences of `uses:
./.github/workflows/dispatch-workflow.yml` have the `coverage` parameter
added.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Sam <16504129+sagudev@users.noreply.github.com>
2025-10-14 11:16:58 +00:00
Oriol Brufau
f82a604268 Revert "Add unittest code coverage to CI " (#39843)
Reverts servo/servo#39789

Reason: It broke try labels

Testing: Unneeded, just a revert
Fixes: #39842

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-10-13 20:59:37 +00:00
Jonathan Schwender
07ff87754d Add unittest code coverage to CI (#39789)
Add a CI workflow to determine the code coverage. For now we only run
unit-tests, wpt-tests with code coverage can be added later.
We use `lld` to avoid OOM errors during linking (with `ld`, we would
need to reduce the build-concurrency drastically to prevent OOM errors
in CI)
For now, coverage would run during `full` and on-demand (i.e explicitly
requested via try). This workflow failing should not influence the
merge-queue, since we intentionally don't add this workflow to the
required status checks (yet).

Future work: It still needs some investigation to figure out if we can
get pull-request comments from the codecov bot, for coverage runs on try
branches.


Testing: [try
run](https://github.com/servo/servo/actions/runs/18431480782/job/52519348479),
[codecov report from the try
run](f41a50f321)

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Sam <16504129+sagudev@users.noreply.github.com>
2025-10-13 18:17:24 +00:00
shuppy
b675180fe7 ci: Run bencher jobs on self-hosted runners (#39272)
some bencher jobs, specifically linux release profile jobs, measure
runtime perf by running speedometer and dromaeo. doing this on
GitHub-hosted runners is suboptimal, because GitHub-hosted runners are
not under our control and their performance can vary wildly depending on
what hosts we get and how busy they are.

this patch depends on #39270 and #39271, and the new
[ci3](https://ci3.servo.org/) and [ci4](https://ci4.servo.org/) servers
deployed in servo/ci-runners#49. these servers provide a more controlled
environment for benchmarking by using known hardware that runs one job
at a time and no other work (servo/project#160), with some of the
[techniques](https://github.com/servo/servo/wiki/Servo-Benchmarking-Report-(October-2024)#methodology)
[we’ve](https://github.com/servo/servo/wiki/Servo-Benchmarking-Report-(November-2024)#methodology)
[developed](https://github.com/servo/servo/wiki/Servo-Benchmarking-Report-%28December-2024%29#methodology)
for accurate measurement:
- [we disable CPU frequency boost and
hyperthreading](364719f210...5c02999bbc (diff-e6f17b25776ca26c2880cc3a4e3b99a0642ea968a8d6214763cb6467cc1251cfR239-R256))
- [we pin guest CPUs to specific host
CPUs](364719f210...5c02999bbc (diff-cdaac247bfd7d30f8c835083adab39c7ead8791802498285ea2ce9e023cc5f06R15-R26))
- [we isolate a subset of CPUs from all processes and scheduling
interrupts](364719f210...5c02999bbc (diff-e6f17b25776ca26c2880cc3a4e3b99a0642ea968a8d6214763cb6467cc1251cfR97-R102))
- the bencher workflow does not take advantage of this yet, but it will
in a later patch

to use ci3 and ci4 for bencher jobs, we add them to the list of
self-hosted runner servers, then make the bencher workflow try to find a
servo-ubuntu2204-bench runner if speedometer and/or dromaeo have been
requested. to avoid mixing data, we set the bencher “testbed” based on
where the runner came from:
- for GitHub-hosted runners, we continue to use “ubuntu-22.04”
- for runners on ci3 or ci4, we use
“self-hosted-image:[servo-ubuntu2204-bench](e911a23eff/profiles/servo-ubuntu2204-bench)”

Testing:
- before, always GitHub-hosted: [job
run](https://github.com/servo/servo/actions/runs/18276911520/job/52032330450)
→
[report](https://bencher.dev/perf/servo/reports/86aa60cc-9d42-418f-a639-07b8604b30fb)
- after, self-hosted: [job
run](https://github.com/servo/servo/actions/runs/18404778338/job/52442477058)
→
[report](https://bencher.dev/perf/servo/reports/6feed0ac-655a-4e17-9351-41cba8d283b2)
- after, GitHub-hosted: [job
run](https://github.com/servo/servo/actions/runs/18404806546/job/52442697457)
→
[report](https://bencher.dev/perf/servo/reports/235a4ee0-340d-458b-9be4-953568b0923d)
- there are also counterparts for other platforms in the workflow runs
above

Fixes: #39269

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-10-13 12:29:40 +00:00
shuppy
059a2fd86d ci: Convert runner select to composite action (#39270)
to run bencher builds on self-hosted runners (#39269), we will need to
do a self-hosted runner select, but that would exceed the workflow call
depth limit (try → dispatch-workflow → linux → bencher →
self-hosted-runner-select).

this patch converts the self-hosted runner select from a [reusable
workflow](https://docs.github.com/en/actions/concepts/workflows-and-actions/reusable-workflows)
to a [composite
action](https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action),
much like #38503 did for the runner timeout.

Testing:
- self-hosted
<https://github.com/servo/servo/actions/runs/17674919359/job/50235098986>
- GitHub-hosted
<https://github.com/delan/servo/actions/runs/17674928875/job/50234708810>

Fixes: part of #39269

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-09-15 04:54:43 +00:00
shuppy
2b2ea05c12 ci: Make runner timeout jobs conditional, not the steps (#39268)
#38503 converted the self-hosted runner timeout from a [reusable
workflow](https://docs.github.com/en/actions/concepts/workflows-and-actions/reusable-workflows)
to a [composite
action](https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action),
but in doing so, it changed from having a conditional job to having a
conditional step. [This Update Broke My
Workflow](https://xkcd.com/1172/), because i enjoyed being able to tell
if a job ended up being GitHub-hosted or not by seeing if its timeout
job was skipped, rather than having to click on the workload job then
wait then scroll up then click “Set up job”.

this patch fixes that by making the job conditional.

Testing:
- self-hosted
<https://github.com/servo/servo/actions/runs/17674214808/job/50232483209>
- GitHub-hosted
<https://github.com/delan/servo/actions/runs/17674531369/job/50233465791>

Fixes: #39192

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-09-12 14:04:59 +00:00
atbrakhi
268a0eeb2d ci: Reland run devtools tests whenever we run unit tests from #38614 (#39267)
This patch updates `linux.yml`, `mac.yml`, and `windows.yml` to run the
devtools test suite (https://github.com/servo/servo/issues/36325).


Testing: this patch effectively adds all devtools tests to CI
Fixes: https://github.com/servo/servo/issues/36325

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: Delan Azabani <dazabani@igalia.com>
2025-09-12 11:14:38 +00:00
Sam
286bbe6cb1 CI: Change APT mirror priorities (#39190)
We noticed many times that bootstrap sometimes takes a lot of time due
to slow download speed: [#general > Bootstrap is slow in CI @
💬](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Bootstrap.20is.20slow.20in.20CI/near/537610373).
We [reported this to
github](https://github.com/actions/runner-images/issues/12949) and they
said we should just use different mirrors. Based on
https://github.com/CrowdStrike/glide-core/pull/1113 we change Ubuntu's
mirror priorities from:
```
http://azure.archive.ubuntu.com/ubuntu priority:0
https://archive.ubuntu.com/ubuntu priority:1
https://security.ubuntu.com/ubuntu priority:2
```
to:
```
https://archive.ubuntu.com/ubuntu priority:0
http://azure.archive.ubuntu.com/ubuntu priority:1
https://security.ubuntu.com/ubuntu priority:2
```
I also set more strict timeout (10 min; usually it takes 2-3 min but
always less then 4 min) for bootstrap to alert us on problems.

Testing: Manual CI run:
https://github.com/sagudev/servo/actions/runs/17527791255

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-09-07 13:38:42 +00:00
Martin Robinson
20ad1ce84e Revert "ci: Run devtools tests whenever we run unit tests (#38614)"
This reverts commit 47aa9ea8cf.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-08-13 07:53:20 -07:00
Jonathan Schwender
4b91dc6d82 CI: Check MSRV in CI (#37152)
As previously proposed on zulip and discussed in the coordination
meeting, add a check to CI to see if
servo still compiles with our minimum supported Rust version.
To avoid requiring changes, we define our MSRV as the current version we
are using now (1.85.0).

This does not prevent us from updating the default compiler version,
which we should still do, to
get benefits like faster compile times, newer lints and making sure
crown stays up-to-date.

We simply test that libservo compiles in CI, since libservo (and
dependencies) is what embedders would care about. We also don't need
mach (or bootstrap!) for this, so we just use cargo build.

Testing: This PR adds a CI test. [`./mach try windows-build-libservo
linux-build-libservo
mac-build-libservo`](https://github.com/jschwe/servo/actions/runs/16901171766)

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-08-12 19:19:45 +00:00
shuppy
47aa9ea8cf ci: Run devtools tests whenever we run unit tests (#38614)
this patch updates linux.yml, mac.yml, and windows.yml to run the
devtools test suite (#36325), whenever unit tests are enabled in those
workflows. plus three changes that speed up the tests from 73 → 65 → 56
→ 51 seconds:

- we replace the hardcoded sleep(1) after starting servoshell with a
loop that waits until the devtools port is open (this also fixes
intermittent failures when servoshell starts too slowly, especially on
macOS)
- we start the internal web servers once, and reuse them across all
tests
- we run servoshell in headless mode (this is also required because most
CI runners have no GUI)

finally we fix two bugs that cause very noisy but not very interesting
error messages:

- in the test code, we use a [context
manager](https://docs.python.org/3/reference/datamodel.html#context-managers)
to ensure the devtools client is disconnected unconditionally, even if
test methods or assert helper methods raise exceptions (this was causing
errors on all platforms)
- in the devtools server, we treat “connection reset” errors when
reading from the client like a normal EOF, rather than as a failure
(this was causing errors on Windows)

on self-hosted linux builds, there are still spurious error messages
like the following, but we can fix them later:

```
error: XDG_RUNTIME_DIR not set in the environment.
libEGL warning: egl: failed to create dri2 screen
```

Testing: this patch effectively adds 44 tests to CI
Fixes: #36325

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2025-08-12 15:10:45 +00:00
Jonathan Schwender
c055e8b456 ci: Move runner-timeout to composite action (#38503)
We are hitting the limit of 20 workflow references in servo. To help
mitigate this somewhat, we migrate the timeout job to a composite
action, which should be able to support our needs just as well.

Testing: [try run of this
PR](https://github.com/servo/servo/actions/runs/16783916103/job/47529580725).
[try run with unconditional
cancel](https://github.com/servo/servo/actions/runs/16784074213/job/47530099654).

This reduces our workflow count by one, slightly helping to address
#36143

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-08-07 05:13:36 +00:00
sagudev
c0339dd360 CI: add build-args (#36947)
Add `build-args` input in CI and try_parser job definition so we can
pass own build args to `./mach build`

Testing: There are tests for try parser and I tested CI in my fork.
Fixes: partial fix #36823

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-05-12 07:41:12 +00:00
sagudev
bd9242acfa CI: Add number_of_chunks (#36584)
This allows changing number of chunks used for WPT testing (sometimes
useful for WebGPU).

Testing: Manual try runs
Fixes: #30062

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-04-18 06:38:28 +00:00