1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-10 05:22:59 +03:00
Commit Graph

16 Commits

Author SHA1 Message Date
Adam Simpkins
3d7f7e6f70 fbcode_builder: drop support for Ubuntu 14.04 and Debian 8.6
Summary:
folly, and therefore most of our other open source projects, no longer support
gcc-4.9.  Drop Ubuntu 14.04 and Debian 8.6 from our CI platforms list, since
the these images only support gcc 4.9.

We should ideally add support for Ubuntu 18.04 soon, but I'll leave that for a
later diff.  Removing the older platforms is somewhat higher priority for now
to get our Travis CI builds green again.

Reviewed By: snarkmaster

Differential Revision: D9258797

fbshipit-source-id: 3cab47a6c51b2dbe63214034240f844c85963c3d
2018-08-09 18:57:42 -07:00
Alex Guzman
94d0d45c7b Add support for building from facebookincubator repos
Summary: Currently, fbcode_builder assumes you're building code living in the facebook github org. If you try to do travis builds using a facebookincubator repo, an error occurs due to hard-coded assumptions about the org. This fixes that

Reviewed By: knekritz

Differential Revision: D9183307

fbshipit-source-id: 0a1ac399953485e84f0534cc0616765227088c80
2018-08-07 14:26:48 -07:00
Mahesh Maddikayala
6713be5d67 fix travis build failure for 'sigar' package
Summary: Added option to send parameters to 'configure' script from fbcode builder

Reviewed By: jstrizich

Differential Revision: D9004547

fbshipit-source-id: da54fa2dd453aab29051f37106423807a260535a
2018-07-27 12:42:32 -07:00
Adam Simpkins
a277c46e59 allow specifying the directory containing CMakeLists.txt
Summary:
Update `cmake_configure()`, `cmake_install()`, and `fb_github_cmake_install()`
to support specifying the directory where CMakeLists.txt is found, relative to
the directory where the build is being performed.  Previously these functions
where hardcoded to assume that CMakeLists.txt was always found at '..'

Reviewed By: snarkmaster

Differential Revision: D7540689

fbshipit-source-id: efd3d044345fadc0346e436c01d0a247e1b6fd70
2018-04-10 12:26:23 -07:00
John Strizich
0ae75f9b10 add better error for passing config with no steps
Summary: in response to https://github.com/facebook/openr/issues/23

Reviewed By: snarkmaster

Differential Revision: D7342371

fbshipit-source-id: 15737f79900722ce016494f994932aa26e5acad5
2018-03-22 17:57:56 -07:00
Igor Kobzar
0c124c8da5 fbcode_builder: Update cmake for debian 8.6 os image
Summary: Debian 8.6 comes with a CMake version that is too old for folly. Add commands to update cmake.

Reviewed By: snarkmaster

Differential Revision: D6842797

fbshipit-source-id: 22f4c407f82a92c3fa90a5c2de334cf8b92e584b
2018-02-05 06:14:08 -08:00
John Strizich
f008e22843 install sudo since the default 16.04 image doesn't seem to contain it
Summary:
Some of our tests require sudo and the docker image doesn't have it by
default: https://travis-ci.org/facebook/openr/builds/306157670.

Reviewed By: saifhhasan

Differential Revision: D6406044

fbshipit-source-id: 6ec07fcc6b4eabce408d50f5656f9e391e4bd883
2017-11-24 12:26:48 -08:00
John Strizich
28e353cf32 move patch logic to openrs builder config
Summary: Removing git patch logic from fbcode builder and into the openr config. Making the patch available for travis build via curl.

Reviewed By: saifhhasan

Differential Revision: D6394924

fbshipit-source-id: 008f58bdf9d10fc730368bc23e1c49a43afc06e1
2017-11-22 11:15:08 -08:00
John Strizich
50c4978bd0 attempt to make docker build find our libnl file
Summary: trying to make travis find the libnl patch. this should work

Reviewed By: saifhhasan

Differential Revision: D6262615

fbshipit-source-id: 431786ed20622b0b6d85df095f9a65a93a514f5c
2017-11-07 18:07:38 -08:00
John Strizich
1f63b56fa5 make gitpatch path relatve to project dir
Summary: use an absolute path for git patch

Reviewed By: saifhhasan

Differential Revision: D6132452

fbshipit-source-id: 1cd0732bc998ff5dc742db6b1d9dee676066a0e0
2017-10-25 13:22:07 -07:00
John Strizich
6ef17b6e6c install libnl from github for fbcode builder
Summary: travis ci machines do not have libnl installed, this installs it.

Reviewed By: saifhhasan

Differential Revision: D6026428

fbshipit-source-id: 70b00a854ab437b69e93ee6b53da83ba58b4d8a2
2017-10-12 19:50:33 -07:00
Eddie Elizondo
a9bd017479 Modify fbcode_buidler fbthrift to build with cmake
Summary: This updates fbcode_builder to build fbthrift with cmake instead of autoconf.

Reviewed By: yfeldblum

Differential Revision: D5896957

fbshipit-source-id: 00b7688195348934f113bd778e41870eaf971fcb
2017-09-23 17:55:29 -07:00
Alexey Spiridonov
4d5d194635 Enable ccache to speed up Travis Docker-based builds 3-4x
Summary:
Unfortunately, Travis is constantly in a capacity crunch. Plus, building `folly` + `wangle` + `proxygen` + `thrift` takes upwards of 40 minutes on Travis hosts, and the timeout for builds is 50 minutes. That creates several problems:
 - Builds tend to get queued up, and sometimes take a long time to produce signal.
 - Adding more platform, or project, or dependency coverage to our Travis builds would just make the problem worse (so I have not pushed much on the adoption of `fbcode_builder`).
 - Building a service of any complexity will likely pull in all of the above dependencies, and then it gets 10 minutes for build & tests. So higher-up-the-foodchain projects like `bistro` just time out.

To help accelerate builds, Travis supports caching build artifacts between runs: https://docs.travis-ci.com/user/caching/#Arbitrary-directories
Each build variant gets its own cache, as one would want: https://docs.travis-ci.com/user/caching/#Caches-and-build-matrices

This is great for us because -- especially with all the `Updating submodules` commits -- we actually keep rebuilding nearly the same tree, most of the time.

Better yet, https://ccache.samba.org provides transparent compile caching -- just set your cache directory (and a few options), and use `ccache {gcc,g++}` instead of the vanilla compiler. It does the rest, and is quite robust -- the only issues I had were:
 - different platforms have different versions, so one has to target ccache 3.1-ish,
 - the max cache size started out too small, which tended to eliminate all speedup.

In this diff, I enable `ccache` for all projects using the default `.travis.yml` (jstrizich, you'll need to patch the custom `.travis.yml` files of `openr` and `fbzmq` if you want to try caching).

Notably, even if a project would time out on Travis without `ccache`, the caching accumulates across minor revisions, and should keep re-build times quite short for most changes.

This also significantly improves the experience of iterating on a Docker-based build on your own machine -- thoughtful use of Docker layer caching & ccache dramatically speeds up rebuilds after certain changes.

It works like this:
 - Start with an empty `ccache.tgz`, or a pre-existing one provided by Travis from its cache.
 - The `Dockerfile` extracts it into the Docker image under `/ccache`, and sets some environment variables to enable ccache for C & C++ builds.
 - The build runs as usual.
 - The build either finishes successfully, or it fails, or the new option of `docker_build_timeout` kills the container about 10 minutes before Travis would time out the build.
 - A small script runs inside the container to prepare the updated `ccache.tgz`. This includes automatic cache sizing based on the working set size of a full successful build.
 - Travis uploads `ccache.tgz` to S3 for the next build.

The rest is plumbing, CLI tweaks, and documentation to make manual iteration using `ccache` fairly pleasant.

The overhead of my `ccache` implementation is hard to measure exactly, but based on my indirect measurements, it's on the order of 2 minutes for `bistro`, which would otherwise take 52+ minutes to build on Travis.

Reviewed By: zpao

Differential Revision: D5648461

fbshipit-source-id: 207b621ba6bc6f827b20a5746b4dc4f28c1c96e2
2017-08-21 16:57:29 -07:00
Alexey Spiridonov
9155c1d725 Use ShipIt dependency hashes for a consistent build
Summary:
Previously, when building e.g. Proxygen, we would check out the master branch of dependencies like Folly. This could result in version shear, and the odds of it would go up as you iterated on your branch, while the dependencies moved forward. This degrades our developer experience.

The solution is to actually build from the same point in Facebook's monorepo.

As implemented, this is still imperfect, because the in-tree dependency hashes under `build/deps/github_hashes` are not currently updated atomically. However, on balance, this predictability should still be better -- and if I recall sdwilsh's explanation correctly, the atomicity of dependency commits could be fixed if it really impacts many people.

This will also improve cache coherence when you're using ccache for iteration, see D5648461.

(Also includes some extra "ideas" comments, and a whitespace fix.)

Reviewed By: sdwilsh

Differential Revision: D5648388

fbshipit-source-id: 1baa68ff3ef2e204a6cf5f5297e52514a3b62d21
2017-08-18 12:25:22 -07:00
John Strizich
d613fed62f trying out this tool, fbcodeBuilder
Summary:
this diff provides ci builds for our two open source projects, openr and fbzmq, by leveraging snarkmaster 's awesome tool, fbcode builder. this will run our external cmake build process on lego-linux sandcastle boxes and also generates scripts for building on travis with docker externally.

this diff is modeled on D4441467. it also includes some changes to fbcode builder itself and some minor changes in our cmake files.

snarkmaster , please take a look at my fbcode builder changes. I needed to make some modifications in order to build some of our dependencies which have slightly non-standard build steps and to run tests. I split up the configure step, and I addressed an issue around workdir with cmake. the last workdir was just a relative path, `build`, so it was hard to get back to it in a future step to run tests.

Reviewed By: saifhhasan

Differential Revision: D5141184

fbshipit-source-id: 94cacab807a3a0da4d0d81016d7f36f37656145d
2017-06-09 22:40:36 -07:00
lesha
64dc78b3c3 Re-synchronize with fb-internal repository
Summary: We just changed the ShipIt rules, which requires this manual commit. There were also a couple of files that got out-of-sync a long time ago. Fix that.
2017-02-09 13:06:28 -08:00