Reduce the need to re-download dependencies (#6318)
Summary: Both changes are related to RocksJava: 1. Allow dependencies that are already present on the host system due to Maven to be reused in Docker builds. 2. Extend the `make clean-not-downloaded` target to RocksJava, so that libraries needed as dependencies for the test suite are not deleted and re-downloaded unnecessarily. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6318 Differential Revision: D19608742 Pulled By: pdillinger fbshipit-source-id: 25e25649e3e3212b537ac4512b40e2e53dc02ae7
This commit is contained in:
parent
8f2bee6747
commit
a07a9dc904
27
Makefile
27
Makefile
@ -1128,16 +1128,21 @@ unity_test: db/db_test.o db/db_test_util.o $(TESTHARNESS) $(TOOLLIBOBJECTS) unit
|
|||||||
rocksdb.h rocksdb.cc: build_tools/amalgamate.py Makefile $(LIB_SOURCES) unity.cc
|
rocksdb.h rocksdb.cc: build_tools/amalgamate.py Makefile $(LIB_SOURCES) unity.cc
|
||||||
build_tools/amalgamate.py -I. -i./include unity.cc -x include/rocksdb/c.h -H rocksdb.h -o rocksdb.cc
|
build_tools/amalgamate.py -I. -i./include unity.cc -x include/rocksdb/c.h -H rocksdb.h -o rocksdb.cc
|
||||||
|
|
||||||
clean: clean-ext-libraries-all clean-rocks
|
clean: clean-ext-libraries-all clean-rocks clean-rocksjava
|
||||||
|
|
||||||
clean-not-downloaded: clean-ext-libraries-bin clean-rocks
|
clean-not-downloaded: clean-ext-libraries-bin clean-rocks clean-not-downloaded-rocksjava
|
||||||
|
|
||||||
clean-rocks:
|
clean-rocks:
|
||||||
rm -f $(BENCHMARKS) $(TOOLS) $(TESTS) $(PARALLEL_TEST) $(LIBRARY) $(SHARED)
|
rm -f $(BENCHMARKS) $(TOOLS) $(TESTS) $(PARALLEL_TEST) $(LIBRARY) $(SHARED)
|
||||||
rm -rf $(CLEAN_FILES) ios-x86 ios-arm scan_build_report
|
rm -rf $(CLEAN_FILES) ios-x86 ios-arm scan_build_report
|
||||||
$(FIND) . -name "*.[oda]" -exec rm -f {} \;
|
$(FIND) . -name "*.[oda]" -exec rm -f {} \;
|
||||||
$(FIND) . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm {} \;
|
$(FIND) . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm {} \;
|
||||||
cd java; $(MAKE) clean
|
|
||||||
|
clean-rocksjava:
|
||||||
|
cd java && $(MAKE) clean
|
||||||
|
|
||||||
|
clean-not-downloaded-rocksjava:
|
||||||
|
cd java && $(MAKE) clean-not-downloaded
|
||||||
|
|
||||||
clean-ext-libraries-all:
|
clean-ext-libraries-all:
|
||||||
rm -rf bzip2* snappy* zlib* lz4* zstd*
|
rm -rf bzip2* snappy* zlib* lz4* zstd*
|
||||||
@ -1961,35 +1966,35 @@ rocksdbjavastaticreleasedocker: rocksdbjavastatic rocksdbjavastaticdockerx86 roc
|
|||||||
|
|
||||||
rocksdbjavastaticdockerx86:
|
rocksdbjavastaticdockerx86:
|
||||||
mkdir -p java/target
|
mkdir -p java/target
|
||||||
docker run --rm --name rocksdb_linux_x86-be --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:centos6_x86-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
docker run --rm --name rocksdb_linux_x86-be --attach stdin --attach stdout --attach stderr --volume $(HOME)/.m2:/root/.m2:ro --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:centos6_x86-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
||||||
|
|
||||||
rocksdbjavastaticdockerx86_64:
|
rocksdbjavastaticdockerx86_64:
|
||||||
mkdir -p java/target
|
mkdir -p java/target
|
||||||
docker run --rm --name rocksdb_linux_x64-be --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:centos6_x64-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
docker run --rm --name rocksdb_linux_x64-be --attach stdin --attach stdout --attach stderr --volume $(HOME)/.m2:/root/.m2:ro --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:centos6_x64-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
||||||
|
|
||||||
rocksdbjavastaticdockerppc64le:
|
rocksdbjavastaticdockerppc64le:
|
||||||
mkdir -p java/target
|
mkdir -p java/target
|
||||||
docker run --rm --name rocksdb_linux_ppc64le-be --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:centos7_ppc64le-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
docker run --rm --name rocksdb_linux_ppc64le-be --attach stdin --attach stdout --attach stderr --volume $(HOME)/.m2:/root/.m2:ro --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:centos7_ppc64le-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
||||||
|
|
||||||
rocksdbjavastaticdockerarm64v8:
|
rocksdbjavastaticdockerarm64v8:
|
||||||
mkdir -p java/target
|
mkdir -p java/target
|
||||||
docker run --rm --name rocksdb_linux_arm64v8-be --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:centos7_arm64v8-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
docker run --rm --name rocksdb_linux_arm64v8-be --attach stdin --attach stdout --attach stderr --volume $(HOME)/.m2:/root/.m2:ro --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:centos7_arm64v8-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
||||||
|
|
||||||
rocksdbjavastaticdockerx86musl:
|
rocksdbjavastaticdockerx86musl:
|
||||||
mkdir -p java/target
|
mkdir -p java/target
|
||||||
docker run --rm --name rocksdb_linux_x86-musl-be --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:alpine3_x86-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
docker run --rm --name rocksdb_linux_x86-musl-be --attach stdin --attach stdout --attach stderr --volume $(HOME)/.m2:/root/.m2:ro --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:alpine3_x86-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
||||||
|
|
||||||
rocksdbjavastaticdockerx86_64musl:
|
rocksdbjavastaticdockerx86_64musl:
|
||||||
mkdir -p java/target
|
mkdir -p java/target
|
||||||
docker run --rm --name rocksdb_linux_x64-musl-be --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:alpine3_x64-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
docker run --rm --name rocksdb_linux_x64-musl-be --attach stdin --attach stdout --attach stderr --volume $(HOME)/.m2:/root/.m2:ro --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:alpine3_x64-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
||||||
|
|
||||||
rocksdbjavastaticdockerppc64lemusl:
|
rocksdbjavastaticdockerppc64lemusl:
|
||||||
mkdir -p java/target
|
mkdir -p java/target
|
||||||
docker run --rm --name rocksdb_linux_ppc64le-musl-be --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:alpine3_ppc64le-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
docker run --rm --name rocksdb_linux_ppc64le-musl-be --attach stdin --attach stdout --attach stderr --volume $(HOME)/.m2:/root/.m2:ro --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:alpine3_ppc64le-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
||||||
|
|
||||||
rocksdbjavastaticdockerarm64v8musl:
|
rocksdbjavastaticdockerarm64v8musl:
|
||||||
mkdir -p java/target
|
mkdir -p java/target
|
||||||
docker run --rm --name rocksdb_linux_arm64v8-musl-be --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:alpine3_arm64v8-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
docker run --rm --name rocksdb_linux_arm64v8-musl-be --attach stdin --attach stdout --attach stderr --volume $(HOME)/.m2:/root/.m2:ro --volume `pwd`:/rocksdb-host:ro --volume /rocksdb-local-build --volume `pwd`/java/target:/rocksdb-java-target --env DEBUG_LEVEL=$(DEBUG_LEVEL) evolvedbinary/rocksjava:alpine3_arm64v8-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh
|
||||||
|
|
||||||
rocksdbjavastaticpublish: rocksdbjavastaticrelease rocksdbjavastaticpublishcentral
|
rocksdbjavastaticpublish: rocksdbjavastaticrelease rocksdbjavastaticpublishcentral
|
||||||
|
|
||||||
|
@ -216,13 +216,17 @@ endif
|
|||||||
SEARCH_REPO_URL?=http://search.maven.org/remotecontent?filepath=
|
SEARCH_REPO_URL?=http://search.maven.org/remotecontent?filepath=
|
||||||
CENTRAL_REPO_URL?=https://repo1.maven.org/maven2/
|
CENTRAL_REPO_URL?=https://repo1.maven.org/maven2/
|
||||||
|
|
||||||
clean:
|
clean: clean-not-downloaded clean-downloaded
|
||||||
$(AM_V_at)rm -rf include/*
|
|
||||||
$(AM_V_at)rm -rf test-libs/
|
clean-not-downloaded:
|
||||||
|
$(AM_V_at)rm -rf $(NATIVE_INCLUDE)
|
||||||
$(AM_V_at)rm -rf $(OUTPUT)
|
$(AM_V_at)rm -rf $(OUTPUT)
|
||||||
$(AM_V_at)rm -rf $(BENCHMARK_OUTPUT)
|
$(AM_V_at)rm -rf $(BENCHMARK_OUTPUT)
|
||||||
$(AM_V_at)rm -rf $(SAMPLES_OUTPUT)
|
$(AM_V_at)rm -rf $(SAMPLES_OUTPUT)
|
||||||
|
|
||||||
|
clean-downloaded:
|
||||||
|
$(AM_V_at)rm -rf $(JAVA_TEST_LIBDIR)
|
||||||
|
|
||||||
|
|
||||||
javadocs: java
|
javadocs: java
|
||||||
$(AM_V_GEN)mkdir -p $(JAVADOC)
|
$(AM_V_GEN)mkdir -p $(JAVADOC)
|
||||||
|
Loading…
Reference in New Issue
Block a user