2021-02-04 14:10:08 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2022-04-06 13:58:46 +00:00
|
|
|
SCRIPT_DIR="$(pwd)"
|
|
|
|
|
|
|
|
CROSVM_VERSION=c7cd0e0114c8363b884ba56d8e12adee718dcc93
|
|
|
|
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/chromiumos/platform/crosvm /platform/crosvm
|
2021-02-04 14:10:08 +00:00
|
|
|
pushd /platform/crosvm
|
|
|
|
git checkout "$CROSVM_VERSION"
|
2021-10-29 09:00:32 +00:00
|
|
|
git submodule update --init
|
2022-04-06 13:58:46 +00:00
|
|
|
# Apply all crosvm patches for Mesa CI
|
|
|
|
cat "$SCRIPT_DIR"/.gitlab-ci/container/build-crosvm_*.patch |
|
|
|
|
patch -p1
|
2021-02-04 14:10:08 +00:00
|
|
|
|
2022-06-28 15:57:33 +00:00
|
|
|
VIRGLRENDERER_VERSION=dd301caf7e05ec9c09634fb7872067542aad89b7
|
2022-02-09 14:17:20 +00:00
|
|
|
rm -rf third_party/virglrenderer
|
|
|
|
git clone --single-branch -b master --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
|
2021-12-06 10:13:55 +00:00
|
|
|
pushd third_party/virglrenderer
|
|
|
|
git checkout "$VIRGLRENDERER_VERSION"
|
2022-01-04 11:20:59 +00:00
|
|
|
meson build/ $EXTRA_MESON_ARGS
|
|
|
|
ninja -C build install
|
2021-12-06 10:13:55 +00:00
|
|
|
popd
|
|
|
|
|
2021-06-16 14:04:28 +00:00
|
|
|
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
|
|
|
bindgen \
|
|
|
|
-j ${FDO_CI_CONCURRENT:-4} \
|
|
|
|
--root /usr/local \
|
2022-10-19 20:00:45 +00:00
|
|
|
--version 0.60.1 \
|
2021-06-16 14:04:28 +00:00
|
|
|
$EXTRA_CARGO_ARGS
|
|
|
|
|
2021-02-04 14:10:08 +00:00
|
|
|
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
|
|
|
|
-j ${FDO_CI_CONCURRENT:-4} \
|
|
|
|
--locked \
|
2021-06-16 14:04:28 +00:00
|
|
|
--features 'default-no-sandbox gpu x virgl_renderer virgl_renderer_next' \
|
2021-02-04 14:10:08 +00:00
|
|
|
--path . \
|
|
|
|
--root /usr/local \
|
|
|
|
$EXTRA_CARGO_ARGS
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
2022-02-09 14:17:20 +00:00
|
|
|
rm -rf /platform/crosvm
|