Skip to content

Commit

Permalink
getdeps: add xxhash ubuntu and homebrew packages, fix actions generat…
Browse files Browse the repository at this point in the history
…ion and regenerate

Summary:
X-link: facebookincubator/zstrong#1010

EdenFS build on github CI was failing with missing xxhash include: https://github.com/facebook/sapling/actions/runs/11311478649/job/31457761727#step:108:3838

Add package mappings to the xxhash manifest

When I went to regenerate the github actions found I'd previously introduced a bug in the actions generation with a mis-merged run_tests check.  Fix it and regenerate

X-link: facebook/sapling#966

Reviewed By: genevievehelsel

Differential Revision: D64302134

Pulled By: ahornby

fbshipit-source-id: 3384dab4f31e202881310e2b5369bb23fb533a1b
  • Loading branch information
ahornby authored and facebook-github-bot committed Oct 14, 2024
1 parent 6969b58 commit 30e2823
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/getdeps_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fmt
- name: Fetch googletest
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests googletest
- name: Fetch xxhash
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests xxhash
- name: Fetch zstd
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zstd
- name: Fetch double-conversion
Expand Down Expand Up @@ -98,6 +100,8 @@ jobs:
run: python3 build/fbcode_builder/getdeps.py build --no-tests fmt
- name: Build googletest
run: python3 build/fbcode_builder/getdeps.py build --no-tests googletest
- name: Build xxhash
run: python3 build/fbcode_builder/getdeps.py build --no-tests xxhash
- name: Build zstd
run: python3 build/fbcode_builder/getdeps.py build --no-tests zstd
- name: Build double-conversion
Expand Down
18 changes: 14 additions & 4 deletions build/fbcode_builder/getdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,10 @@ def get_run_on(self, args):
def write_job_for_platform(self, platform, args): # noqa: C901
build_opts = setup_build_options(args, platform)
ctx_gen = build_opts.get_context_generator()
if args.enable_tests:
ctx_gen.set_value_for_project(args.project, "test", "on")
else:
ctx_gen.set_value_for_project(args.project, "test", "off")
loader = ManifestLoader(build_opts, ctx_gen)
self.process_project_dir_arguments(args, loader)
manifest = loader.load_manifest(args.project)
Expand Down Expand Up @@ -1081,7 +1085,10 @@ def write_job_for_platform(self, platform, args): # noqa: C901
free_up_disk = ""

allow_sys_arg = ""
if run_tests:
if (
build_opts.allow_system_packages
and build_opts.host_type.get_package_manager()
):
sudo_arg = "sudo "
allow_sys_arg = " --allow-system-packages"
if build_opts.host_type.get_package_manager() == "deb":
Expand All @@ -1092,13 +1099,16 @@ def write_job_for_platform(self, platform, args): # noqa: C901
if build_opts.is_darwin():
# brew is installed as regular user
sudo_arg = ""
tests_arg = "--no-tests "
if run_tests:
tests_arg = ""
out.write(
f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive {manifest.name}\n"
f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps {tests_arg}--recursive {manifest.name}\n"
)
if build_opts.is_linux() or build_opts.is_freebsd():
out.write(" - name: Install packaging system deps\n")
out.write(
f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive patchelf\n"
f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps {tests_arg}--recursive patchelf\n"
)
required_locales = manifest.get(
"github.actions", "required_locales", ctx=manifest_ctx
Expand Down Expand Up @@ -1176,7 +1186,7 @@ def write_job_for_platform(self, platform, args): # noqa: C901
no_deps_arg = "--no-deps "

no_tests_arg = ""
if not args.enable_tests:
if not run_tests:
no_tests_arg = "--no-tests "

out.write(
Expand Down
7 changes: 7 additions & 0 deletions build/fbcode_builder/manifests/xxhash
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ sha256 = baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4
[rpms]
xxhash-devel

[debs]
libxxhash-dev
xxhash

[homebrew]
xxhash

[build.not(os=windows)]
builder = make
subdir = xxHash-0.8.2
Expand Down

0 comments on commit 30e2823

Please sign in to comment.