summaryrefslogtreecommitdiff
path: root/floss
diff options
context:
space:
mode:
author Ying Hsu <yinghsu@google.com> 2024-09-13 05:50:07 +0000
committer Ying Hsu <yinghsu@google.com> 2024-09-13 05:53:11 +0000
commit578a98cfaaad13cfc2183e574732d930f198f562 (patch)
tree618be58078ffb84bdbb257a976d5d79daca03592 /floss
parent252970e501d4edf255e0c62a998c9124bc1141f1 (diff)
floss: add image check and example use cases
Bug: 313582353 Tag: #floss Test: ./floss/build/build-in-container.py Test: m -j Flag: Exempt, floss only Change-Id: I960e7403b43bc9baff8bfa96abe83908744a9ec0
Diffstat (limited to 'floss')
-rw-r--r--floss/build/README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/floss/build/README.md b/floss/build/README.md
index 724d61a0fc..16eb244b6d 100644
--- a/floss/build/README.md
+++ b/floss/build/README.md
@@ -43,6 +43,14 @@ If you use the `docker` binary, add the flag: `--use-docker` when running
This uses the default tag of `floss:latest` so you don't have to provide it
specifically when invoking `build-in-container.py`.
+Run the following command to check if the image has been installed
+```
+$ podman images
+REPOSITORY TAG IMAGE ID CREATED SIZE
+localhost/floss latest 6e66bc573bd7 8 minutes ago 3.27 GB
+localhost/floss buildtemp 8cd97b8cb7bb 10 minutes ago 3.25 GB
+```
+
## Using the container image to build
Once the container image is built (and assuming it's tagged as `floss:latest`), you
@@ -65,3 +73,11 @@ If you want to run the build more quickly (or pass other commands), run
`build-in-container.py --only-start`. This will only start the container for you
(doing the correct mounts) and will print the commands it would have run via
`<container_binary> exec` normally.
+For example, you might want to run all unit tests after making a change:
+```
+./build-in-container.py --only-start
+podman exec -it floss-container-runner /root/src/build.py --target test
+```
+
+Important: after syncing the repository, perform a clean build using
+`build-in-container.py` to prevent unexpected build failures