1bf215546Sopenharmony_ci#!/bin/bash
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_ciset -ex
4bf215546Sopenharmony_ci
5bf215546Sopenharmony_ciSCRIPT_DIR="$(pwd)"
6bf215546Sopenharmony_ci
7bf215546Sopenharmony_ciCROSVM_VERSION=c7cd0e0114c8363b884ba56d8e12adee718dcc93
8bf215546Sopenharmony_cigit clone --single-branch -b main --no-checkout https://chromium.googlesource.com/chromiumos/platform/crosvm /platform/crosvm
9bf215546Sopenharmony_cipushd /platform/crosvm
10bf215546Sopenharmony_cigit checkout "$CROSVM_VERSION"
11bf215546Sopenharmony_cigit submodule update --init
12bf215546Sopenharmony_ci# Apply all crosvm patches for Mesa CI
13bf215546Sopenharmony_cicat "$SCRIPT_DIR"/.gitlab-ci/container/build-crosvm_*.patch |
14bf215546Sopenharmony_ci    patch -p1
15bf215546Sopenharmony_ci
16bf215546Sopenharmony_ciVIRGLRENDERER_VERSION=dd301caf7e05ec9c09634fb7872067542aad89b7
17bf215546Sopenharmony_cirm -rf third_party/virglrenderer
18bf215546Sopenharmony_cigit clone --single-branch -b master --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
19bf215546Sopenharmony_cipushd third_party/virglrenderer
20bf215546Sopenharmony_cigit checkout "$VIRGLRENDERER_VERSION"
21bf215546Sopenharmony_cimeson build/ $EXTRA_MESON_ARGS
22bf215546Sopenharmony_cininja -C build install
23bf215546Sopenharmony_cipopd
24bf215546Sopenharmony_ci
25bf215546Sopenharmony_ciRUSTFLAGS='-L native=/usr/local/lib' cargo install \
26bf215546Sopenharmony_ci  bindgen \
27bf215546Sopenharmony_ci  -j ${FDO_CI_CONCURRENT:-4} \
28bf215546Sopenharmony_ci  --root /usr/local \
29bf215546Sopenharmony_ci  --version 0.60.1 \
30bf215546Sopenharmony_ci  $EXTRA_CARGO_ARGS
31bf215546Sopenharmony_ci
32bf215546Sopenharmony_ciRUSTFLAGS='-L native=/usr/local/lib' cargo install \
33bf215546Sopenharmony_ci  -j ${FDO_CI_CONCURRENT:-4} \
34bf215546Sopenharmony_ci  --locked \
35bf215546Sopenharmony_ci  --features 'default-no-sandbox gpu x virgl_renderer virgl_renderer_next' \
36bf215546Sopenharmony_ci  --path . \
37bf215546Sopenharmony_ci  --root /usr/local \
38bf215546Sopenharmony_ci  $EXTRA_CARGO_ARGS
39bf215546Sopenharmony_ci
40bf215546Sopenharmony_cipopd
41bf215546Sopenharmony_ci
42bf215546Sopenharmony_cirm -rf /platform/crosvm
43