Skip to content

Commit 185bbe6

Browse files
wonglkdfacebook-github-bot
authored andcommitted
Fix Debian GitHub build & zstd CMake error (#200)
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
1 parent 7785d24 commit 185bbe6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/build-cachelib-debian-10.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
g++ - || true
5353
- name: "checkout sources"
5454
uses: actions/checkout@v2
55+
- name: "Add Git safe directory"
56+
# Workaround for Docker image bug (GitHub issue #199).
57+
run: git config --system --add safe.directory $GITHUB_WORKSPACE
5558
- name: "Install Prerequisites"
5659
run: ./contrib/build.sh -S -B
5760
- name: "Test: update-submodules"

contrib/build-package.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,12 @@ test "$#" -eq 0 \
102102
&& die "missing dependancy name to build. See -h for help"
103103

104104
######################################
105-
## Check which dependecy was requested
105+
## Check which dependency was requested
106106
######################################
107107

108108
external_git_clone=
109109
external_git_branch=
110+
# external_git_tag can also be used for commit hashes
110111
external_git_tag=
111112
update_submodules=
112113
cmake_custom_params=
@@ -175,7 +176,10 @@ case "$1" in
175176
REPODIR=cachelib/external/$NAME
176177
SRCDIR=$REPODIR/build/cmake
177178
external_git_clone=yes
178-
external_git_branch=release
179+
# Previously, we pinned to release branch. v1.5.4 needed
180+
# CMake >= 3.18, later reverted. While waiting for v1.5.5,
181+
# pin to the fix: https://github.com/facebook/zstd/pull/3510
182+
external_git_tag=8420502e
179183
if test "$build_tests" = "yes" ; then
180184
cmake_custom_params="-DZSTD_BUILD_TESTS=ON"
181185
else

0 commit comments

Comments
 (0)