mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
Instead of install full dependencies with `install-deps` in GitHub action, minimize dependencies because we use GitHub only for document generation. - Passed `CARGO_DOC` environment when running cargo-doc command so we can skip unnecessary build flow when we just want to generate API docs. - Added a new script `install-docs-deps` to install only doc-related dependencies. BUG=none TEST=test on GitHub Action at my personal repository Change-Id: Ibe988ab43215e285d946812bdd6c1536ae87b50e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3578144 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Anton Romanov <romanton@google.com> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
23 lines
746 B
Rust
23 lines
746 B
Rust
// Copyright 2019 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.
|
|
|
|
fn main() {
|
|
// Skip installing dependencies when generating documents.
|
|
if std::env::var("CARGO_DOC").is_ok() {
|
|
return;
|
|
}
|
|
|
|
#[allow(clippy::single_match)]
|
|
match pkg_config::probe_library("libvda") {
|
|
Ok(_) => (),
|
|
// Ignore pkg-config failures on non-chromeos platforms to allow cargo-clippy to run even
|
|
// if libvda.pc doesn't exist.
|
|
#[cfg(not(feature = "chromeos"))]
|
|
Err(_) => (),
|
|
#[cfg(feature = "chromeos")]
|
|
Err(e) => panic!("{}", e),
|
|
};
|
|
|
|
println!("cargo:rustc-link-lib=dylib=vda");
|
|
}
|