mirror of
https://github.com/servo/servo.git
synced 2025-09-27 07:10:19 +01:00
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>
21 lines
785 B
YAML
21 lines
785 B
YAML
name: Parse rust-version from libservo
|
|
description: "Parse rust-version from libservo. Requires cargo-metadata."
|
|
outputs:
|
|
rust_version:
|
|
description: "Minimum rust-version defined by libservo"
|
|
value: ${{ steps.parse_version.outputs.LIBSERVO_RUST_VERSION }}
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Parse libservo version
|
|
id: parse_version
|
|
shell: bash
|
|
run: |
|
|
msrv=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "libservo") | .rust_version')
|
|
if [[ "${msrv}" == "null" ]]; then
|
|
echo "Failed to determine MSRV of libservo"
|
|
exit 1
|
|
fi
|
|
echo "libservo has a minimum supported Rust version of ${msrv}."
|
|
echo "LIBSERVO_RUST_VERSION=${msrv}" >> "$GITHUB_OUTPUT"
|