From b0ae5378c618322320217fab5d258f26b1bb9802 Mon Sep 17 00:00:00 2001 From: Zach Reizner Date: Fri, 30 Apr 2021 11:23:16 -0700 Subject: [PATCH] ci: install bindgen and required header files The cras client library has switch to build time generation for their Rust bindings and requires the bindgen binary and the usual standard header files to run the build script. This change adds those needed components to the Docker images so that kokoro may work again. BUG=None TEST=./test_all Change-Id: Ib16b164f44d536be84f9ecca6b5187eaba7d57ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2863167 Reviewed-by: Dennis Kempin Reviewed-by: Daniel Verkamp Reviewed-by: Abhishek Pandit-Subedi Tested-by: kokoro Commit-Queue: Zach Reizner --- ci/crosvm_aarch64_builder/Dockerfile | 1 + ci/crosvm_base/Dockerfile | 11 ++++++----- ci/image_tag | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/crosvm_aarch64_builder/Dockerfile b/ci/crosvm_aarch64_builder/Dockerfile index e4e2000852..f3fac78652 100644 --- a/ci/crosvm_aarch64_builder/Dockerfile +++ b/ci/crosvm_aarch64_builder/Dockerfile @@ -29,6 +29,7 @@ RUN apt-get update && apt-get install --yes --no-install-recommends \ qemu-user-static RUN apt-get install --yes --no-install-recommends -o APT::Immediate-Configure=false \ + libc-dev:arm64 \ libcap-dev:arm64 \ libdbus-1-dev:arm64 \ libdrm-dev:arm64 \ diff --git a/ci/crosvm_base/Dockerfile b/ci/crosvm_base/Dockerfile index 2117a32199..7a32fe7803 100644 --- a/ci/crosvm_base/Dockerfile +++ b/ci/crosvm_base/Dockerfile @@ -20,10 +20,13 @@ RUN echo 'APT::Default-Release "stable";' >/etc/apt/apt.conf.d/99_default_stable RUN apt-get update && apt-get install --yes --no-install-recommends \ ca-certificates \ curl \ + clang \ + libclang-dev \ g++ \ gcc \ git \ jq \ + libasound2-dev \ make \ meson/testing \ nasm \ @@ -58,15 +61,13 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- \ --default-toolchain $(cat rust-toolchain) ENV PATH="/root/.cargo/bin:${PATH}" +# The bindgen tool is required to build a crosvm dependency. +RUN cargo install bindgen + # Point cargo to store data on the scratch volume. ENV CARGO_TARGET_DIR=/workspace/scratch/cargo_target ENV CARGO_HOME=/workspace/scratch/cargo_home -# Warms up the cargo registry cache for future cargo runs. Cargo will still -# update the cache using a git pull, but it only needs to download files that -# were changed since this image was built. -RUN cargo install thisiznotarealpackage -q || true - # We are building out of source with a readonly source filesystem. This flag # tells some build.rs files to not write into the src filesystem. ENV RUSTFLAGS='--cfg hermetic' diff --git a/ci/image_tag b/ci/image_tag index b7be5a1274..5ef1fd681f 100644 --- a/ci/image_tag +++ b/ci/image_tag @@ -1 +1 @@ -r0004 +r0005