This allows us to use `uv` for:
1. Installing a pinned Python version
2. Installing the dependency packages using `uv`'s pip compatible interface.
4. Bootstrapping `mach` without a Python installion on the host, using `uv
run`
This change also introduces a new 'composite' GitHub action to setup
python in the different CI workflows. There is no support for externally
managed python installations and virtual environments. These could be
added in the future.
Fixes#34095, #34547
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Bump bindgen to 0.71.1
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Set SCCACHE_GHA_VERSION to allow purging cache
changing the version allows us to purge the cache.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* android CI: Enable sccache again
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This change uses Gradle's official `setup-gradle` action to allow the
caching of the downloaded gradle distribution and java dependencies in
the GitHub Actions cache. However, since the initial download of gradle
distribution is still handled by the `gradlew` wrapper script which
doesn't retry on network failures, this change also adds a simple retry
mechanism using shell scripting.
Fixes#34600
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This is to see if #34571 is related to caching in anyway. There is no
easy way to delete all Github Action caches using Github UI or cli.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This patch switches servo to use `uv` for both installing a pinned
Python version as well as installing the dependency packages using
`uv`'s pip compatible interface. It also introduces a new 'composite'
GitHub action to setup python in the different CI workflows.
There is no support for externally managed python installations and
virtual environments. These could be added in the future.
Fixes#34095
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Job will do some performance benchmarks (Dromeo, Speedometer) and mesure binary size and will report results to bencher.dev
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: DK Liao <dklassic@gmail.com>
SDK Version 5.0.1 was recently released and bumps the
API-version to 13.
This means hvigor will refuse to package the app, since
we currently specify that our app targets API 12.
Hence, we clarify our version by also specifying the patch level.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Most of the time layout-2013 is not needed and just
wastes build time. Disable the optional feature by
default and require users to specify the feature
at compile time if they wish to use the legacy layout.
In CI we enable the feature by default for Linux, since
that we need it for wpt tests with the legacy layout
and CI should ensure that the legacy code continues
to compile.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* ohos: Add basic IME and keyboard support
- Add extremely basic support for keyboard events
- Add basic IME support
- Showing and hiding the IME
- inserting text
- deleting characters
- very basic configuration of the IME
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Apply suggestions from code review
Improve the log message
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
* Update ports/servoshell/egl/ohos.rs
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
* ohos: Bump the minimum required SDK version to 5.0
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Remove pub from callbacks
The callbacks don't need to be public, as we will be registering them.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Rename composition event
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: clippy in log
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: address some clippy warnings
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Raise Error in mach if unsupported SDK version is used.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Add keyboard-types dependency for android
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
* bump napi-ohos* crates to 1.0.2
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* dependabot: group napi-ohos related updates
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
wptrunner breaks macos builds because it doesn't work well with 3.13 due
to two issues:
1. The current version (10.3.0) of the 'pillow' dependency of wptrunner
breaks with >=3.13 and needs to be upgraded.
2. Python 3.13 has removed the 'cgi' module which was deprecated in 3.11
and has no direct replacement. There are two files in wptrunner that
use the cgi module and one of them is the vendored 'html5lib'.
As a quick fix, pin the Python version on MacOS runner until
web-platform-tests/wpt#48585 is addressed.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* CI: Bump setup-ohos-sdk to v0.1.4
v0.1.3 had a bug when the SDK was restored from cache.
This was fixed upstream, andcache-hit behavior is now also
tested in upstream CI.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* CI: Use major tag again for setup-ohos-sdk
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This seems to be necessary now, in much the same way it is necessary on
a normal Ubuntu system. I'm not sure what changed that this is now
required.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Github has updated the `ubuntu-latest` label to use 24.04, but that
breaks the lint job. Since the build job (github hosted and self hosted
runners) still explicitly use 22.04, pin the same version for lint job
until we upgrade all the workflows together.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
The most recent [v0.1.3] release seems to not set the expected
OHOS_SDK_NATIVE and OHOS_BASE_SDK_HOME environment variables.
This is causing the OHOS builds to fail in CI and blocking the merge
queue. This change pins he action to the last known good version until
the error can be addressed upstream.
Fixes#33712.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: publish nightly builds for aarch64
Publish the aarch64 apk and aar packages to both Github Releases
and S3 so that it can be linked from servo.org.
The focus is on getting a working version of the APK on the homepage,
so few issues are resolved with temporary solutions:
1) We publish the "release" profile instead of "production" since the
latter will need changes in the gradle configuration (the changes
required was previously blocked on #32720 which is now closed).
2) The scheme for the version code is simple and doesn't consider
other factors such as API level and product variants discussed in the
Android docs (https://developer.android.com/google/play/publishing/multiple-apks#VersionCodes)
This should be fine for now as we don't publish to any store yet.
The change also makes it so that the 'Release nightly' workflow will
endup building all 4 variants for the Android target, but only aarch64
is uploaded. This is because GH Actions doesn't have a good way to skip
a specific job in a matrix and the additionally code complexity needed
to acheive it (either generating a JSON dynamically in a new job and using
`fromJSON` in the matrix definition or skipping each individual step
based on matrix.target and `inputs.upload`) didn't seem worth the cost
saved (this is executed only once a day).
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: add attestation for nightly build artifacts
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* CI: use self-hosted runners for Linux build jobs
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Set ccache and incremental env variables when not self-hosted
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Force GitHub-hosted runner when in upload mode
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Revert s/python/python3/ now that our image has python
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Remove stray comment in timeout workflow
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Update description of runner-select job
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Apply suggestions from code review
Address couple minor naming / formatting nits
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* CI: use self-hosted Windows runners in main workflow
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix a couple of robustness issues by generating a unique build id
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Work around needs-context expressions being busted in concurrency
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* CI: use self-hosted Windows runners in try and try-label workflows
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Rename windows workflow back for simplicity
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Clarify why the copy resources step is for GitHub-hosted jobs only
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix cancelled status problem by dispatching instead of calling
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Tweak retry strategy to avoid hitting REST API rate limits
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Update dispatch-workflow.yml accordingly
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Rework to use simpler approach with runner labels
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Use org-scoped self-hosted runners
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Don’t run runner-timeout job when GitHub-hosted runner is selected
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Downgrade to Python 3.10
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Avoid failing when RUNNER_API_TOKEN is missing (such as in forks)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix undefined needs output when RUNNER_API_TOKEN is missing
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Reset working tree, in case it was dirty in the runner image
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Clearer runner assignment timeout jobs that fail and offer help
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix some other sources of incremental build breakage (but not PATH)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Log reasons why we fall back to GitHub-hosted runners
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Allow self-hosted runners to be disabled via repository variable
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Always install crown, even on self-hosted runners
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Rename incremental build debugging step
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Clean up job friendly names
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Reduce fetch depth, now that this job no longer lints
Signed-off-by: Delan Azabani <dazabani@igalia.com>
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Introduce a new `BuildTarget` abstraction to centralize the code for
supporting different ways of choosing the build target (e.g --android,
--target x86_64-linux-android , --target aarch64-linux-ohos). This
is currently handled in an adhoc fashion in different commands (
mach package, install, run) leading to a proliferation of keyword
parameters for the commands and duplicated logic.
The patch introduces a new `allow_target_configuration` decorator to
do the validation and parsing of these parameters into the appropriate
`BuildTarget` subclass, which is now stored as an instance attribute
of the CommandBase class. All the code that previously relied on
`self.cross_compile_target` has been switched to use the BuildTarget.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* ohos: Fix compilation for x86_64
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Use the SDK compiler-wrapper
When compiling for x86_64-unknown-linux-ohos without the compiler
wrapper, for some reason mozjs_sys will be refercing a wrong mangled symbol
resulting in the following error when loading the .so at runtime:
```
_ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE: symbol not found
```
This problem does not occur when compiling for aarch64 or when using the compiler wrapper.
In this case the correct symbol
`_ZNSt4__n111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE`
is referenced.
It's unclear why manually passing the flags via CFLAGS / CXXFLAGS does not work.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>