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

128 Commits

Author SHA1 Message Date
Máté Szabó
879664a286 Fix actions/upload-artifact deprecation
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/970

actions/upload-artifact < v4 is deprecated and will not be supported after November 30, 2024.[1] Migrate to v4 instead -- the API used by fbcode_builder is not changed by this version bump.

[1] https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

X-link: https://github.com/facebook/folly/pull/2284

Reviewed By: yfeldblum

Differential Revision: D61730024

Pulled By: Orvid

fbshipit-source-id: 37eb13c6257a233ae170aa44aadeeb35a01568b1
2024-08-29 18:07:25 -07:00
beryll1um
da8d696080 Support of Arch Linux in getdeps.py
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/907

I don't sure that I make all in accordance with the your contribution pipeline, so please correct me If there is needed.
So, I've made some changes to support the `pacman` package manager in your `getdeps.py` script. In `manifests` I'm also duplicated some packages from `debs` and `rpms` sections and create a new `pps` sections with according packages for  `pacman`.

Issue:  https://github.com/facebook/folly/issues/1701

X-link: https://github.com/facebook/folly/pull/1702

Reviewed By: yfeldblum

Differential Revision: D33514769

Pulled By: Orvid

fbshipit-source-id: a081c3a5bcb7f7cdde3a4a91c0d15517c0a171b3
2024-07-15 13:50:07 -07:00
Simon Marlow
3dfff8fb84 CI: enable clang tests (#898)
Summary: Pull Request resolved: https://github.com/facebookincubator/zstrong/pull/898

Reviewed By: malanka

Differential Revision: D59065671

fbshipit-source-id: 2a09ae13e1d4c62a7b9a907cca0e911672435ad1
2024-07-03 08:57:21 -07:00
Simon Marlow
6790282a52 Refactoring
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/897

Builder refactoring: instead of providing `install_dirs` to `build()`, `test()` etc., provide `loader` and `dep_manifests` when creating the builder. This is a cleaner API because we were computing `install_dirs` in multiple places before.

Furthermore this lets us do things that need to see the manifests of the dependencies, not just the list of `install_dirs`, such as treating direct dependencies differently from indirect dependencies (see D58244928).

Reviewed By: chadaustin

Differential Revision: D58200528

fbshipit-source-id: e52d35e84161b83ab49ab43099c3e3b9bb03f36e
2024-06-26 17:02:17 -07:00
Simon Marlow
42696ea895 debug doesn't require build first
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/870

brainfart

Reviewed By: chadaustin

Differential Revision: D58200715

fbshipit-source-id: ccb02285e672e3e638e6eda92fc0610eb903cb69
2024-06-06 07:50:05 -07:00
Simon Marlow
33643225be Add debug command
Summary:
Starts a shell in the build dir, with the environment set up in the
same way as for the build. Useful for experimenting and testing.

Reviewed By: chadaustin

Differential Revision: D58082246

fbshipit-source-id: 82b275401528d7616c2560d80b4c187de67f6032
2024-06-04 13:57:07 -07:00
Simon Marlow
7a68727398 --extra-cmake-defines should be a global flag
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/858

Because it needs to be passed to other commands that use project
hashes, such as "test".

(in general there are probably a lot more of these, just fixing the
ones I've ran into so far)

Reviewed By: genevievehelsel

Differential Revision: D58082245

fbshipit-source-id: 09fa6b5ce4cc4b3ae7ecfb34ac83681cecb36e3c
2024-06-04 11:00:48 -07:00
Simon Marlow
f1d35639d6 --shared-libs should be a common argument
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/848

Because it should work with `show-inst-dir`, otherwise we can't
calculate the right project hash.

Reviewed By: chadaustin

Differential Revision: D58011867

fbshipit-source-id: d8960b4a993efbada8e27584e56976279fcd6b43
2024-06-01 07:29:20 -07:00
Alvaro Leiva Geisse
17acb46b52 reverse shebang
Summary: this runs on github... but also not what i really care about

Reviewed By: terrelln

Differential Revision: D57125977

fbshipit-source-id: 39d7fd319a0ce45a36ba11c4301f5a27356b6c9f
2024-05-08 15:10:30 -07:00
Yedidya Feldblum
97ff7b02d5 bump repo ci to ubuntu-22.04
Summary:
X-link: https://github.com/facebook/folly/pull/2189

X-link: https://github.com/facebookincubator/zstrong/pull/782

Now that Ubuntu 24.04 LTS [has been released](https://ubuntu.com/blog/canonical-releases-ubuntu-24-04-noble-numbat), it is a suitable time to bump the version of Ubuntu used in CI to Ubuntu 22.04 LTS, which is the prior LTS.

Ubuntu 22.04 LTS ships with GCC 11.2, and is the first Ubuntu release to ship with a version of GCC that implements C++20 coroutines.

Reviewed By: chadaustin

Differential Revision: D57017204

fbshipit-source-id: ce5754e7dfc6cb066739bf164e725de8e21f8d24
2024-05-07 09:51:01 -07:00
Alvaro Leiva Geisse
fbf5f9adfb change python3 to fbpython
Summary:
there is a bunch of scripts that uses python3 to run, this means that they are at the mercy of whoever controll their path, in linux, this can be system python3, but can also be platform python (and probably it is both), and in windows in particular it abuses c:\tools\fb-python\python3.exe. fbpython is the universal way to run python at the company that chooses the right platform python, but also provides monitoring and observability.

this scripts generates jobs like

https://www.internalfb.com/sandcastle/job/18014399781484898/

that will stop working once we remove c:\tools\fb-python\python3*.exe

Reviewed By: fried

Differential Revision: D56896564

fbshipit-source-id: d911fdaf6750635adb05b096f0522603baf47bcc
2024-05-02 13:49:18 -07:00
Paul O'Shannessy
4efce72184 Rebuild GitHub Actions workflows
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/749

Updating generated workflow files to account for recent changes. Most notably, this updates the checkout action to v4 and sets an explicit read-only permission.

This also adds support for `--cron` in the codegen to account for only running CI on a schedule (useful for managing costs).

Reviewed By: ahornby

Differential Revision: D56165825

fbshipit-source-id: 298b16effefb6b8a2dc6cbcf07d4ec4a61f48364
2024-04-24 15:36:57 -07:00
Cody Ohlsen
220ffee5db getdeps: support GETDEPS_WGET_ARGS in wget version, support skipping lfs/upload steps
Summary:
X-link: https://github.com/facebookincubator/katran/pull/229

X-link: https://github.com/facebookexperimental/edencommon/pull/18

X-link: https://github.com/facebook/sapling/pull/878

X-link: https://github.com/facebook/openr/pull/154

X-link: https://github.com/facebook/folly/pull/2177

X-link: https://github.com/facebookincubator/zstrong/pull/748

I found it useful to be able to set `GETDEPS_WGET_ARGS` to change some of the flags to `wget` while it's in that fetch mode :)
I also need to skip the lfs upload part in my environment

Reviewed By: mackorone

Differential Revision: D56263907

fbshipit-source-id: ae45c31ebb10123e0358544d294fe2f2979dd59a
2024-04-17 17:24:31 -07:00
Alex Hornby
f15e30b787 getdeps: add --build-type option to build in Debug or RelWithDebInfo mode
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/653

getdeps: add --build-type option to build in Debug or RelWithDebInfo mode

Adds a --build-type option so one can force RelWithDebInfo or Debug explicity

Default remains RelWithDebInfo for cmake.

cargo default is updated to --release to match cmake more closely, if you don't want release use --build-type Debug.

If you want to run github CI in Debug mode (faster build, but tests will run slower), then can pass --build-type Debug to getdeps.py generate-github-actions

X-link: https://github.com/facebook/sapling/pull/786

Reviewed By: mitrandir77

Differential Revision: D51564770

Pulled By: bigfootjon

fbshipit-source-id: ef30332ca193d9805bce005d12b5dbc9f58fcafc
2023-12-19 12:24:39 -08:00
Harvey Hunt
044fe10bc1 opensource: getdeps: Add show-scratch-dir command
Summary:
X-link: https://github.com/facebookincubator/velox/pull/7446

Add a new command to show the location of the scratch dir that getdeps
will use.

Reviewed By: xavierd

Differential Revision: D51027807

fbshipit-source-id: 80a7cfc04320002588d5ec8964fc88914771c6c7
2023-11-07 06:41:39 -08:00
Alex Hornby
018b10ba1d use system patchelf in eden fs build
Summary:
X-link: https://github.com/facebookincubator/velox/pull/7072

use system patchelf in eden fs build

Saves us from doing a fetch and build of autoconf, libtool, automake and patchelf during the arfifacts part of CI

X-link: https://github.com/facebook/sapling/pull/750

Reviewed By: sggutier

Differential Revision: D50313417

Pulled By: genevievehelsel

fbshipit-source-id: 7c585357c848c15a65c5797d6c8750d1119b6efd
2023-10-16 12:10:14 -07:00
Alex Hornby
d57a95d41e fix CI warning about node12 by updating actions/checkout version
Summary:
X-link: https://github.com/facebookincubator/velox/pull/7071

fix CI warning about node12 by updating actions/checkout version

Update the actions/checkout version to fix build warning

X-link: https://github.com/facebook/sapling/pull/749

Reviewed By: sggutier

Differential Revision: D50313430

Pulled By: genevievehelsel

fbshipit-source-id: 4d55d36f7509be51bb4e26728ddbce8e45faba40
2023-10-16 12:10:14 -07:00
Alex
75c06de4eb GitHub Workflows security hardening
Summary:
X-link: https://github.com/facebookincubator/velox/pull/6969

This PR adds explicit [permissions section](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions) to workflows. This is a security best practice because by default workflows run with [extended set of permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) (except from `on: pull_request` [from external forks](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)). By specifying any permission explicitly all others are set to none. By using the principle of least privilege the damage a compromised workflow can do (because of an [injection](https://securitylab.github.com/research/github-actions-untrusted-input/) or compromised third party tool or action) is restricted.
It is recommended to have [most strict permissions on the top level](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions) and grant write permissions on [job level](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) case by case.

X-link: https://github.com/facebook/watchman/pull/1071

Reviewed By: xavierd

Differential Revision: D50095358

Pulled By: genevievehelsel

fbshipit-source-id: 4fc80c6b7c48df08207f68420b48a90ffcfddf27
2023-10-11 09:21:32 -07:00
Mark Shroyer
d69b7ce154 Upgrade to boost 1.83
Summary:
X-link: https://github.com/facebookincubator/velox/pull/6943

Update to boost 1.83.  This addresses a folly build failure on Xcode 15, due to
boost 1.78 referring to the removed std::unary_function.

Reviewed By: jdelliot

Differential Revision: D49972186

fbshipit-source-id: 8d9fdd27c24ccc5a072b6973b86e0c8ed5b77ac3
2023-10-09 12:31:42 -07:00
Alex Hornby
35714fcbbb fix getdeps actions generation for rust toolchain
Summary:
X-link: https://github.com/facebookincubator/velox/pull/6924

fix getdeps actions generation for rust toolchain

Generated actions files created from getdeps.py were missing rust toolchain which meant annoying manual edits

This change also makes the github actions generation honor the --no-tests argument, which is useful  when regenerating the edenfs actions

X-link: https://github.com/facebook/sapling/pull/682

Reviewed By: sggutier

Differential Revision: D49875258

Pulled By: genevievehelsel

fbshipit-source-id: 173f86083ba92bab4063813d3e392df428b9ffe4
2023-10-06 21:20:06 -07:00
Alex Hornby
0ad429a261 allow getdeps github actions to free up disk
Summary:
X-link: https://github.com/facebookincubator/velox/pull/6927

allow getdeps github actions to free up disk

Allow getdeps to free up some disk from the runner and intermediate build steps as some runs (notably the linux eden and mononoke ones) are hitting disk space limits

X-link: https://github.com/facebook/sapling/pull/689

Reviewed By: sggutier

Differential Revision: D49875256

Pulled By: genevievehelsel

fbshipit-source-id: b85b6b2f11857670915b64f47d3c0abd4ca8ca31
2023-10-06 21:20:06 -07:00
Christian Clauss
d3102141dc Fix typos discovered by codespell
Summary:
`codespell --ignore-words-list=arithmetics,atleast,crate,crated,deriver,ect,hel,onl,startin,whats --skip="*.lock"`
* https://pypi.org/project/codespell

X-link: https://github.com/facebookincubator/mvfst/pull/307

Reviewed By: hanidamlaj, lnicco

Differential Revision: D47809078

Pulled By: kvtsoy

fbshipit-source-id: 566557f2389746db541ff265a5dec8d6404b3701
2023-07-26 17:10:41 -07:00
Konstantin Tsoy
55f4585d07 Back out "Fix typos discovered by codespell"
Summary:
Original commit changeset: 337824bc37bc

Original Phabricator Diff: D47722462

Reviewed By: jbeshay, terrelln, lnicco

Differential Revision: D47801753

fbshipit-source-id: 795ffcccbc2223608e2a707ec2e5bcc7dd974eb3
2023-07-26 12:49:13 -07:00
Facebook Community Bot
4246f00ff1 Re-sync with internal repository (#456)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2023-07-25 10:04:09 -07:00
kayagokalp
80fd72f767 fix-ci: move from unmaintained actions-rs to a maintained alternative
Summary:
Unfortunately `actions-rs` is [unmaintained](https://github.com/actions-rs/toolchain/issues/216) and I am trying to advocate a move from actions-rs to its maintained alternative such as https://github.com/dtolnay/rust-toolchain across the community.

X-link: https://github.com/facebook/hhvm/pull/9369

Reviewed By: dtolnay

Differential Revision: D46326694

Pulled By: dtolnay

fbshipit-source-id: 2f08553539fba083e5ec90662328d69b78e19b44
2023-07-04 16:07:50 -07:00
Victor Zverovich
d3eb1a3d72 Use sudo when installing dependencies on Linux (#4796)
Summary:
X-link: https://github.com/facebookincubator/velox/pull/4796

`brew` no longer supports running as root:

```
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Command '['brew', 'install', 'autoconf', 'automake', 'boost', 'cmake', 'double-conversion', 'icu4c', 'libevent', 'libsodium', 'libtool', 'lz4', 'ninja', 'openssl@1.1', 'xz', 'zlib', 'zstd']' returned non-zero exit status 1.
!! Failed
```

And as a result the recommended install instructions no longer work:

```
sudo ./build/fbcode_builder/getdeps.py install-system-deps ...
```

and cannot be made to work portably across platforms because Linux requires `sudo` be there while macOS requires `sudo` not be there.

To fix this move `sudo` to Linux system dependency installation only.

Also update `apt-get` to `apt` while at it.

Resolves https://github.com/facebook/fbthrift/issues/545.

Reviewed By: somasun

Differential Revision: D45371004

fbshipit-source-id: 75334db22226efc961e7d4d6c6eca911086b97ba
2023-05-01 09:30:16 -07:00
Mark Shroyer
3573a0587c Only upload cached projects with built_marker (#4087)
Summary:
X-link: https://github.com/facebookincubator/velox/pull/4087

Under some circumstances, getdeps can cache a project artifact
where there is no built_marker, forcing the script to re-build the artifact
from source.  After D43260530 (47dde7c249) this no longer causes a build failure, but it can
still make builds take longer than they should.

This ensures we only cache artifacts with a built_marker, so that they aren't
overwritten by artifacts without.

Reviewed By: genevievehelsel

Differential Revision: D43405855

fbshipit-source-id: b1b9e194e642fa820d0fbc54a7c15ff81fc90a82
2023-02-22 18:50:08 -08:00
vibhatha
9bcc1277d4 Pyvelox sphinx documentation (#3363)
Summary:
This is the initial PR to integrate PyVelox documentation.

X-link: https://github.com/facebookincubator/velox/pull/3363

Reviewed By: Yuhta

Differential Revision: D43483032

Pulled By: kgpai

fbshipit-source-id: f632974161b0c71c461415d239b1fa3726bb8299
2023-02-22 14:40:00 -08:00
Mark Shroyer
47dde7c249 Fetch source archive if cached artifact's built_marker is missing (#4035)
Summary:
X-link: https://github.com/facebookincubator/velox/pull/4035

If getdeps finds a cached build artifact, it currently skips fetching the
source archive, which is done by calling `fetcher.update()`:
https://www.internalfb.com/code/fbsource/[f64171219e95f47c81929cde0a09e720e079dd31]/fbcode/opensource/fbcode_builder/getdeps.py?lines=691

But without the built_marker, the script will still create a builder for the
artifact:
https://www.internalfb.com/code/fbsource/[f64171219e95f47c81929cde0a09e720e079dd31]/fbcode/opensource/fbcode_builder/getdeps.py?lines=600

This then fails when the builder tries to extract the missing source archive.
In Boost's case:
https://www.internalfb.com/code/fbsource/[f64171219e95f47c81929cde0a09e720e079dd31]/fbcode/opensource/fbcode_builder/getdeps/builder.py?lines=1021

This logic seems to have been broken for a while, but became a problem after
watchman's Windows build started finding cached boost and ninja artifacts that
were missing the built_marker, presumably uploaded by other projects as a
result of D42996394 (db79e34cc7).

This change fixes the broken watchman build, but itself doesn't get us back to
using cached artifacts.

Reviewed By: kmancini

Differential Revision: D43260530

fbshipit-source-id: ac0072f213a534aada4046d34fe090510fc5d618
2023-02-16 11:31:40 -08:00
Manikandan Somasundaram
db79e34cc7 Update the built_marker hashing logic only for current project (#3934)
Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/3934

Reviewed By: shri-khare

Differential Revision: D42996394

fbshipit-source-id: e4fe54ba6e7f51b4fc640bf80bbb18b257903b1c
2023-02-03 10:43:23 -08:00
Manikandan Somasundaram
4761c000af Update build_marker only if specific cmake-target is not requested (#3788)
Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/3788

Reviewed By: chadaustin

Differential Revision: D42637430

fbshipit-source-id: 6997a537a0f924b068551c244463082b3e105be6
2023-01-24 16:44:43 -08:00
Manikandan Somasundaram
730dad1340 Enable building specific cmake targets (#3759)
Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/3759

Reviewed By: chadaustin

Differential Revision: D42551680

fbshipit-source-id: 4e5c5bef2ad2997e04ab8fb8db4ef7fbeda0bcab
2023-01-19 18:03:58 -08:00
Chad Austin
5d10b9a536 automation should use apt-get instead of apt
Summary:
Automation should use `apt-get` instead of `apt`, as `apt` does not
have a stable interface.

This fixes a warning when running getdeps.py on recent Ubuntu:

```
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
```

Reviewed By: fanzeyi

Differential Revision: D39031719

fbshipit-source-id: 54a0fe51ce159174b089fc446e99a4ab5d69d626
2022-08-25 15:19:18 -07:00
Chad Austin
4333130372 upgrade getdeps GitHub actions to Ubuntu 20 (#516)
Summary:
X-link: https://github.com/facebook/fbthrift/pull/516

X-link: https://github.com/facebook/watchman/pull/1050

Pull Request resolved: https://github.com/facebook/proxygen/pull/426

X-link: https://github.com/facebook/folly/pull/1842

X-link: https://github.com/facebook/fboss/pull/117

Sadly, even though Ubuntu 18.04 is still in LTS, GitHub is deprecating
its runner image.

Migrate the generated GitHub Actions to 20.04.

https://github.com/actions/runner-images/issues/6002

https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/

Reviewed By: fanzeyi

Differential Revision: D38877286

fbshipit-source-id: 85f3324d6666eacb190a43985585b438de69d545
2022-08-22 10:05:10 -07:00
Zeyi (Rice) Fan
6495a90f93 disable autocrlf on Windows jobs
Summary:
In D36905191 (6e6bf12f62), getdeps gained the ability to apply patches on Windows.

However, on GitHub Action workers, `core.autocrlf` is turned on by default. This means the patch files we checked in will end up having CRLF endings while the source code we downloaded are still in LF endings, and `git apply` doesn't like that.

This diff teaches getdeps to disable `core.autocrlf` in GitHub Action Windows workers.

Reviewed By: vitaut

Differential Revision: D37008387

fbshipit-source-id: 34c9f89e8783d0613040d190c4ad3477bd7bfd53
2022-06-08 13:18:38 -07:00
John Reese
161098c2ab apply import merging for fbcode (8 of 11)
Summary:
Applies new import merging and sorting from µsort v1.0.

When merging imports, µsort will make a best-effort to move associated
comments to match merged elements, but there are known limitations due to
the diynamic nature of Python and developer tooling. These changes should
not produce any dangerous runtime changes, but may require touch-ups to
satisfy linters and other tooling.

Note that µsort uses case-insensitive, lexicographical sorting, which
results in a different ordering compared to isort. This provides a more
consistent sorting order, matching the case-insensitive order used when
sorting import statements by module name, and ensures that "frog", "FROG",
and "Frog" always sort next to each other.

For details on µsort's sorting and merging semantics, see the user guide:
https://usort.readthedocs.io/en/stable/guide.html#sorting

Reviewed By: lisroach

Differential Revision: D36402214

fbshipit-source-id: b641bfa9d46242188524d4ae2c44998922a62b4c
2022-05-15 12:53:03 -07:00
David Greenberg
e6abe0844b Add argument to pass extra arguments to boost b2 build tool (#28)
Summary:
X-link: https://github.com/facebook/fb303/pull/28

X-link: https://github.com/facebook/fboss/pull/115

X-link: https://github.com/facebook/folly/pull/1736

Pull Request resolved: https://github.com/facebook/proxygen/pull/403

X-link: https://github.com/facebook/fbthrift/pull/488

This adds a way to pass arguments to the `b2` build tool, used by Boost. This is needed in order to link a getdeps built boost into an relocatable `.so`. The motivating use case is that we need to statically link Boost into a native library used by a python wheel, which must be relocatable. This functionality already exists for CMake-based projects.

Reviewed By: mackorone

Differential Revision: D34796774

fbshipit-source-id: 0d6a9f4703865dc02048b87e77394c44ef646af6
2022-03-14 09:19:39 -07:00
Alex Hornby
66e770a87d apt-get update on github (#113)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/113

GitHub Actions was failing at apt-get stage,  error message suggested adding an apt-get update as remedy.  Added in this diff and it indeed works.

The actions build fails later on missing mio::net module when building mysql async, but that's unrelated to this change.

Reviewed By: farnz

Differential Revision: D34368662

fbshipit-source-id: f0a00da3ee740ae4443a328616e792ea615c922c
2022-02-20 09:22:49 -08:00
Alex Hornby
fa26d2a99b improve crate vendoring (#110)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/110

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

Make it so that changes to rust-shed or other common rust source are used locally vendored, so they don't need to be pushed to github before they are visible in a build.

There was already some support for cargo vendoring in getdeps, but it was limited to dependencies between manifests built with cargo builder.  This wasn't enough to build something like eden (cmake is main entry point, with later calls cargo) or eden_scm (make is main entry point, with later calls to cargo), so this diff adds a cargo prepare step for getdeps other primary build systems.

The cargo vendoring is done by using a cargo config file to point to the source files used by getdeps.  It has two modes:

1. per crate, existing mode which is already automatic for cargo to cargo manifest dependencies.  To use it for a non cargo build manifest, add crate.pathmap
2. per git url, existing mode which was only use for crates.io third-party crates, now can be enabled by setting cargo.cargo_config_file

Reviewed By: yancouto

Differential Revision: D33895469

fbshipit-source-id: 7b13c0b679532492a336ce217de875c25fe1be90
2022-02-16 01:09:01 -08:00
Alex Hornby
076407407a add github actions for EdenFS on linux and fix Eden SCM Mac build (#106)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/106

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

Summary

* Add EdenFS builds on external CI now EdenSCM is good

* Mac builds on github actions by using brew for system dependencies

To make this work had to fix some path ordering issues with install directories for Linux and Mac, and generalise the homebrew path fixups we were doing for bison to all the used homebrew packages.

Previously Installed packages were being added after system paths, so our own installed thing might be ignored. On github these meant system python 3.9 was being used for hg tests rather than our specified 3.8 (this showed we have some test fails on python 3.9 with "SystemError: deallocated bytearray object has exported buffers", that are beyond the scope of this diff to fix)

Also needed to include the getdeps generated python into the generated edenscmdeps3.zip archive setup.py produces otherwise EdenFS tests failed to import thrift.Thrift

Eden tests are hanging when run externally about half way through, so disable them on github actions for now as this PR is already fairly large. They work when run locally on an internal devserver, so probably some bit of environment necessary is not defined in the test runner

Reviewed By: chadaustin

Differential Revision: D34116505

fbshipit-source-id: d0d628db5daabc28d0bd8997cd5c1bc885ed1e73
2022-02-14 11:56:43 -08:00
Chad Austin
f723ceb5c3 update all Windows jobs to windows-2019 (#1714)
Summary:
Pull Request resolved: https://github.com/facebook/folly/pull/1714

windows-2016 will be removed in March, and now that we've updated
Boost, we can upgrade to windows-2019.

Reviewed By: genevievehelsel

Differential Revision: D34119171

fbshipit-source-id: caad432bebf6b8282844bf79f82b1fbc34f2df9e
2022-02-09 20:01:35 -08:00
Chad Austin
5cd35796ba add freebsd support
Summary: Add some basic support for FreeBSD to getdeps.

Reviewed By: ahornby

Differential Revision: D33989129

fbshipit-source-id: 42ff5f160b7e19c12196bb2e52a726f7815487bd
2022-02-08 18:08:18 -08:00
Alex Hornby
dd4790b3f9 generate the eden_scm github actions (#103)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/103

Automate maintenance of the edenscm_* github actions yamls

Add job file and name options and support for the Rust install section

Reviewed By: fanzeyi

Differential Revision: D34044422

fbshipit-source-id: 7d5f07d37bab1eff5de30a88e710dbf7479ca192
2022-02-08 03:01:35 -08:00
Alex Hornby
e6c0e7ddc9 regenerate github actions
Summary: Fix the getdeps.py  generation sub command and regenerate github actions before making changes to support actions generation for eden_scm

Reviewed By: fanzeyi

Differential Revision: D34044243

fbshipit-source-id: 0039d04f25af4c842145dc142dae6b9996fc8046
2022-02-08 03:01:35 -08:00
Alex Hornby
8c699437de improve OSS CI jobs for eden and eden_scm
Summary: Make the --facebook-internal flag value available from BuildOptions so can have jobs of both values where required

Reviewed By: xavierd

Differential Revision: D33945588

fbshipit-source-id: 5d0e1b42973bd3e411a4a71075915bdb2755f0eb
2022-02-04 11:01:52 -08:00
Harvey Hunt
a75c04f38c getdeps: Add support for brew packages and define package dependencies
Summary:
In order to speed up build times on a mac, add homebrew support to
getdeps.

Homebrew packages can be declared in a manifest using the `homebrew` header.

Futher, ahornby has added manifest entries for homebrew packages which are
included in this diff and also included a change to use the correct version of
openssl. Without this openssl change, homebrew cmake configure finds an old
openssl 1.0.2 install.

This diff provides a 2x speed up for building folly:

Timings for clean getdeps folly build on mid-2018 2.9Ghz i9 6 core intel macbook pro with 32GB RAM:

With new homebrew system deps:
```
rm -rf /Users/ahornby/.scratch/UsersZahornbyZfbsource/fbcode_builder_getdeps/
time ./opensource/fbcode_builder/getdeps.py build --allow-system-packages folly
real	17m39.329s
user	76m10.317s
sys	5m50.163s
```

Without:
```
rm -rf /Users/ahornby/.scratch/UsersZahornbyZfbsource/fbcode_builder_getdeps/
time ./opensource/fbcode_builder/getdeps.py build folly
real	32m10.344s
user	105m53.448s
sys	15m57.858s
```

Reviewed By: ahornby

Differential Revision: D33842632

fbshipit-source-id: ac785d4a8dcfa31b77292bddd9e747022ac36e3b
2022-02-04 04:28:37 -08:00
Chad Austin
9992a03119 upgrade boost to 1.78.0
Summary: Boost 1.69 does not build on Fedora 35, so upgrade to Boost 1.78.

Reviewed By: ahornby

Differential Revision: D33855670

fbshipit-source-id: 85469a835a1dab1a7d5222413b1f1349bdcff280
2022-02-03 15:03:10 -08:00
Chad Austin
be7c9671ba update to checkout@v2
Summary:
checkout@v2 is the current action version, and the old one may have
security issues. Let's just run with the latest version.

Reviewed By: ahornby

Differential Revision: D33834847

fbshipit-source-id: fba0733577bf23c208c9824aa3815bd01a813d9a
2022-02-01 09:51:15 -08:00
Alex Hornby
88622ecbf1 add support for testing package resolution by distro and distro version
Summary:
Add support for overriding os, distro and distro version to command line when inspecting system packages so one can requested see ubuntu 18.04 package from other OS.  Makes testing easier

Used shlex to shell unquote the value to be tested in the getdeps expression evaluator. getdeps expression parser didn't tolerate 18.04 as . is special char to getdeps expressions, needed to be "18.04"

Reviewed By: quark-zju

Differential Revision: D33741323

fbshipit-source-id: d83397c7fb5180a4d985d0d8ae7b3ff33b72f828
2022-01-25 02:22:59 -08:00
Chad Austin
4fb4756ec9 remove legacy __future__ imports
Summary: The future is now.

Reviewed By: xavierd

Differential Revision: D33714537

fbshipit-source-id: 8d282bbe7391c4b72b70dab54a5c252060fba457
2022-01-24 20:23:34 -08:00