Debian Codegraph @

.cargo/vendor/zerocopy/ci/check_all_toolchains_tested.sh

raw
1 #!/usr/bin/env bash
2 #
3 # Copyright 2024 The Fuchsia Authors
4 #
5 # Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
6 # <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
7 # license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
8 # This file may not be copied, modified, or distributed except according to
9 # those terms.
10
11 set -eo pipefail
12
13 # Check whether the set of toolchains tested in this file (other than
14 # 'msrv', 'stable', and 'nightly') is equal to the set of toolchains
15 # listed in the 'package.metadata.build-rs' section of Cargo.toml.
16 #
17 # If the inputs to `diff` are not identical, `diff` exits with a
18 # non-zero error code, which causes this script to fail (thanks to
19 # `set -e`).
20 diff \
21 <(cat .github/workflows/ci.yml | yq '.jobs.build_test.strategy.matrix.toolchain | .[]' | \
22 sort -u | grep -v '^\(msrv\|stable\|nightly\)$') \
23 <(cargo metadata -q --format-version 1 | \
24 jq -r ".packages[] | select(.name == \"zerocopy\").metadata.\"build-rs\" | keys | .[]" | \
25 sort -u) >&2