Commit graph

11 commits

Author SHA1 Message Date
Zihan Chen
878a7837a9 dev_container: Replace better toml extension
VSCode prompted me Better TOML extension is deprecated and Even
Better TOML should be used instead.

TESTED=toml support still works after rebuilding dev container

Change-Id: Ic7a71f99a89a47e139627fcd75e35acbdf3bef41
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4728142
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-07-27 23:37:15 +00:00
Dennis Kempin
e577c91efc dev_container: Always run as root inside container
Since we default to podman, we can get rid of the _user container and
run as root inside the container, which greatly simplifies the tooling.

This also allows us to provide a single, default devcontainer.json
for local development as well as codespaces.

podman can be used with this devcontainer.json as well, e.g. in
VSCode by setting:

"dev.containers.dockerPath": "podman"

The with_kvm/devcontainer.json can be used to add access to kvm, which
may not be available on all machines. So it's an optional config.

BUG=b:273529620
TEST=Open with devcontainer in VSCode with both docker and podman,
run `presubmit --no-delta`
TEST=tools/dev_container tools/presubmit --no-delta

Change-Id: I10e04898a0e1adb6e4939f6f2e0259dc9b9aa62d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4419666
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Zihan Chen <zihanchen@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-04-25 21:33:42 +00:00
Dennis Kempin
b0408a9a6b Add devcontainer config for codespaces
This config does not include the privileges of the usual devcontainer.

BUG=None
TEST=Open in github codespaces
Passes both:
cargo test --workspace --lib --bins --features=all-x86_64
tools/run_tests --unit-tests

Change-Id: Ia68b0b4f7baa2be109079909eb023ba4eda5e037
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4015008
Reviewed-by: Zihan Chen <zihanchen@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-11-09 19:28:15 +00:00
Zihan Chen
94de30aea3 dev_container: Fix vscode integration
Fix permission issue when dev container is launched in vscode.
see: crrev/c/3855471/comments/3ee66fdb_46268f20

TEST=dev container from vscode can rust analyzer

Change-Id: Ia5e8f213bf7ab8e5826dca21a6ef3846ff841b92
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3884301
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2022-09-14 00:16:38 +00:00
Zihan Chen
483345c4c0 dev_container: Use host UID & GID for user in container
Container shell now defaults to user `crosvmdev` which will have
same UID & GID as outside user. VS Code Remote Containers extension
has the same behavior when loading config from devcontainer.json.

TEST=all tests pass in container, new files in container have same
permission as files created outside.
FIXED=b:239476013

Change-Id: Ib3c696509e9ea45edd5f02ff025d9477576ec765
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3814094
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Zihan Chen <zihanchen@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-08-23 23:16:09 +00:00
Daniel Verkamp
a77c40ec06 tools: enable search feature for mdbook
This will generate the search index and in-browser search for the book.

BUG=None
TEST=mdbook build docs/book

Change-Id: Ibaf67002c5b5d5cf1aafd19ab66a05b9116b14a0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792098
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-07-29 21:16:21 +00:00
Dennis Kempin
1f0b985a4d Update cloud storage locations to use crosvm-infra project
See go/crosvm/infra for instructions on how to get access to uploading
them.

Added a helper script to install dependencies needed to build the
guest_under_test.

BUG=b:235269312
TEST=Kokoro

Change-Id: I78387a33ddbf3ab199b36e76ba617acb1250c7e5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3783011
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-07-29 02:17:15 +00:00
Zihan Chen
216a22426c dev_container: Uprev to include clang
Need clang to compile minijail policies

TEST=new container can build crosvm with minijail policies included
BUG=b:235858187

Change-Id: Id26898025ef1ff3148da2edc5af3d923a00401c2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3792428
Commit-Queue: Zihan Chen <zihanchen@google.com>
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Zihan Chen <zihanchen@google.com>
2022-07-28 21:56:31 +00:00
Zihan Chen
e2f7c0c24b crosvm: Fix cross-compile in dev container
- Fix devcontainer.json to be used by vscode correctly
- Fix wayland-protocols path finding
- Add missing SYSROOT env for pkg_config
- Add missing linker settings

TEST=native/armv7/aarch64 targets compile in dev container

Change-Id: Id6fc43b2fd63d09bc46169d996387d5417ada93e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3766822
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-07-19 17:07:49 +00:00
Dennis Kempin
53c216fd07 Make vscode devcontainer usable
The container was pretty much untested. Now that vscode supports dev
containers via SSH I got to test this properly.

This provides a workable dev environment out of the box.
./tools/presubmit passes and
common extensions for rust, python and bash are added.

BUG=None
TEST=Open in vscode, re-open in dev container. Run ./tools/presubmit

Change-Id: I542f3d26c29c4051000e6ec8b81d77d297bcad7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3402447
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-01-25 21:30:49 +00:00
Dennis Kempin
c4ec996103 Add new dev container and install-deps scripts
The new container just provides a standard debian box with a
rust toolchain.
Installation of dependencies has been extracted into scripts
which can also be used to set up a machine for development.

This will replace the current ./ci/ containers.

BUG=b:199950887,b:199950423
TEST=./tools/dev_container ./tools/run_tests

Change-Id: I832bc5b129246923df937a34614b4d74955304dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3221781
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2021-10-15 22:12:02 +00:00