2021-02-02 23:18:10 +00:00
|
|
|
# CrosVM Continuous Integration
|
2020-12-03 18:00:47 +00:00
|
|
|
|
2021-02-02 23:18:10 +00:00
|
|
|
Crosvm has a complex set of dependencies and requirements on the host machine to
|
|
|
|
successfully build and run test cases. To allow for consistent testing in our
|
|
|
|
continuous integration system (kokoro) and reproduction of those tests locally,
|
|
|
|
we provide docker containers containing the build toolchain and a VM for
|
|
|
|
testing.
|
2020-12-03 18:00:47 +00:00
|
|
|
|
2021-02-02 23:18:10 +00:00
|
|
|
## Implementation Overview
|
|
|
|
|
|
|
|
Directories:
|
|
|
|
|
2021-10-11 04:57:26 +00:00
|
|
|
- `ci/build_environment`: Contains tooling for building the dependencies of
|
2021-05-18 08:16:36 +00:00
|
|
|
crosvm.
|
2021-10-11 04:57:26 +00:00
|
|
|
- `ci/crosvm_aarch64_builder`: An x86 docker image to cross-compile for aarch64
|
2021-05-18 08:16:36 +00:00
|
|
|
and test with user-space emulation.
|
2021-10-11 04:57:26 +00:00
|
|
|
- `ci/crosvm_base`: Docker image shared by `crosvm_builder` and
|
|
|
|
`crosvm_aarch64_builder`
|
|
|
|
- `ci/crosvm_builder`: A native docker image for building and testing crosvm
|
|
|
|
- `ci/crosvm_test_vm`: Dockerfile to build the VM included in the builder
|
2021-05-18 08:16:36 +00:00
|
|
|
containers.
|
2021-10-11 04:57:26 +00:00
|
|
|
- `ci/kokoro`: Configuration files and build scripts used by Kokoro to run
|
2021-05-18 08:16:36 +00:00
|
|
|
crosvm tests.
|
2021-02-02 23:18:10 +00:00
|
|
|
|
|
|
|
Scripts:
|
|
|
|
|
2021-10-11 04:57:26 +00:00
|
|
|
- `ci/aarch64_builder`: Script to start the `crosvm_aarch64_builder` container
|
|
|
|
- `ci/builder`: Script to start the `crosvm_builder` container
|
|
|
|
- `ci/run_container.sh`: Implementation behind the above scripts.
|
|
|
|
- `test_runner.py`: Implementation behind the `./test_all` script.
|
2020-12-03 18:00:47 +00:00
|
|
|
|
|
|
|
### Building and uploading a new version of builders
|
|
|
|
|
|
|
|
The docker images for all builders can be built with `make` and uploaded with
|
|
|
|
`make upload`. Of course you need to have docker push permissions for
|
2021-01-21 19:06:44 +00:00
|
|
|
`gcr.io/crosvm-packages/` for the upload to work.
|