Commit Graph

349 Commits

Author SHA1 Message Date
Lukas Piatkowski
78d30ad17f eden/edenapi and mononoke integration tests: add edenapi/tools to getdeps and use them in tests (#51)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/51

This diff extends capabilities of CargoBuilder in getdeps so that individual manifests can be build even without workspaces. Thanks to that a build for edenapi/tools can be made and its artifacts can be used in mononoke integration tests.

Reviewed By: StanislavGlebik

Differential Revision: D23574887

fbshipit-source-id: 8a974a6b5235d36a44fe082aad55cd380d84dd09
2020-09-18 04:20:56 -07:00
Lukas Piatkowski
e6686845d6 getdeps: update zstd to 1.4.5
Reviewed By: krallin

Differential Revision: D23757084

fbshipit-source-id: 7e49228805e272064ad52d43141b5815eba4190a
2020-09-17 07:38:53 -07:00
Luca Niccolini
41989fdcd4 only install googletest 1.8 when building tests
Summary: no need to install when not building tests

Reviewed By: wez

Differential Revision: D23714375

fbshipit-source-id: 6f34ab59ed2155df5646ad279d1347e904f393c4
2020-09-15 17:37:50 -07:00
Luca Niccolini
55bf30a475 googletest 1.8.0
Summary: required. not installed with CMake ExternalProject anymore

Reviewed By: xttjsn

Differential Revision: D23700095

fbshipit-source-id: 807105a1e3d4bd837a35e39c6dced53744edd8de
2020-09-14 23:59:08 -07:00
Luca Niccolini
f451d8f2e3 enable tests in getdeps
Summary:
in getdeps we currently don't build and run the tests
There are a few issues:
  1. we need to also build tests for fizz, wangle, mvfst since proxygen tests include headers only exported if building tests in dependencies
  2. we use `ExternalProject_add` for gtest/gmock. but doesn't seem to be playing nicely with getdeps

Reviewed By: dddmello, mjoras

Differential Revision: D16934955

fbshipit-source-id: fb1c52237f9f0c71da86643409972c94d16e6a71
2020-09-14 22:04:49 -07:00
Luca Niccolini
ec10abc583 enable tests in getdeps
Summary: properly find the required GMock version (1.8.0) and allow building tests in getdeps

Reviewed By: mjoras

Differential Revision: D16935741

fbshipit-source-id: 46f62511e2feaf553d028e286a862aa5b30393c6
2020-09-14 22:04:49 -07:00
Luca Niccolini
2c773cc515 enable tests in getdeps
Summary: also always install fizz test headers for mvfst and proxygen tests to consume without needing to build fizz tests

Reviewed By: yfeldblum

Differential Revision: D23676344

fbshipit-source-id: 7ae78c81c2d67bb8da135fcd69d4be119b50a27e
2020-09-14 22:04:48 -07:00
Luca Niccolini
49e3719cd0 fizz, mvfst, wangle, proxygen: add gmock as fbcode_build dependency
Summary: they were all transitively pulling it from folly

Reviewed By: mjoras

Differential Revision: D23683292

fbshipit-source-id: 2085a580584891b3fd0960c14505c0f675a11bd5
2020-09-14 22:04:48 -07:00
Luca Niccolini
b259a5c949 add gtest version 1.8
Summary:
needed by a few projects [wangle, mvfst, proxygen]

it's already in lfs
https://www.internalfb.com/intern/diffusion/FBS/browse/master/fbcode/tools/lfs/.lfs-pointers?lines=41

Reviewed By: mzlee

Differential Revision: D23676343

fbshipit-source-id: 0fa04d4224f27e756f683924af0c21ea63a90647
2020-09-14 10:17:01 -07:00
Adam Simpkins
3daaba6d43 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
2020-09-09 15:40:21 -07:00
Adam Simpkins
367dce62df update FindGflags.cmake to work on CentOS 8.x (#1409)
Summary:
Update FindGflags.cmake to work on recent CentOS and RedHat distributions.

On these distributions the CMake package configuration installed by the
gflags-devel RPM is slightly broken, and sets `gflags_INCLUDE_DIR` to a
directory that does not exist.  This happens because `/lib64` is symlinked to
`/usr/lib64`, and CMake ends up searching `/lib64` before `/usr/lib64` by
default when searching for packages.  Therefore it finds `gflags-config.cmake`
via the `/lib64` symlink.  However, `gflags-config.cmake` computes the include
directory relative to where its config file was found, and this relative path
computation only works when using the actual `/usr/lib64` path where it was
installed.  When found via `/lib64` it returns a bogus `//include` path that
does not exist.

This updates `FindGflags.cmake` to verify if the `gflags_INCLUDE_DIR` path
actually exists, and set it to a sane location instead.

This also updates the code to use the `gflags-shared` target that is exported
by the default gflags package configuration if it was only built as a shared
library.

Pull Request resolved: https://github.com/facebook/folly/pull/1409

Reviewed By: yfeldblum

Differential Revision: D23588288

fbshipit-source-id: b68a717953ae0521f568d7bcfd05ca33cd6dc578
2020-09-09 12:44:54 -07:00
Katie Mancini
29e3637410 add re2 as cmake dependency
Summary:
We use Re2 in D22877942 for parsing multiple path prefix data fetch logging,
this introduces the dependency for eden's opensource builds.

Reviewed By: chadaustin

Differential Revision: D23431175

fbshipit-source-id: 44b399e92cb89ba1403295ecd10bc8f8d769b02c
2020-09-02 22:54:23 -07:00
Zeyi (Rice) Fan
c693932e8e return returncode correctly
Reviewed By: xavierd

Differential Revision: D23434438

fbshipit-source-id: 813f987cf62e72c0b6704b31e6e9168006735b6f
2020-08-31 16:26:46 -07:00
Shrikrishna Khare
585ae5d1ae SAI API 1.6.3
Summary: As titled.

Differential Revision: D23216535

fbshipit-source-id: 4d278cd1f5d4c661eddda265d92f51d391192404
2020-08-21 13:00:45 -07:00
Koray Polat
ad6393d8d4 Add option to run tests without Testpilot even when it's available
Summary:
- Added a commandline flag to ignore testpilot even when it's available
- Fixed an oversight that caused getdeps to return 0 even if ctest tests have failed.

Reviewed By: wez

Differential Revision: D23161362

fbshipit-source-id: 1ed97c481315e2b39f1128680386390930194970
2020-08-18 09:06:53 -07:00
Chad Austin
c12f60afb5 only use symbolizer if libunwind is found
Summary: folly/experimental/symbolizer requires libunwind. Do not enable it unless libunwind is available.

Reviewed By: yfeldblum, luciang

Differential Revision: D22964401

fbshipit-source-id: d71991346927fbf18167637770b2143c03b16476
2020-08-17 17:08:55 -07:00
Jonathan Kim
5cb2331899 Update folly's source of truth to xplat
Reviewed By: mzlee

Differential Revision: D23066827

fbshipit-source-id: 6362acb7a6680a24871859d7874a9caec0a1538e
2020-08-17 11:01:52 -07:00
Xavier Deguillard
3d96bdd87a flush stdout before starting a command while interactive
Summary:
Now that the subprocess output is no longer piped, we can see a weird situation
where the command being run is displayed after the compilation step:
  + cd /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/build/eden && \
  [1/13] rust_job_pool
      Finished release [optimized] target(s) in 0.75s
  [12/13] Install the project...
  -- Install configuration: "RelWithDebInfo"
  -- Installing: /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/installed/eden/bin/edenfs
  -- Set runtime path of "/data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/installed/eden/bin/edenfs" to ""
  -- Up-to-date: /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/installed/eden/bin/edenfsctl
  -- Up-to-date: /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/installed/eden/lib/libbackingstore_rs.a
  -- Up-to-date: /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/installed/eden/lib/libbackingstore.a
  -- Up-to-date: /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/installed/eden/include/eden/scm/lib/backingstore/c_api/HgNativeBackingStore.h
  -- Up-to-date: /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/installed/eden/include/eden/scm/lib/backingstore/c_api/RustBackingStore.h
  + /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/installed/cmake-Ncng4tsJb6gdOu40ggy14-YtgNQD43 (4cb1fa6379)k5ev0n-FXq99I/bin/cmake \
  +      --build \
  +      /data/users/xavierd/scratch/dataZusersZxavierdZfbsource/fbcode_builder_getdeps/build/eden \
  +      --target \
  +      install \
  +      --config \
  +      Release \
  +      -j \
  +      24

This is a bit awkward. Flushing stdout's buffer allows for the ordering to be
correct.

Reviewed By: wez

Differential Revision: D23079405

fbshipit-source-id: e2bf25b098d6ab4a788a5ec07deb635a42cae18c
2020-08-13 01:24:28 -07:00
Cooper Lees
04d5828fd7 Update zstd dev debian package
Summary:
- Move to the newer and forward moving libzstd-dev
https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=libzstd&searchon=names

Reviewed By: wez

Differential Revision: D22981784

fbshipit-source-id: 3647357aad60f2335ea494c35c174e9ffec61346
2020-08-06 14:58:04 -07:00
Xavier Deguillard
a85e32d7e0 runcmd: do not pipe stdout on a tty
Summary:
Redirecting stdout means that ninja/cmake won't act as if it's invoked
interactively, ie: it will buffer the output, show every single files being
compiled (instead of just a line or progress), etc. This results in a fairly
janky UX when getdeps is used on the command line. By not redirecting stdout,
we get immediate feedback about the tests being run, and the files being
compiled.

Reviewed By: wez

Differential Revision: D22967815

fbshipit-source-id: 872ddbf421065686c384a3a876d0acb8832baf2e
2020-08-06 13:12:43 -07:00
Parvez Shaikh
289b444f0b SAI API 1.5.2
Summary:
port serdes object type is introduced in 1.5.2

upgrading tp2 sai dependency to 1.5.2

note that for first time, oss build failed, i had to back out removing http_proxy and https_proxy indicated here - D17429928

Differential Revision: D22888202

fbshipit-source-id: c0f90b1caa01603d25b0559188ae961df1dd13d5
2020-08-02 19:16:36 -07:00
Cooper Lees
843352152f Allow a project to have Actions run on all branches
Summary:
- I find the ability to make a branch and play with CI on GitHub super handy
- Removing the `- master` limitation gives me this ability

Reviewed By: yi-xian

Differential Revision: D22771835

fbshipit-source-id: 8e8839cb860ab4d1dfa0dda590afaf165127f60d
2020-07-28 16:48:45 -07:00
Cooper Lees
6154adf194 Remove configparser deprecated method readfp
Summary:
- Replace deprecated method
- Stops spam to my console as I run with show deprecation warnings

Reviewed By: yi-xian

Differential Revision: D22776372

fbshipit-source-id: d29193e4c4c26d7facfabf9038dcb33c1af92434
2020-07-28 11:22:03 -07:00
Cooper Lees
29b5b287ea Add new --disallow-system-packages flag to generate-github-actions
Summary:
- Make OpenR build all deps from source until we remove fbzmq as a dep
- Allow a project to move it's Open Source CI forward to an alternative version of ubuntu via a new `--ubuntu-version` parameter

Reviewed By: wez

Differential Revision: D22768987

fbshipit-source-id: 07205efbd0c87a702638cf30b84a2850d064fa8e
2020-07-27 19:34:19 -07:00
Zeyi (Rice) Fan
b3bee03ff8 set SDKROOT when it is not already set
Summary: `SDKROOT` is a requirement if we manually specify the location of the compiler on macOS. Otherwise it wouldn't be able to find the system libraries headers.

Reviewed By: wez

Differential Revision: D22577887

fbshipit-source-id: 98140e6f9e564d665db085d21023986b240b3732
2020-07-26 15:02:52 -07:00
Zeyi (Rice) Fan
9f85e3ae03 attempt to specify boost to build with clang - take 2
Summary:
Original commit changeset: c6f013565680

Redo D22417488 (ad89d50a79), with D22577887 fixing open source CI builds

Reviewed By: wez

Differential Revision: D22577884

fbshipit-source-id: 0c94483e05715493859d29bc2b58f0847a95826b
2020-07-26 15:02:52 -07:00
Cooper Lees
543029b355 Update libzmq manifest to use libzmq3-dev
Summary:
- OpenR building has been broken for quite awhile and it seems this is the main cause

Example CI Failure: https://github.com/facebook/openr/runs/631232675?check_suite_focus=true

Reviewed By: wez

Differential Revision: D22737174

fbshipit-source-id: 31d44c36d495295d30fe3ddc81991dafed100703
2020-07-25 11:29:26 -07:00
Stanislau Hlebik
9d18c46b1f remediation of S205607
fbshipit-source-id: 798decc90db4f13770e97cdce3c0df7d5421b2a3
2020-07-17 17:16:13 -07:00
Stanislau Hlebik
3665548bb0 remediation of S205607
fbshipit-source-id: 5113fe0c527595e4227ff827253b7414abbdf7ac
2020-07-17 17:16:13 -07:00
Lukasz Piatkowski
0dd3c4e4bb add Mononoke integration tests CI (#26)
Summary:
This diff adds a minimal workflow for running integrations tests for Mononoke. Currently only one test is run and it fails.

This also splits the regular Mononoke CI into separate files for Linux and Mac to match the current style in Eden repo.
There are the "scopeguard::defer" fixes here that somehow escaped the CI tests.
Some tweaks have been made to "integration_runner_real.py" to make it runnable outside FB context.
Lastly the change from using "[[ -v ... ]" to "[[ -n "${...:-}" ]]; in "library.sh" was made because the former is not supported by the default Bash version preinstalled on modern MacOS.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/26

Reviewed By: krallin

Differential Revision: D22541344

Pulled By: lukaspiatkowski

fbshipit-source-id: 5023d147823166a8754be852c29b1e7b0e6d9f5f
2020-07-16 12:16:10 -07:00
Lukas Piatkowski
d323203d86 Back out "fix boost macOS build with new Xcode" (#27)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/27

Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/9

Original diffs: D22417488 (ad89d50a79), D22528869 (b3c9a79f30)

Reviewed By: markbt

Differential Revision: D22571972

fbshipit-source-id: c6f013565680a757b642dd79e647207fce3351ec
2020-07-16 06:36:41 -07:00
Zeyi (Rice) Fan
ad89d50a79 fix boost macOS build with new Xcode
Summary:
When we build boost 1.69.0 with newer version of Xcode, it will fail with:

```
clang: error: unknown argument: '-fcoalesce-templates'
```

This commit fixes this build failure by telling boost's build system that we are building with clang on macOS.

Reviewed By: chadaustin

Differential Revision: D22417488

fbshipit-source-id: 0b3d22835abbba6d06812c656acb0311a60d8c67
2020-07-15 10:20:38 -07:00
Zeyi (Rice) Fan
b3c9a79f30 teach getdeps to look for clang on macOS with xcrun in boost build
Reviewed By: wez

Differential Revision: D22528869

fbshipit-source-id: 66c394b6fafcc45503b593f9f6b0605b5578ce56
2020-07-15 10:20:38 -07:00
Andres Suarez
30228a7649 Use the Rust toolchain via the DotSlash Windows shim
Reviewed By: mzlee

Differential Revision: D22495160

fbshipit-source-id: 3d6240906dd086ccac6668d907074ec7ca86ebce
2020-07-14 04:50:27 -07:00
Lukasz Piatkowski
75ae342768 edenscm/hg: add GitHub Actions with CI for HG plus add fixes for getdeps (#25)
Summary:
Fixes include:
1. Passing "GETDEPS_BUILD_DIR" and "GETDEPS_INSTALL_DIR" env variable and using them in eden/scm/Makefile rather than assuming the source code is always in the same place regardless getdeps arguments (it isn't).
2. Added "fbthrift-source" and "fb303-source" to avoid unnecessary compilation (at least of fb303) and to put fbthrift and fb303 source code in an easy to locate place inside getdeps' "installed" folder.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/25

Test Plan: sandcastle, check oss-eden_scm-darwin-getdeps

Reviewed By: farnz

Differential Revision: D22431872

Pulled By: lukaspiatkowski

fbshipit-source-id: 8ccbb090713ec085a5dd56df509eb58ab6fb9e34
2020-07-10 12:07:45 -07:00
Zeyi (Rice) Fan
7551421f81 add retry flag to getdeps test
Summary: This commit adds a flag `--retry` to getdeps and teach it to run retry failed test. This allows us to still pass the tests when there are some flaky tests presents.

Reviewed By: wez

Differential Revision: D22291063

fbshipit-source-id: 572af48a52ceb4a9abbf530cc0154ded0120c0de
2020-07-06 16:03:44 -07:00
Zeyi (Rice) Fan
05194f207f avoid using relative path in fb_py_win_main
Summary:
After some experimenting, it is a little awkward if we want to specify a relative path based on the executable location. We'd need to add a bunch of path calculations to make it right, and I don't think the added complexity is really worth the effort.

As a result, let's just remove the use of relative path, and if we ever want to ship a copy of Python distribution, we can place it under the same directory as the binary.

Reviewed By: chadaustin

Differential Revision: D22394180

fbshipit-source-id: 86d27f6d16a03fe08826b5e5eafcef2a1c77997f
2020-07-06 15:27:43 -07:00
Lukas Piatkowski
c763ab4b40 eden/scm: provide getdeps.py way of building eden/scm on GitHub
Summary:
In order to do what the title says, this diff does:
1. Add the `eden/oss/.../third-party/rust/.../Cargo.toml` files. As mentioned in the previous diff, those are required by GitHub so that the third party dependencies that are local in fbsource are properly defined with a "git" dependency in order for Cargo to "link" crates properly.
2. Changes to `eden/scm/Makefile` to add build/install commands for getdeps to invoke. Those command knowing that they are called from withing getdeps context they link the dependencies brought by getdeps into their proper places that match their folder layout in fbsource. Those Makefile commands also pass a GETDEPS_BUILD env to the setup.py invocations so that it knows it is being called withing a getdeps build.
3. Changes to `eden/scm/setup.py` that add "thriftasset" that makes use of the getdeps.py provided "thrift" binary to build .py files out of thrift files.
4. Changes to `distutils_rust` to use the vendored crates dir provided by getdeps.
5. Changes to `getdeps/builder.py` and `getdeps/manifest.py` that enable more fine-grained configuratior of how Makefile builds are invoked.
6. Changes to `getdeps/buildopts.py` and `getdeps/manifest.py` to disable overriding PATH and pkgconfig env, so that "eden/scm" builds in getdeps using system libraries rather than getdeps-provided ones (NOTE: I've tried to use getdeps provided libraries, but the trickiest bit was that Rust links with Python, which is currently not providable by getdeps, so if you try to build everything the system provided Python libraries will collide with getdeps provided ones)
7. Added `opensource/fbcode_builder/manifests/eden_scm` for the getdeps build.

Reviewed By: quark-zju

Differential Revision: D22336485

fbshipit-source-id: 244d10c9e06ee83de61e97e62a1f2a2184d2312f
2020-07-02 17:53:37 -07:00
Zeyi (Rice) Fan
5c2a8b1ed4 make fb_py_win_main to dynamically find Python3.dll
Summary:
In EdenFS's latest Windows package. We are seeing DLL import errors coming from `asyncio` as it requires a system native module `_overlapped.pyd`.

The underlying cause is because when we build EdenFS CLI on Sandcastle, we are linking with Python 3.6.2. The Python36.dll shipped with the EdenFS package is also coming from that version.

However, on Windows laptop. We have Python 3.6.3. Since we are not shipping the Python system libraries with us. It uses the libraries installed in the system, and it attempts to import the `_overlapped.pyd` located at `C:\Pythone36\DLLs\`. This version is compiled against Python 3.6.3, which is incompatible with the Python36.dll we are using.

----

To resolve this, we need either ship an embedded copy of Python along with EdenFS, or teach EdenFS to use the Python distribution installed in the system. This commit tweaks the executable we prepend to the archive created with zipapp to locate `Python3.dll` dynamically. This allows us to use the Python installed in the system so we can avoid the version mismatch issue.

With this setup, we can also be shipping an embedded Python version along with EdenFS, and the Python loader can look for that path. This is demonstrated with the relative DLL loading `..\python`.

In theory, we can have a package structure like this:

```
.
├── python
│   ├── ....
│   └── python3.dll
└── bin
    ├── ...
    ├── edenfsctl.exe
    └── edenfs.exe
```

Reviewed By: xavierd

Differential Revision: D22325210

fbshipit-source-id: 96a3f9503e7865a5f9d95710ff13f019afcf04f1
2020-07-01 13:17:49 -07:00
Jon Maltiel Swenson
7d47c4b523 Remove rsocket-cpp dependency from OSS projects depending on fbthrift
Summary: fbthrift no longer depends on rsocket-cpp

Reviewed By: simpkins

Differential Revision: D22275231

fbshipit-source-id: c1f217f1ce97591b8ebca002bf8ae3af701be641
2020-07-01 11:24:22 -07:00
Shrikrishna Khare
8357af8af9 Fix OpenNSA 6.5.19 hash as Brcm modified the tarball
Summary:
Koray reported issue with OpenNSA while using build VM and observed that we
don't hit the issue on devserver thanks to downloading the lfs cached file.

The root cause:

Broadcom added License notice and uploaded new 6.5.19 with same name.
This changed the hash though - causing fbcode builder to complain.
Fix it by adjusting the hash.

See the first line in the recursive diff of before vs. after: P134467317

(the broken symlinks is an unrelated existing issue, which we have reported to
Broadcom).

Reviewed By: bkoray

Differential Revision: D22280971

fbshipit-source-id: 781079df426f83901509225156cf77a3966d3301
2020-06-29 10:22:36 -07:00
Shrikrishna Khare
d4f7e156c7 fbcode_builder: getdeps: Update OpenNSA to 6.5.19
Summary: 6.5.19 is now available, switch OSS to pick that instead of old 6.5.17.

Reviewed By: rsunkad

Differential Revision: D22199286

fbshipit-source-id: 231346df8d2f918d2226cfe17b01bde12c18a5a7
2020-06-24 10:51:38 -07:00
Lukas Piatkowski
f9eb013d43 mononoke/configerator structs: change the OSS folder where configerator structs are saved
Summary:
Due to Thrift design of "include" statements in fbcode the thrift structures has to be contained in folders that are identical to the folder layout inside fbcode.

This diff changes the folder layout on Cargp.toml files and in fbcode_builder, there will be a next diff that changes this for ShipIt as well.

Reviewed By: ikostia

Differential Revision: D22208707

fbshipit-source-id: 65f9cafed2f0fcc8398a3887dfa622de9e139f68
2020-06-24 09:38:46 -07:00
Shrikrishna Khare
58eac05c56 fbcode_builder: getdeps: OpenNSA update source URL
Summary:
We had to fork OpenNSA and clone from it, see D19437386 for details.
Broadcom has now started hosting OpenNSA as a tarball.
Thus, we no longer need to maintain a fork (yay!)

This patch points opennsa manifest to fetch opennsa from this new location.

Reviewed By: bkoray

Differential Revision: D22175932

fbshipit-source-id: 51cd777ab836e4f191d78fbb2312925e446ca38f
2020-06-22 19:39:11 -07:00
Zeyi (Rice) Fan
8cc4c2f5c5 fix encoding bug
Summary: This bug can be triggered when your computer name contains emoji. getdeps.py will fail to create this file due to Python attempts to write the file as cp1252 (Windows's default encoding)

Reviewed By: wez

Differential Revision: D22171935

fbshipit-source-id: fc3be2d1050c17ddbe05a0fc91d6613865f092ce
2020-06-22 19:05:28 -07:00
Lukasz Piatkowski
e326cdb0bd GitHub Actions: fix running out of space on Ubuntu build workflow (#23)
Summary:
As per https://github.com/actions/virtual-environments/issues/709 there started to be some issies with Ubuntu envs running out of space. This should fix it.

Also our Cargo builds use a lot of space, changing them to be non-incremental and removing debug symbols keeps the build fast, but greatly reduces the disk space usage leaving us enough space on GitHub Actions virtual machines.
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/23

Reviewed By: farnz

Differential Revision: D22160020

Pulled By: lukaspiatkowski

fbshipit-source-id: c23393e310c15ebf5a18b80f0bb5f1f894d24849
2020-06-22 07:50:25 -07:00
Lukas Piatkowski
60419d261b cargo_from_buck: add the patch section to Cargo workspace and allow workspace appending to existing manifest
Summary:
Two changes here:
1. The `[patch.crates-io]` section of `third-party/rust/Cargo.toml` is being now copied over to workspaces generated by autocargo for OSS and in the runtime generated Cargo.toml file for cargo-fbcode builds. Without that some projects could be buildable in Buck internally, but not externally on GitHub due to missing patches.
2. If a `[workspace]` Cargo.toml file is being generated and there is already a generated Cargo.toml file in the same directory then instead of overriding that file the `[workspace]` (and `[patch]`) sections are appended to that Cargo.toml file.

Reviewed By: farnz

Differential Revision: D22023144

fbshipit-source-id: dec54491c36c2ee0ab29eefb722b3eceaef6ffe1
2020-06-17 06:27:39 -07:00
Chad Austin
ab4cd318dd re-enable lz4 compression for rocksdb on macOS and Linux
Summary:
I think LZ4 was disabled accidentally in our rocksdb getdeps build in
D21319896. Enable it again on macOS and Linux, because otherwise this
breaks people with EdenFS mounts containing LZ4-compressed proxy
hashes.

Reviewed By: xavierd

Differential Revision: D21990356

fbshipit-source-id: b9166c2992ae51f09de3fa9a4f114143aa008f43
2020-06-15 10:36:55 -07:00
Martin Thomas Fleischer
a8b76ca8e3 Fix shell builders (#50)
Summary:
In 0ae204a978c11ddefafd81bd319a078239a44c1c the 'projects_dir' option
became a required constructor argument since it is called within the
constructor. However, it has not been adjusted in the subclasses that
used to set the option after instantiation. This commit fixes the
'shell_builder' and the 'debian_system_builder'.
Pull Request resolved: https://github.com/facebook/openr/pull/50

Test Plan:
1. Go to build directory: `cd build`
2. Run the `shell_builder` & `debian_system_builder`:
    - `python fbcode_builder/shell_builder.py`
    - `python debian_system_builder/debian_system_builder.py`

`shell_builder` output before:
```
Traceback (most recent call last):
  File "fbcode_builder/shell_builder.py", line 102, in <module>
    builder = ShellFBCodeBuilder()
  File "/home/butjar/tu/ma/openr/build/fbcode_builder/fbcode_builder.py", line 93, in __init__
    self._github_dir = self.option('projects_dir')
  File "/home/butjar/tu/ma/openr/build/fbcode_builder/fbcode_builder.py", line 108, in option
    raise RuntimeError('Option {0} is required'.format(name))
RuntimeError: Option projects_dir is required
```

`shell_builder` output after:
```
set -exo pipefail
export CCACHE_DIR='/home/butjar/.fbcode_builder-sZshomesZsbutjarsZstusZsmasZsopenr/.ccache' CC="ccache ${CC:-gcc}" CXX="ccache ${CXX:-g++}"
### Diagnostics ###

# Builder ShellFBCodeBuilder(google/googletest:cmake_defines={u'BUILD_GTEST': u'ON', u'BUILD_SHARED_LIBS': u'OFF'}, google/googletest:git_hash=u'release-1.8.1', facebook/openr:local_repo_dir='/home/butjar/tu/ma/openr', facebook/zstd:git_hash=ShellQuoted(u'$(git describe --abbrev=0 --tags origin/master)'), openr/build:cmake_defines={u'ADD_ROOT_TESTS': u'OFF'}, thom311/libnl:git_hash=u'libnl3_2_25', projects_dir=u'/home/butjar/.fbcode_builder-sZshomesZsbutjarsZstusZsmasZsopenr', fmtlib/fmt:git_hash=u'5.3.0', wangle/wangle/build:cmake_defines={u'BUILD_TESTS': u'OFF'}, prefix=u'/home/butjar/.fbcode_builder-sZshomesZsbutjarsZstusZsmasZsopenr/installed', fizz/fizz/build:cmake_defines={u'BUILD_TESTS': u'ON'}, ccache_dir=u'/home/butjar/.fbcode_builder-sZshomesZsbutjarsZstusZsmasZsopenr/.ccache', zeromq/libzmq:git_hash=u'v4.2.2', make_parallelism=4, jedisct1/libsodium:git_hash=u'stable')
hostname
cat /etc/issue || echo no /etc/issue
g++ --version || echo g++ not installed
cmake --version || echo cmake not installed

### Check out fmtlib/fmt, workdir build ###

mkdir -p '/home/butjar/.fbcode_builder-sZshomesZsbutjarsZstusZsmasZsopenr' && cd '/home/butjar/.fbcode_builder-sZshomesZsbutjarsZstusZsmasZsopenr'
git clone  https://github.com/'fmtlib/fmt'
mkdir -p '/home/butjar/.fbcode_builder-sZshomesZsbutjarsZstusZsmasZsopenr'/'fmt'/'build' && cd '/home/butjar/.fbcode_builder-sZshomesZsbutjarsZstusZsmasZsopenr'/'fmt'/'build'
git checkout '5.3.0'

### Build and install fmtlib/fmt ###

...
```

Reviewed By: steven1327

Differential Revision: D21865881

Pulled By: saifhhasan

fbshipit-source-id: dfd78127d3b2c78721f84a3ecafe0b7198c38f06
2020-06-03 14:19:29 -07:00
Martin Thomas Fleischer
6dd3dfdadb Fix shebang in shell_builder (#51)
Summary:
Typo in python shebang introduced by 0d19e27, probably by accident.

Found while skimming the code.
Pull Request resolved: https://github.com/facebook/openr/pull/51

Reviewed By: steven1327

Differential Revision: D21865922

Pulled By: saifhhasan

fbshipit-source-id: 5f2c2c2fac82078070920915812139f5fef1c7fe
2020-06-03 13:48:23 -07:00