mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
9d7887049d
This should fix the GitHub Action as well. BUG=none TEST=kokoro TEST=Run GitHub Action on my crosvm fork Change-Id: Iff00d7d68c8dc38cda8222850bcc06ba2b558d01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3327801 Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Dennis Kempin <denniskempin@google.com> Commit-Queue: Dennis Kempin <denniskempin@google.com>
43 lines
886 B
Bash
Executable file
43 lines
886 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Copyright 2021 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
set -ex
|
|
|
|
# Build cargo-doc
|
|
# $ ./tools/cargo-doc --target-dir /path/to/dir
|
|
|
|
echo "start cargo-doc"
|
|
|
|
MANIFEST_PATH=$(dirname "$0")/../Cargo.toml
|
|
|
|
echo "manifest = ${MANIFEST_PATH}"
|
|
|
|
DISABLED_FEATURES=(
|
|
audio_cras
|
|
chromeos
|
|
libvda
|
|
power-monitor-powerd
|
|
video-decoder
|
|
video-encoder
|
|
)
|
|
|
|
ALL_FEATURES=$(
|
|
cargo metadata --manifest-path "${MANIFEST_PATH}" | \
|
|
jq -r '.packages[] |
|
|
select(.name == "crosvm") |
|
|
.features |
|
|
keys[]')
|
|
|
|
features=""
|
|
|
|
for f in $ALL_FEATURES; do
|
|
if [[ ! "${DISABLED_FEATURES[*]}" =~ $f ]]; then
|
|
features+=",${f}"
|
|
fi
|
|
done
|
|
|
|
cargo doc \
|
|
--manifest-path="${MANIFEST_PATH}" \
|
|
--features="${features}" "$@"
|