Skip to content

Commit

Permalink
Speed up packing time
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Sep 17, 2024
1 parent 7357229 commit d018260
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@ build-%:

.NOTPARALLEL: binaries/proxysql%
binaries/proxysql%:
cd deps && ${MAKE} cleanall
cd lib && ${MAKE} clean
cd src && ${MAKE} clean
cd test/tap && ${MAKE} clean
cd test/deps && ${MAKE} cleanall
find . -not -path "./binaries/*" -not -path "./.git/*" -exec touch -h --date=@`git show -s --format=%ct HEAD` {} \;
@docker compose -p proxysql down -v --remove-orphans
@docker compose -p proxysql up $(IMG_NAME)$(IMG_TYPE)$(IMG_COMP)_build
@docker compose -p proxysql down -v --remove-orphans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ echo "==> Building"
git config --system --add safe.directory '/opt/proxysql'
cd /opt/proxysql
echo "==> ProxySQL '$(git describe --long --abbrev=7)'"
export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \;
#export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
#echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
#find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \;

if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then
deps_target="build_deps"
Expand All @@ -36,7 +36,7 @@ else
deps_target="build_deps_$PROXYSQL_BUILD_TYPE"
build_target="$PROXYSQL_BUILD_TYPE"
fi
${MAKE} cleanbuild
#${MAKE} cleanbuild
${MAKE} ${MAKEOPT} "${deps_target}"

if [[ -z ${build_target} ]] ; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ echo "==> Building"
git config --system --add safe.directory '/opt/proxysql'
cd /opt/proxysql
echo "==> ProxySQL '$(git describe --long --abbrev=7)'"
export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \;
#export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
#echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
#find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \;

if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then
deps_target="build_deps"
Expand All @@ -36,7 +36,7 @@ else
deps_target="build_deps_$PROXYSQL_BUILD_TYPE"
build_target="$PROXYSQL_BUILD_TYPE"
fi
${MAKE} cleanbuild
#${MAKE} cleanbuild
${MAKE} ${MAKEOPT} "${deps_target}"

if [[ -z ${build_target} ]] ; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ echo "==> Building"
git config --system --add safe.directory '/opt/proxysql'
cd /opt/proxysql
echo "==> ProxySQL '$(git describe --long --abbrev=7)'"
export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \;
#export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
#echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
#find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \;

if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then
deps_target="build_deps"
Expand All @@ -36,7 +36,7 @@ else
deps_target="build_deps_$PROXYSQL_BUILD_TYPE"
build_target="$PROXYSQL_BUILD_TYPE"
fi
${MAKE} cleanbuild
#${MAKE} cleanbuild
${MAKE} ${MAKEOPT} "${deps_target}"

if [[ -z ${build_target} ]] ; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ echo "==> Building"
git config --system --add safe.directory '/opt/proxysql'
cd /opt/proxysql
echo "==> ProxySQL '$(git describe --long --abbrev=7)'"
export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \;
#export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
#echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
#find /opt/proxysql -not -path "/opt/proxysql/binaries/*" -exec touch -h --date=@${SOURCE_DATE_EPOCH} {} \;

if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then
deps_target="build_deps"
Expand All @@ -36,7 +36,7 @@ else
deps_target="build_deps_$PROXYSQL_BUILD_TYPE"
build_target="$PROXYSQL_BUILD_TYPE"
fi
${MAKE} cleanbuild
#${MAKE} cleanbuild
${MAKE} ${MAKEOPT} "${deps_target}"

if [[ -z ${build_target} ]] ; then
Expand Down
3 changes: 3 additions & 0 deletions test/tap/tap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,6 @@ clean:
find . -name '*.o' -delete || true
find . -name '*.so' -delete || true
find . -name '*.so.*' -delete || true
cd cpp-dotenv/static && rm -rf cpp-dotenv-*/ || true
cd cpp-dotenv/dynamic && rm -rf cpp-dotenv-*/ || true

0 comments on commit d018260

Please sign in to comment.