Skip to content

Commit

Permalink
Fix Debian GitHub build & zstd CMake error (#200)
Browse files Browse the repository at this point in the history
Summary:
1. Workaround for Debian Docker image bug that is breaking Debian build on GitHub (Explicitly mark Git repo as safe).
2. Pin zstd to a commit that resolves problems with older CMakes (note: affects all OSes, not just Debian)

Context for 1: In latest Debian Docker image , there is a regression that affects the checkout action.

From actions/checkout#1169:
> - Checkout runs, and runs /usr/bin/git config --global --add safe.directory <path>
> - The global .gitconfig does not exist
> - Any calls to git remain unsafe/dubious

The suggested workaround was to use --system instead of --global.

Pull Request resolved: #200

Test Plan: See if GitHub Action Debian build is fixed.

Reviewed By: therealgymmy

Differential Revision: D43720363

Pulled By: jaesoo-fb

fbshipit-source-id: 54f3586cc7f8e72045e60d8dd454c7a77725e6b2
  • Loading branch information
wonglkd authored and facebook-github-bot committed Mar 2, 2023
1 parent 7785d24 commit 185bbe6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-cachelib-debian-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
g++ - || true
- name: "checkout sources"
uses: actions/checkout@v2
- name: "Add Git safe directory"
# Workaround for Docker image bug (GitHub issue #199).
run: git config --system --add safe.directory $GITHUB_WORKSPACE
- name: "Install Prerequisites"
run: ./contrib/build.sh -S -B
- name: "Test: update-submodules"
Expand Down
8 changes: 6 additions & 2 deletions contrib/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ test "$#" -eq 0 \
&& die "missing dependancy name to build. See -h for help"

######################################
## Check which dependecy was requested
## Check which dependency was requested
######################################

external_git_clone=
external_git_branch=
# external_git_tag can also be used for commit hashes
external_git_tag=
update_submodules=
cmake_custom_params=
Expand Down Expand Up @@ -175,7 +176,10 @@ case "$1" in
REPODIR=cachelib/external/$NAME
SRCDIR=$REPODIR/build/cmake
external_git_clone=yes
external_git_branch=release
# Previously, we pinned to release branch. v1.5.4 needed
# CMake >= 3.18, later reverted. While waiting for v1.5.5,
# pin to the fix: https://github.com/facebook/zstd/pull/3510
external_git_tag=8420502e
if test "$build_tests" = "yes" ; then
cmake_custom_params="-DZSTD_BUILD_TESTS=ON"
else
Expand Down

0 comments on commit 185bbe6

Please sign in to comment.