Commit Graph

103 Commits

Author SHA1 Message Date
Alex Hornby
af7118ef42 regenerate workflows
Summary: Regenerate github workflows to pick up new folly deps

Reviewed By: zpao

Differential Revision: D56698744

fbshipit-source-id: 7b0b72d47351bd9fd9afc9f97d2369f79934d584
2024-04-30 10:26:32 -07:00
Paul O'Shannessy
bd8d8557d1 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
Jun Wu
104c2d214c github: reduce frequency of "Mononoke Mac" CI
Summary:
The current trajectory will excced our CI budget. Attempt to reduce spending by
running the mac tests less.

Reviewed By: sggutier

Differential Revision: D55453127

fbshipit-source-id: eaed4e2f4de30a9aaeee19c839c95dc1370bf605
2024-03-27 17:49:00 -07:00
Michael Bolin
a31d49191f contrib -> eden/contrib
Summary:
This action is currently failing:

https://github.com/facebook/sapling/actions/workflows/reviewstack.dev-deploy.yml

It looks like it is due to the path not being updated correctly
in light of ReviewStack's code moving.

Reviewed By: sggutier

Differential Revision: D53817964

fbshipit-source-id: 3f434ce8022c782c462e34f3ed120ae09fe95166
2024-02-15 10:17:54 -08:00
Jun Wu
8bc196d689 move reviewstack to a different npm workspace
Summary:
The reviestack has diveraged from the main ISL project in terms of key dependencies.
Namely, ISL no longer uses `react-scripts` (which depends on many ancient
packages and makes them hard to upgrade), no longer used the webpack eco-system,
and is going to drop `recoil` soon. Per discussion, we think it's beneficial
to move ReviewStack to its own place. This diff does that. For shared code
they are simply duplicated.

Reviewed By: evangrayk

Differential Revision: D53649151

fbshipit-source-id: 7bcaf10a4c70a79b73c56d75765dfba3ec33e5f7
2024-02-12 15:28:10 -08:00
Alex Hornby
c94cecc33a github: update node to 18.x in docker image builds (#833)
Summary:
github: update node to 18.x in docker image builds

I noticed GitHub verify-addons CI failing with error

```
vite@5.1.0-beta.2: The engine "node" is incompatible with this module. Expected version "^18.0.0 || >=20.0.0". Got "16.20.2"
```

From sapling discord chat, likely this is due to recent replacement pof create-react-apps with vite for ISL.

Update node to 18 on github to fix it.

Pull Request resolved: https://github.com/facebook/sapling/pull/833

Test Plan:
Run local docker builds and check nodejs version
```
docker build -t sapling-cli-ubuntu-20.04 -f .github/workflows/sapling-cli-ubuntu-20.04.Dockerfile . &&
docker build -t sapling-cli-ubuntu-22.04 -f .github/workflows/sapling-cli-ubuntu-22.04.Dockerfile .
```

Before:
```
$ docker run -ti sapling-cli-ubuntu-20.04 node --version
v16.20.2
$ docker run -ti sapling-cli-ubuntu-22.04 node --version
v16.20.2
```

After:
```
$ docker run -ti sapling-cli-ubuntu-20.04 node --version
v18.19.0
$ docker run -ti sapling-cli-ubuntu-22.04 node --version
v18.19.0
```

Reviewed By: genevievehelsel

Differential Revision: D53482290

fbshipit-source-id: 67054cbb2a3a36c1d2e19e7321772b4fefd0cf76
2024-02-06 11:35:27 -08:00
Shish
1a0d7106a4 Add a devcontainer config (#807)
Summary:
Add a devcontainer config

My laptop is full of weird versions of weird tools. Sapling requires specific versions of specific tools. It's nice to be able to open the sapling folder in vscode and get a prompt for "would you like to do your development inside a container with all the correct tools pre-installed?" :) This also allows people on github to click a button to open in github's web-based container-IDE and start developing without installing anything at all, though I don't know if we'd expect anybody to do that

For starters I'm using the CI build image without changes to try and keep the maintenance burden as small as possible, though it would be possible to use a separate layer within the Dockerfile (eg if we wanted to install extra tools that are useful for dev but not needed for building), or have a totally separate Dockerfile

 ---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/807).
* __->__ https://github.com/facebook/sapling/issues/807
* https://github.com/facebook/sapling/issues/806
* https://github.com/facebook/sapling/issues/804

Pull Request resolved: https://github.com/facebook/sapling/pull/807

Differential Revision: D52575911

Pulled By: quark-zju

fbshipit-source-id: b24e1a21493f18a06355c984a72936cd11fef2ea
2024-01-18 08:29:13 -08:00
Shish
9a7bbd98ca shrink builder-images by 60% / several GB (#804)
Summary:
[CI] shrink builder-images by 60% / several GB

If we copy the repo into docker, save the state, then delete the repo, then the repo is still there in the history

These changes use docker staged builds - having a "base" stage which installs the tools needed, a "populate-cache" stage which uses ~3GB of temporary disk space to populate the 162MB cache, and then a "main" stage which copies the 162MB cache but leaves the rest of the temporary files behind

Before - around 5GB:
```
$ docker build -t sapling-build . -f .github/workflows/sapling-cli-ubuntu-22.04.Dockerfile
$ docker history sapling-build
IMAGE          CREATED              CREATED BY                                      SIZE      COMMENT
33b251176a7d   26 seconds ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   0B        buildkit.dockerfile.v0
<missing>      28 seconds ago       WORKDIR /root                                   0B        buildkit.dockerfile.v0
<missing>      28 seconds ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   0B        buildkit.dockerfile.v0
<missing>      28 seconds ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   1.56GB    buildkit.dockerfile.v0
<missing>      About a minute ago   RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   2.19MB    buildkit.dockerfile.v0
<missing>      About a minute ago   RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   8.97MB    buildkit.dockerfile.v0
<missing>      About a minute ago   WORKDIR /tmp/repo                               0B        buildkit.dockerfile.v0
<missing>      About a minute ago   COPY . /tmp/repo # buildkit                     1.17GB    buildkit.dockerfile.v0
<missing>      About a minute ago   ENV PATH=/root/.cargo/bin:/usr/local/sbin:/u…   0B        buildkit.dockerfile.v0
<missing>      About a minute ago   RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   1.49GB    buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   421MB     buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   632kB     buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   100B      buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   1.19kB    buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   81.2MB    buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   43.1MB    buildkit.dockerfile.v0
<missing>      2 minutes ago        ENV TZ=Etc/UTC                                  0B        buildkit.dockerfile.v0
<missing>      2 minutes ago        ARG DEBIAN_FRONTEND=noninteractive              0B        buildkit.dockerfile.v0
<missing>      3 weeks ago          /bin/sh -c #(nop)  CMD ["/bin/bash"]            0B
<missing>      3 weeks ago          /bin/sh -c #(nop) ADD file:50f947da69b3b6c63…   69.3MB
<missing>      3 weeks ago          /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B
<missing>      3 weeks ago          /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B
<missing>      3 weeks ago          /bin/sh -c #(nop)  ARG LAUNCHPAD_BUILD_ARCH     0B
<missing>      3 weeks ago          /bin/sh -c #(nop)  ARG RELEASE                  0B
```

After - around 2.2GB:
```
$ docker build -t sapling-build . -f .github/workflows/sapling-cli-ubuntu-22.04.Dockerfile
$ docker history sapling-build
IMAGE          CREATED              CREATED BY                                      SIZE      COMMENT
1496dd42165f   About a minute ago   COPY /root/npm-packages-offline-cache /root/…   162MB     buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   2.19MB    buildkit.dockerfile.v0
<missing>      2 minutes ago        RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   8.97MB    buildkit.dockerfile.v0
<missing>      11 minutes ago       ENV PATH=/root/.cargo/bin:/usr/local/sbin:/u…   0B        buildkit.dockerfile.v0
<missing>      11 minutes ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   1.49GB    buildkit.dockerfile.v0
<missing>      12 minutes ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   421MB     buildkit.dockerfile.v0
<missing>      12 minutes ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   632kB     buildkit.dockerfile.v0
<missing>      12 minutes ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   100B      buildkit.dockerfile.v0
<missing>      12 minutes ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   1.19kB    buildkit.dockerfile.v0
<missing>      12 minutes ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   0B        buildkit.dockerfile.v0
<missing>      12 minutes ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   81.2MB    buildkit.dockerfile.v0
<missing>      12 minutes ago       RUN |1 DEBIAN_FRONTEND=noninteractive /bin/s…   43.1MB    buildkit.dockerfile.v0
<missing>      12 minutes ago       ENV TZ=Etc/UTC                                  0B        buildkit.dockerfile.v0
<missing>      12 minutes ago       ARG DEBIAN_FRONTEND=noninteractive              0B        buildkit.dockerfile.v0
<missing>      3 weeks ago          /bin/sh -c #(nop)  CMD ["/bin/bash"]            0B
<missing>      3 weeks ago          /bin/sh -c #(nop) ADD file:50f947da69b3b6c63…   69.3MB
<missing>      3 weeks ago          /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B
<missing>      3 weeks ago          /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B
<missing>      3 weeks ago          /bin/sh -c #(nop)  ARG LAUNCHPAD_BUILD_ARCH     0B
<missing>      3 weeks ago          /bin/sh -c #(nop)  ARG RELEASE                  0B
```

 ---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/804).
* https://github.com/facebook/sapling/issues/807
* https://github.com/facebook/sapling/issues/806
* __->__ https://github.com/facebook/sapling/issues/804

Pull Request resolved: https://github.com/facebook/sapling/pull/804

Reviewed By: sggutier

Differential Revision: D52484298

fbshipit-source-id: c4f446007722950bd127dff79a2308edc4e718e1
2024-01-10 17:34:43 -08:00
Facebook GitHub Bot
90d8180eae Re-sync with internal repository
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging.
2023-12-27 14:50:25 -06:00
Michael Bolin
45d2b1c9fe push reviewstack.dev daily
Summary:
This copies the publishing rule we have for sapling-scm.com:

03a4ee6b79/.github/workflows/sapling-website-deploy.yml (L5-L6)

This means that when PRs for ReviewStack are accepted,
they will roll out by the next weekday.

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: sggutier

Differential Revision: D52276596

fbshipit-source-id: 1e6160edad21a0afe92334e5c0b48e5459b13406
2023-12-19 11:05:15 -08:00
Jun Wu
0a2759ca3f github: set CI=false on verify-addons GH action
Summary:
The verify-addons GH action is currently the only red signal.

  Treating warnings as errors because process.env.CI = true.
  Most CI servers set it automatically.

  Failed to compile.

  [eslint]
  src/CommandHistoryAndProgress.tsx
    Line 9:14:  'CommandArg' is defined but never used  typescript-eslint/no-unused-vars

  src/CommitInfoView/CommitInfoView.tsx
    Line 68:3:  'anyEditsMade' is defined but never used  typescript-eslint/no-unused-vars

  src/CommitInfoView/GenerateWithAI.tsx
    Line 23:3:  'editedCommitMessages' is defined but never used  typescript-eslint/no-unused-vars

Attempt to fix it by setting CI to false.

Reviewed By: zzl0

Differential Revision: D51434914

fbshipit-source-id: 63a28763ae09281ceede7d17173c2cf7505f3ad5
2023-11-17 13:58:02 -08:00
Zhaolong Zhu
3e2409653a website: trigger the website action every work day
Summary:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule

We don't need to run webiste workflow on every pushes or prs, but we do need to make sure it works, so let trigger it on every work day

Reviewed By: sggutier

Differential Revision: D51306012

fbshipit-source-id: 8c1425133fbf99c6b62ed37a1daa2a383a246b29
2023-11-14 09:03:08 -08:00
Zhaolong Zhu
4dd47588dd website: fix the deploy yaml
Summary:
the yaml file was broken by D47035733 for 5 months, let's just remove the pull-request events.

```
Error: .github#L1
Invalid type for `on`
```

e.g. https://github.com/facebook/sapling/actions/runs/6863386967

Reviewed By: sggutier

Differential Revision: D51292816

fbshipit-source-id: 04295cf76ebe37b939e4500172a795b5996a6a2f
2023-11-14 08:07:52 -08:00
Alex Hornby
41e6e88d69 fix mononoke build (#769)
Summary:
fix mononoke build

Makes usage of anyhow::Error::backtrace() conditional on fbcode_build. This is necessary because the cargo build of anyhow disables its backtrace features when using RUSTC_BOOTSTRAP=1

For oss cargo build to work on current rustc stable 1.73+ I hid the #![feature(provide_any)] usage by making it condition on fbcode_build.

Pull Request resolved: https://github.com/facebook/sapling/pull/769

Test Plan:
local build with `./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. mononoke`

github CI, done by regenerating the mononoke github actions with: `./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --free-up-disk --src-dir=. --output-dir=.github/workflows --job-name="Mononoke " --job-file-prefix=mononoke_ mononoke`

Before, broken

After, works

Reviewed By: mitrandir77

Differential Revision: D51209877

fbshipit-source-id: d5a3b7acb9ac17532625e9608c82148099890efb
2023-11-14 04:07:45 -08:00
Zhaolong Zhu
3143b7c1c0 oss: increase HOMEBREW_FAIL_LOG_LINES for macOS
Summary: have more context about the error for debugging

Reviewed By: quark-zju, sggutier

Differential Revision: D51282332

fbshipit-source-id: 7d6666ff16b3181f5a9c70303eca1fc6f6ddb631
2023-11-13 14:52:54 -08:00
Zhaolong Zhu
3cec5f2a5b gen_workflows: set openssl env variables for Windows
Summary:
This diff fixed the openssl compile errror by setting the env variables

```
error: failed to run custom build command for `openssl-sys v0.9.95`

Caused by:
  process didn't exit successfully: `D:\a\sapling\sapling\eden\scm\build\cargo-target\release\build\openssl-sys-dbaf6a9d88c8a4e6\build-script-main` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_DIR
  OPENSSL_DIR unset
  note: vcpkg did not find openssl: Could not look up details of packages in vcpkg tree could not read status file updates dir: The system cannot find the path specified. (os error 3)
```

Reviewed By: muirdm

Differential Revision: D51115009

fbshipit-source-id: d021991de1c80099a5f2ae12fe486ec49b7fb318
2023-11-08 18:25:08 -08:00
Saul Gutierrez
6d06c8f7db fix homebrew bottle generation (#767)
Summary:
[sl] fix homebrew bottle generation

Pull Request resolved: https://github.com/facebook/sapling/pull/767

Reviewed By: muirdm

Differential Revision: D51093087

Pulled By: sggutier

fbshipit-source-id: f0f46ebc7c3a3b838e54287f605c5c1148694ece
2023-11-08 15:55:24 -08:00
Zhaolong Zhu
bc8ac5e28e gen_workflows: make mac_release configurable
Reviewed By: sggutier

Differential Revision: D51074861

fbshipit-source-id: b5b44215aa532a1eb0e501ab6e88937298b51fda
2023-11-07 10:18:06 -08:00
Zhaolong Zhu
0d59f52338 oss: update bottle ext
Summary:
Fix the below build issue:

```
==> Determining sapling bottle rebuild...
==> Bottling sapling--0.2.20230523-092610-f12b7eee_2.monterey.bottle.2.tar.gz...
==> Detecting if sapling--0.2.20230523-092610-f12b7eee_2.monterey.bottle.2.tar.gz is relocatable...
./sapling--0.2.20230523-092610-f12b7eee_2.monterey.bottle.2.tar.gz
  bottle do
    rebuild 2
    sha256 cellar: :any, monterey: "e007e84389d502eb3908b8fdc8d1ac2508a3372f3d5b4f2b6834e502262bb921"
  end
0s

Run mv sapling*monterey.bottle.tar.gz sapling_0.2.20231106-160036+71778161.monterey.bottle.tar.gz
mv: rename sapling*monterey.bottle.tar.gz to sapling_0.2.20231106-160036+71778161.monterey.bottle.tar.gz: No such file or directory
Error: Process completed with exit code 1.
```

Reviewed By: sggutier

Differential Revision: D51058178

fbshipit-source-id: 6aa6a329f1a9a6390a13f7894e02c73c8a29eb31
2023-11-07 08:11:07 -08:00
Zhaolong Zhu
29d94c323f oss: remove prepare_environment build for macOS
Summary:
GitHub has arm64 host now, so we can get rid of the prepare environment step

https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/

thanks sggutier for sharing above info

Reviewed By: sggutier

Differential Revision: D51030032

fbshipit-source-id: 85e2009961a7a65d2c48d55954bee4217af05ee1
2023-11-07 08:11:07 -08:00
Alex Hornby
08d31e87b3 use system patchelf in eden fs build (#750)
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

Pull Request resolved: https://github.com/facebook/sapling/pull/750

Test Plan:
run locally with: `/build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --allow-system-packages --strip --src-dir=. eden _artifacts/linux  --project-install-prefix eden:/usr/local --final-install-prefix /usr/local`

Before, builds autoconf, automake, libtool, patchelf from source

After, uses the system installed version

regenerate actions with:`./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --no-tests --free-up-disk --os-type=linux --src-dir=. --output-dir=.github/workflows --job-name "EdenFS " --job-file-prefix=edenfs_ eden`

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/750).
* __->__ https://github.com/facebook/sapling/issues/750
* https://github.com/facebook/sapling/issues/749
* https://github.com/facebook/sapling/issues/748

Reviewed By: sggutier

Differential Revision: D50313417

Pulled By: genevievehelsel

fbshipit-source-id: 7c585357c848c15a65c5797d6c8750d1119b6efd
2023-10-16 12:10:14 -07:00
Alex Hornby
0a0b2e19ac fix CI warning about node12 by updating actions/checkout version (#749)
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

Pull Request resolved: https://github.com/facebook/sapling/pull/749

Test Plan:
regenerate actions with:
```
./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --no-tests --free-up-disk --os-type=linux --src-dir=. --output-dir=.github/workflows --job-name "EdenFS " --job-file-prefix=edenfs_ eden
```

Before, CI has warning:
```The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2```

After, warning is gone

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/749).
* https://github.com/facebook/sapling/issues/750
* __->__ https://github.com/facebook/sapling/issues/749
* https://github.com/facebook/sapling/issues/748

Reviewed By: sggutier

Differential Revision: D50313430

Pulled By: genevievehelsel

fbshipit-source-id: 4d55d36f7509be51bb4e26728ddbce8e45faba40
2023-10-16 12:10:14 -07:00
Alex Hornby
a304281786 github: migrate docker from deprecated nodesource script, fixes 60 second delay (#728)
Summary:
github: migrate docker from deprecated nodesource script, fixes 60 second delay

nodesource have added a 60 second delay in their setup_XX scripts to encourage people to move to reference their apt repo directly.

update the docker file, as I found the 60 second delay annoying when adding the gh cli to the image in the next change

Pull Request resolved: https://github.com/facebook/sapling/pull/728

Test Plan:
Run a build
```
docker build -t sapling-cli-ubuntu-22.04 -f .github/workflows/sapling-cli-ubuntu-22.04.Dockerfile .
```

Before,  get the 60 second wait message from the nodesource script
```
--> 657ed25e358a
STEP 6/17: RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -

================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================

                           SCRIPT DEPRECATION WARNING

  This script, located at https://deb.nodesource.com/setup_X, used to
  install Node.js is deprecated now and will eventually be made inactive.

  Please visit the NodeSource distributions Github and follow the
  instructions to migrate your repo.
  https://github.com/nodesource/distributions

  The NodeSource Node.js Linux distributions GitHub repository contains
  information about which versions of Node.js and which Linux distributions
  are supported and how to install it.
  https://github.com/nodesource/distributions

                          SCRIPT DEPRECATION WARNING

================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================

TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...
```

After, the 60 second wait has gone

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/728).
* https://github.com/facebook/sapling/issues/729
* __->__ https://github.com/facebook/sapling/issues/728

Reviewed By: sggutier

Differential Revision: D50088155

Pulled By: genevievehelsel

fbshipit-source-id: 2bf1d9c842eeebf579588f0d67623aa39ea5c881
2023-10-09 12:12:20 -07:00
Alex Hornby
ceccbc1682 fix getdeps actions generation for rust toolchain (#682)
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

Pull Request resolved: https://github.com/facebook/sapling/pull/682

Test Plan:
To test we add the missing undeclared rust-shed dependency to the eden manifest and regenerate.

Generate updated actions yaml with:
```
./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --no-tests --free-up-disk --os-type=linux --src-dir=. --output-dir=.github/workflows --job-name "EdenFS " --job-file-prefix=edenfs_ eden
```

Before, was missing the rust toolchain in the auto regenerated eden actions file.  After, toolchain is present

Before, was missing the --no-tests in the "Build eden" step of the  auto-regenerated eden actions file.  After, has it

Eden stil needs some other fixes to build, which follow in this stqck

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/682).
* https://github.com/facebook/sapling/issues/693
* https://github.com/facebook/sapling/issues/696
* https://github.com/facebook/sapling/issues/692
* https://github.com/facebook/sapling/issues/691
* __->__ https://github.com/facebook/sapling/issues/682
* https://github.com/facebook/sapling/issues/689
* https://github.com/facebook/sapling/issues/697
* https://github.com/facebook/sapling/issues/706
* https://github.com/facebook/sapling/issues/730

Reviewed By: sggutier

Differential Revision: D49875258

Pulled By: genevievehelsel

fbshipit-source-id: 173f86083ba92bab4063813d3e392df428b9ffe4
2023-10-06 21:20:06 -07:00
Alex Hornby
616e2eb859 allow getdeps github actions to free up disk (#689)
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

Pull Request resolved: https://github.com/facebook/sapling/pull/689

Test Plan:
Regenerate and run CI for mononoke.   Mononoke Mac should continue to work Mononoke Linux should go from broken to working
```
./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --free-up-disk --src-dir=.  --output-dir=.github/workflows --job-name="Mononoke " --job-file-prefix=mononoke_ mononoke
```

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/689).
* https://github.com/facebook/sapling/issues/693
* https://github.com/facebook/sapling/issues/696
* https://github.com/facebook/sapling/issues/692
* https://github.com/facebook/sapling/issues/691
* https://github.com/facebook/sapling/issues/682
* __->__ https://github.com/facebook/sapling/issues/689
* https://github.com/facebook/sapling/issues/697
* https://github.com/facebook/sapling/issues/706
* https://github.com/facebook/sapling/issues/730

Reviewed By: sggutier

Differential Revision: D49875256

Pulled By: genevievehelsel

fbshipit-source-id: b85b6b2f11857670915b64f47d3c0abd4ca8ca31
2023-10-06 21:20:06 -07:00
Alex Hornby
0db20e2b24 reviewstack: fix verify addons/ folder github ci (#730)
Summary:
reviewstack: fix verify addons/ folder github ci

analytics.test.ts was trying to call the real gh cli rather than a mock, which was causing errors when gh not installed, and process and handle leaks when gh was installed. Fixed bu using mock execa as we don't need real gh to test the analytics tracking

Jest was also reporting leaks of timeouts after above fix, so added dispose() to debounce.ts and call dispose() from githubCodeReviewProvider

Found shared/ depends on reviewstack generated textmate grammars, so can't run concurrently without flakiness (fails with missing import).  Fixed test ordering in verify-addons-folder.py

Tests also log about missing watchman which triggers a failure due to logs after test exit, even if watchman disabled. Install fb-watchman to silence it

Tes plan:

Before, ./verify-addons-folder.py tests broken in CI with:
```
Error: Unhandled error. (Error: GhNotInstalledError: Error: Command failed with ENOENT: gh api graphql -f searchQuery=repo:facebook/sapling is:pr author:me -F numToFetch=100 --hostname github.com -f query=
    query YourPullRequestsQuery($searchQuery: String!, $numToFetch: Int!) {
  search(query: $searchQuery, type: ISSUE, first: $numToFetch) {
    nodes {
      ... on PullRequest {
```
```

After, works

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/730).
* https://github.com/facebook/sapling/issues/693
* https://github.com/facebook/sapling/issues/696
* https://github.com/facebook/sapling/issues/692
* https://github.com/facebook/sapling/issues/691
* https://github.com/facebook/sapling/issues/682
* https://github.com/facebook/sapling/issues/689
* https://github.com/facebook/sapling/issues/697
* https://github.com/facebook/sapling/issues/706
* __->__ https://github.com/facebook/sapling/issues/730

Pull Request resolved: https://github.com/facebook/sapling/pull/730

Reviewed By: evangrayk

Differential Revision: D49875301

Pulled By: genevievehelsel

fbshipit-source-id: 2e322467200189781b881decc3a3af5647605cc6
2023-10-05 09:34:39 -07:00
David Tolnay
60bfd45db0 Eliminate dependency on unmaintained node12-based action
Reviewed By: diliop

Differential Revision: D47220090

fbshipit-source-id: 0b69dcce8115db028d194746fb1fc4fa2d283ad4
2023-07-05 08:38:06 -07:00
Alex Hornby
33e618089b suppress failing sapling website steps on fork (#658)
Summary:
[github] suppress failing sapling website steps on fork

Clean up sapling PRs form forks slightly by removing always failing job

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/658).
* https://github.com/facebook/sapling/issues/657
* https://github.com/facebook/sapling/issues/656
* __->__ https://github.com/facebook/sapling/issues/658

Pull Request resolved: https://github.com/facebook/sapling/pull/658

Reviewed By: muirdm

Differential Revision: D47035733

Pulled By: sggutier

fbshipit-source-id: 62392b6ab16cf02a25814bd01b2b9b6a62600363
2023-06-26 20:53:51 -07:00
Saul Gutierrez
45c3d60b0f bump macOS python CI to 3.11.3 (#605)
Summary:
[sl] bump macOS python CI to 3.11.3

We still depend on pointing to the specific Python combination that GitHub CI and Homebrew have, which currently is 3.11.3.

Hashes were taken from d39875e212/Formula/python@3.11.rb

Pull Request resolved: https://github.com/facebook/sapling/pull/605

Test Plan:
Downloaded bottles from:

https://github.com/sggutier/sapling/actions/runs/4727040284
https://github.com/sggutier/sapling/actions/runs/4727040323

and installed the arm64 version. Also, verified that the dumps from `otool -L` looked correct (they usually don't when there is some when building)

Dump from arm64 version:

```
$ otool -L sapling\ 8/0.2.20230417-165855+6db1e950/bin/sl && file sapling\ 8/0.2.20230417-165855+6db1e950/bin/sl
sapling 8/0.2.20230417-165855+6db1e950/bin/sl:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60158.100.133)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
        @HOMEBREW_PREFIX@@/opt/openssl@1.1/lib/libssl.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
        @HOMEBREW_PREFIX@@/opt/openssl@1.1/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
        /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.100.19)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        @HOMEBREW_PREFIX@@/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/Python (compatibility version 3.11.0, current version 3.11.0)
sapling 8/0.2.20230417-165855+6db1e950/bin/sl: Mach-O 64-bit executable arm64
```

Dump from x86 version:

```
$ otool -L sapling\ 9/0.2.20230417-165855+6db1e950/bin/sl && file sapling\ 9/0.2.20230417-165855+6db1e950/bin/sl
sapling 9/0.2.20230417-165855+6db1e950/bin/sl:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60158.100.133)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
        @HOMEBREW_PREFIX@@/opt/openssl@1.1/lib/libssl.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
        @HOMEBREW_PREFIX@@/opt/openssl@1.1/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
        /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.100.19)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        @HOMEBREW_PREFIX@@/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/Python (compatibility version 3.11.0, current version 3.11.0)
sapling 9/0.2.20230417-165855+6db1e950/bin/sl: Mach-O 64-bit executable x86_64
```

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/605).
* https://github.com/facebook/sapling/issues/606
* __->__ https://github.com/facebook/sapling/issues/605

Reviewed By: zzl0

Differential Revision: D45072742

Pulled By: sggutier

fbshipit-source-id: 4ced2d609d9cf4098cd4bbea5d5df45659588ad8
2023-04-18 10:12:23 -07:00
Jun Wu
5c35627f5f github: show more logs on brew build failure
Summary:
By default, brew only shows the last 15 lines of the build log, which is often
not helpful. Make it show more logs for easier investigation.

Reviewed By: sggutier

Differential Revision: D44692285

fbshipit-source-id: d9a7b2915766095240f3fff08c953b0dc449130e
2023-04-13 11:35:35 -07:00
Jun Wu
98d1034be9 github: unquote "on" in workflow yaml
Summary: There is no need to quote the "on" word in YAML.

Reviewed By: sggutier

Differential Revision: D44692286

fbshipit-source-id: acf8c636acd411ed1e3713543a95617bcfa49832
2023-04-13 11:35:35 -07:00
Saul Gutierrez
9440b05e08 ci: downgrade openssl from 1.1.1t to 1.1.1s
Summary:
After upgrading openssl along with Python in D43640261 (b671ca71f4), I broke the build since it doesn't match the openssl version that GitHub actions has.

This commit downgrades the version for fixing the build

Reviewed By: zzl0

Differential Revision: D43675103

fbshipit-source-id: 11754aab77a086770b3c6a20fd5b09203a4515cb
2023-02-28 14:40:02 -08:00
Saul Gutierrez
b671ca71f4 ci: bump homebrew release dependencies (#540)
Summary:
In order to create a new release we need to make the specific Python version (e.g., 3.11.1) match with whatever GitHub actions has. This is necessary it's not seemingly possible to downgrade the Python version used in GitHub actions.

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/540).
* __->__ https://github.com/facebook/sapling/issues/540

Pull Request resolved: https://github.com/facebook/sapling/pull/540

Test Plan:
Tested that the "Prepare build environment" step completed successfully.

Before:
https://github.com/sggutier/sapling/actions/runs/4287166710/jobs/7467689953

After:
https://github.com/sggutier/sapling/actions/runs/4287626954/jobs/7468705930

Reviewed By: evangrayk

Differential Revision: D43640261

Pulled By: sggutier

fbshipit-source-id: 0e50d8171c261ea5a6691ca52f012780a67ae88a
2023-02-27 17:28:12 -08:00
Mark Shroyer
bb2a928f48 Update github workflow for parser->loader rename
Summary:
The crate was renamed in D42018937 (853cd5a192), so the workflow is failing:

https://github.com/facebook/sapling/actions/workflows/edenscm-libs.yml

Reviewed By: quark-zju

Differential Revision: D43544211

fbshipit-source-id: a1f6c06dc0b8c4463460afea22737c93c609bc95
2023-02-23 12:53:50 -08:00
Saul Gutierrez
f8cd450ac1 ci: fix Windows OS CI due to path length (#500)
Summary:
[sl] ci: fix Windows OS CI due to path length

Currently our OSS CI on Windows is failing due to some paths being too long (e.g., `C:/Users/runneradmin/.cargo/git/checkouts/fbthrift-abf000ee5c7fcc50/c757ec4/thrift/website/src/json/ref/cpp/f/struct/special/structapache_1_1thrift_1_1op_1_1detail_1_1AnyOp_3_01type_1_1cpp__type_3_01T_00_01type_1_1map_3_01KTag_00_01VTag_01_4_01_4_01_4/assign.json`)

Since the length of that path is just above the Windows max length (263 vs. 260). This diff tries to alleviate that by setting the `core.longpaths` option for the git system config.

Pull Request resolved: https://github.com/facebook/sapling/pull/500

Test Plan:
Ran GitHub actions on a personal fork of the repo.

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/500).
* __->__ https://github.com/facebook/sapling/issues/500

Reviewed By: bolinfest

Differential Revision: D42727420

Pulled By: sggutier

fbshipit-source-id: 3cf908f8e9537f20d796dcaa97292512f1172919
2023-01-24 18:07:50 -08:00
Saul Gutierrez
352feeef11 ci: bump python3.11.0 to python3.11.1 (#496)
Summary:
[sl] ci: bump python3.11.0 to python3.11.1

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/496).
* __->__ https://github.com/facebook/sapling/issues/496

Pull Request resolved: https://github.com/facebook/sapling/pull/496

Reviewed By: zzl0

Differential Revision: D42719323

Pulled By: sggutier

fbshipit-source-id: e71d0ec4b9ccdc206bd7d844176a7896d5a3d97f
2023-01-24 12:45:16 -08:00
Saul Gutierrez
a443a6cfef bump Python in Github macOS actions to 3.11 (#319)
Summary:
The latest Homebrew bottles for Apple Sillicon macOS built by our Github Actions were broken, as mentioned in https://github.com/facebook/sapling/issues/315 . This was caused due to updating the Formula template used by our Github actions to 3.11 but not updating the Github actions themselves to Python 3.11. This commit fixes that last part.

Pull Request resolved: https://github.com/facebook/sapling/pull/319

Test Plan:
Triggered a [build on a fork of the sapling repo](https://github.com/sggutier/sapling/releases/tag/0.1.20221211-120017-rcd410769), downloaded the bottle built by it, and checked that it ran properly on my M1 mac:

```
$ sl --version
Sapling 0.1.20221211-120017-rcd410769

$ file $(which sl)
/Users/sggutier/homebrew/bin/sl: Mach-O 64-bit executable arm64

$ otool -L $(which sl)
/Users/sggutier/homebrew/bin/sl:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60158.100.133)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
        /Users/sggutier/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
        /Users/sggutier/homebrew/opt/openssl@1.1/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
        /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.100.19)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1141.1.0)
        /Users/sggutier/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/Python (compatibility version 3.11.0, current version 3.11.0)
        /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)

$ sl dbsh -c "import sys; print(sys.version)"
3.11.0 (main, Nov 28 2022, 13:49:33) [Clang 14.0.0 (clang-1400.0.29.202)]

$ sl clone https://github.com/sggutier/sapling/ saplingtest && cd saplingtest && sl
remote: Enumerating objects: 677771, done.
remote: Counting objects: 100% (2847/2847), done.
remote: Compressing objects: 100% (1469/1469), done.
remote: Total 677771 (delta 1396), reused 2692 (delta 1261), pack-reused 674924
Receiving objects: 100% (677771/677771), 175.60 MiB | 2.59 MiB/s, done.
Resolving deltas: 100% (454743/454743), done.
From https://github.com/sggutier/sapling
 * [new ref]               2857ac6b96 -> remote/main
6535 files updated, 0 files merged, 0 files removed, 0 files unresolved
@  2857ac6b9  Today at 11:33  mbolin  https://github.com/facebook/sapling/issues/317  remote/main
│  Add build instructions for Windows (https://github.com/facebook/sapling/issues/317)
~

$ touch something && sl st
warning: watchman has recently started (pid 1093) - operation will be slower than usual
? something

$ cd eden/scm && sl root
/Users/sggutier/saplingtest
```

Reviewed By: bolinfest

Differential Revision: D41921132

Pulled By: sggutier

fbshipit-source-id: 0ed4f2d6f214f02669e45c9c4b8cced7de9caa2e
2022-12-12 12:52:55 -08:00
Chad Austin
78d557ef89 update all github actions
Summary:
After renaming the eden_scm manifest to sapling, update github actions
for all projects.

Reviewed By: vitaut

Differential Revision: D41388647

fbshipit-source-id: e3f1b70b7d848241111d3776a7cfb11540490a30
2022-11-28 13:52:54 -08:00
Chad Austin
73302ef03f delete eden_scm getdeps jobs on github actions
Summary:
Now that Sapling has its own build process, it no longer needs getdeps
builds on GitHub Actions. Remove those workflows.

Reviewed By: muirdm

Differential Revision: D41448790

fbshipit-source-id: 258db7cfcec60ede5ea553ffa700c0ecea224043
2022-11-28 13:52:54 -08:00
Saul Gutierrez
cfbb68aa62 ci: change versioning scheme (#208)
Summary:
Stack created with [Sapling]
* __->__ https://github.com/facebook/sapling/issues/208

[sl] ci: change versioning scheme

This changes our versioning scheme to `VERSION-%Y%m%d-%H%M%S-HASH`, where `VERSION` is defined in the VERSION file, `%Y%m%d-%H%M%S` is the current date, hour, minutes, and seconds, and `HASH` is the hash of the current commit.

Pull Request resolved: https://github.com/facebook/sapling/pull/208

Test Plan: Tested on my personal account

Reviewed By: bolinfest

Differential Revision: D41418387

Pulled By: sggutier

fbshipit-source-id: f89bce7cc842c6ca77c3a8330565fa19d41e39cc
2022-11-18 21:09:29 -08:00
Michael Bolin
74c096419f remove contents:write since facebook/sapling does not seem to like that
Summary:
The existing definition of this Action resulted in some sort of permissions error:

https://github.com/facebook/sapling/actions/runs/3500331967/jobs/5862928749

even though it worked fine on my fork, as you can see in D41393330 (9fc3874a2c).

I suspect it has to do with this permissions thing that I likely copypasta'd from somewhere:

https://www.internalfb.com/code/fbsource/[b77dde2f4691]/fbcode/eden/oss/.github/workflows/reviewstack.dev-deploy.yml?lines=12-13

This diff removes that and adds the `Grant Access` step we have in most
of our workflows.

Reviewed By: evangrayk

Differential Revision: D41418865

fbshipit-source-id: 3d54da1fa57471444e6cd12077da3b79dd94f094
2022-11-18 16:56:07 -08:00
Michael Bolin
9fc3874a2c use peaceiris/actions-gh-pages@v3 to publish reviewstack.dev
Summary:
To date, I have been deploying https://reviewstack.dev manually,
so it is finally time to use a GitHub Action instead.
For now, it is configured with `workflow_dispatch`, so we do
have to push a button to trigger a build. We can consider a weekly
release cadence or somesuch going forward.

Reviewed By: evangrayk

Differential Revision: D41393330

fbshipit-source-id: 61aeb99299a9c3bf25f94b02bf7d164d021c73a4
2022-11-18 12:51:38 -08:00
Jun Wu
52f8d18655 github: update cargo test path for configparser
Summary:
configparser was moved to config/parser. Update the GitHub workflow to use its
new location.

Reviewed By: mitrandir77

Differential Revision: D41331854

fbshipit-source-id: aaedc1213ecbe3351b9a388586eab011d1e4c088
2022-11-16 08:45:05 -08:00
Facebook Community Bot
5076656c62 Re-sync with internal repository 2022-11-15 00:48:09 -08:00
Chad Austin
673b8f3db4 regenerate GitHub actions for all projects (#138)
Summary:
X-link: https://github.com/facebook/openr/pull/138

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

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

After D38831140 (6ffa1415c9), `bison` no longer needs to be fetched by most
projects.

Reviewed By: vitaut

Differential Revision: D38877152

fbshipit-source-id: 3b05f6c117918452373d430121dca461595663f3
2022-08-22 10:05:10 -07:00
Zeyi (Rice) Fan
6173e53bdd disable autocrlf on Windows jobs
Summary:
In D36905191 (3dae3f1037), 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
Victor Zverovich
44c64ea337 Don't install an unused flex dependency
Summary: AFAICS flex is no longer used (see D36023574 (8667be78f0)) after dependency on it was removed from Thrift. Remove it from CI configs.

Reviewed By: Mizuchi

Differential Revision: D36112861

fbshipit-source-id: 7405d7dcab0576889a0dd6ec3152ab9c61a27319
2022-05-03 18:33:34 -07:00
Alex Hornby
5b63fe397b 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:23:01 -08:00
Alex Hornby
fcc2d33faa 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 05:04:46 -08:00
Alex Hornby
96bef26081 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:53 -08:00