Skip to content

Commit a934e82

Browse files
simpkinsfacebook-github-bot
authored andcommitted
update fbcode_builder README to document getdeps.py
Summary: Update the `README.md` file in the fbcode_builder subdirectory to document the current getdeps.py build system rather than the older fbcode_builder scripts that required each project to keep their own python-based build files in their project directory. Reviewed By: chadaustin, wez Differential Revision: D23591356 fbshipit-source-id: 75a099a10793e68a2b59696682010c4dff47ec69
1 parent 5b6d99e commit a934e82

File tree

1 file changed

+29
-46
lines changed

1 file changed

+29
-46
lines changed

build/fbcode_builder/README.md

Lines changed: 29 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,43 @@
11
# Easy builds for Facebook projects
22

3-
This is a Python 2.6+ library designed to simplify continuous-integration
4-
(and other builds) of Facebook projects.
3+
This directory contains tools designed to simplify continuous-integration
4+
(and other builds) of Facebook open source projects. In particular, this helps
5+
manage builds for cross-project dependencies.
56

6-
For external Travis builds, the entry point is `travis_docker_build.sh`.
7+
The main entry point is the `getdeps.py` script. This script has several
8+
subcommands, but the most notable is the `build` command. This will download
9+
and build all dependencies for a project, and then build the project itself.
710

11+
## Deployment
812

9-
## Using Docker to reproduce a CI build
13+
This directory is copied literally into a number of different Facebook open
14+
source repositories. Any change made to code in this directory will be
15+
automatically be replicated by our open source tooling into all GitHub hosted
16+
repositories that use `fbcode_builder`. Typically this directory is copied
17+
into the open source repositories as `build/fbcode_builder/`.
1018

11-
If you are debugging or enhancing a CI build, you will want to do so from
12-
host or virtual machine that can run a reasonably modern version of Docker:
1319

14-
``` sh
15-
./make_docker_context.py --help # See available options for OS & compiler
16-
# Tiny wrapper that starts a Travis-like build with compile caching:
17-
os_image=ubuntu:18.04 \
18-
gcc_version=7 \
19-
make_parallelism=2 \
20-
travis_cache_dir=~/travis_ccache \
21-
./travis_docker_build.sh &> build_at_$(date +'%Y%m%d_%H%M%S').log
22-
```
20+
# Project Configuration Files
2321

24-
**IMPORTANT**: Read `fbcode_builder/README.docker` before diving in!
22+
The `manifests` subdirectory contains configuration files for many different
23+
projects, describing how to build each project. These files also list
24+
dependencies between projects, enabling `getdeps.py` to build all dependencies
25+
for a project before building the project itself.
2526

26-
Setting `travis_cache_dir` turns on [ccache](https://ccache.samba.org/),
27-
saving a fresh copy of `ccache.tgz` after every build. This will invalidate
28-
Docker's layer cache, foring it to rebuild starting right after OS package
29-
setup, but the builds will be fast because all the compiles will be cached.
30-
To iterate without invalidating the Docker layer cache, just `cd
31-
/tmp/docker-context-*` and interact with the `Dockerfile` normally. Note
32-
that the `docker-context-*` dirs preserve a copy of `ccache.tgz` as they
33-
first used it.
3427

28+
# Shared CMake utilities
3529

36-
# What to read next
30+
Since this directory is copied into many Facebook open source repositories,
31+
it is also used to help share some CMake utility files across projects. The
32+
`CMake/` subdirectory contains a number of `.cmake` files that are shared by
33+
the CMake-based build systems across several different projects.
3734

38-
The *.py files are fairly well-documented. You might want to peruse them
39-
in this order:
40-
- shell_quoting.py
41-
- fbcode_builder.py
42-
- docker_builder.py
43-
- make_docker_context.py
4435

45-
As far as runs on Travis go, the control flow is:
46-
- .travis.yml calls
47-
- travis_docker_build.sh calls
48-
- docker_build_with_ccache.sh
36+
# Older Build Scripts
4937

50-
This library also has an (unpublished) component targeting Facebook's
51-
internal continuous-integration platform using the same build-step DSL.
52-
53-
54-
# Contributing
55-
56-
Please follow the ambient style (or PEP-8), and keep the code Python 2.6
57-
compatible -- since `fbcode_builder`'s only dependency is Docker, we want to
58-
allow building projects on even fairly ancient base systems. We also wish
59-
to be compatible with Python 3, and would appreciate it if you kept that
60-
in mind while making changes also.
38+
This directory also still contains a handful of older build scripts that
39+
pre-date the current `getdeps.py` build system. Most of the other `.py` files
40+
in this top directory, apart from `getdeps.py` itself, are from this older
41+
build system. This older system is only used by a few remaining projects, and
42+
new projects should generally use the newer `getdeps.py` script, by adding a
43+
new configuration file in the `manifests/` subdirectory.

0 commit comments

Comments
 (0)