mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 10:10:41 +00:00
323d267a8c
Refactors the crosvm recipe API a little to provide 3 different environments for builds: Just the source, building with containers and building on the host. For building on the host, we will install rustup-init via CIPD and then use rustup to install the required rust version. BUG=b:233914170 TEST=./recipes.py run build_windows Change-Id: I12ef22f286af584edeb02beed4d231565b698099 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3718900 Reviewed-by: Vikram Auradkar <auradkar@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
27 lines
841 B
Bash
Executable file
27 lines
841 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Copyright 2022 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.
|
|
|
|
BUILD_DIR=$(mktemp -d)
|
|
cd "$BUILD_DIR" || exit 1
|
|
|
|
CIPD_ARGS=(
|
|
-pkg-var "description:Protoc compiler"
|
|
-install-mode copy
|
|
-ref latest
|
|
)
|
|
|
|
PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protoc-21.1"
|
|
|
|
cd $(mktemp -d)
|
|
mkdir pkg
|
|
wget -q "$PROTOC_URL-win64.zip" -O "protoc.zip"
|
|
unzip -p "protoc.zip" "bin/protoc.exe" > "pkg/protoc.exe"
|
|
cipd create -in "pkg" -name "crosvm/protoc/windows-amd64" "${CIPD_ARGS[@]}"
|
|
|
|
cd $(mktemp -d)
|
|
mkdir pkg
|
|
wget -q "$PROTOC_URL-linux-x86_64.zip" -O "protoc.zip"
|
|
unzip -p "protoc.zip" "bin/protoc" > "pkg/protoc"
|
|
cipd create -in "pkg" -name "crosvm/protoc/linux-amd64" "${CIPD_ARGS[@]}"
|