xref: /aosp_15_r20/external/angle/build/3pp_common/README.md (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1# 3pp_common
2
3Contains helper scripts for chromium 3pp configs.
4
5## Usage
6
7Most scripts assume the following `3pp.pb` format, which does as little as
8possible in the recipes so that scripts can be tested locally.
9
10```
11create {
12  source {
13    script {
14      name: "3pp.py"
15      use_fetch_checkout_workflow: true
16    }
17  }
18
19  build {
20    install: ["3pp.py", "install"]
21    # Any 3pp packages here are added to PATH by recipes.
22    # For local testing, they must already exist on your PATH.
23    tool: "chromium/third_party/maven"
24  }
25}
26
27upload {
28  # Assuming 3pp.pb is in //third_party/foo/bar/3pp/3pp.pb
29  pkg_prefix: "chromium/third_party/foo"
30  universal: true
31}
32```
33
34Flow for local testing:
35
36```
37# Install any tools needed (that are listed as "tools" in 3pp.pb")
38$ sudo apt-get install maven
39
40# Tests all three commands.
41$ 3pp/3pp.py local-test
42```
43
44To test individual steps:
45```
46$ 3pp/3pp.py latest
47someversion.somehash
48
49$ 3pp/3pp.py checkout /tmp/foo --version someversion.somehash
50
51$ 3pp/3pp.py install out unused_dep_dir --version someversion.somehash --checkout-dir /tmp/foo
52```
53
54## References
55
56* [`//docs/docs/cipd_and_3pp.md`](/docs/cipd_and_3pp.md)
57* [`//build/recipes/recipe_modules/chromium_3pp/api.py`]https://source.chromium.org/chromium/infra/infra_superproject/+/main:build/recipes/recipe_modules/chromium_3pp/api.py)
58