Skip to content

Commit

Permalink
Merge pull request #1764 from kuzudb/arrow-build-jobs
Browse files Browse the repository at this point in the history
Set CMAKE_BUILD_PARALLEL_LEVEL so that NUM_THREADS gets passed to the arrow build in CI
  • Loading branch information
mewim committed Jul 5, 2023
2 parents a129767 + 11376c8 commit ca3128e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ROOT_DIR=$(CURDIR)
ifndef $(NUM_THREADS)
NUM_THREADS=1
endif
export CMAKE_BUILD_PARALLEL_LEVEL=$(NUM_THREADS)

ifndef $(TEST_JOBS)
TEST_JOBS=10
Expand Down Expand Up @@ -51,49 +52,49 @@ endif
release:
$(call mkdirp,build/release) && cd build/release && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Release ../.. && \
cmake --build . --config Release -- -j $(NUM_THREADS)
cmake --build . --config Release

debug:
$(call mkdirp,build/debug) && cd build/debug && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Debug ../.. && \
cmake --build . --config Debug -- -j $(NUM_THREADS)
cmake --build . --config Debug

all:
$(call mkdirp,build/release) && cd build/release && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=TRUE -DBUILD_BENCHMARK=TRUE -DBUILD_NODEJS=TRUE ../.. && \
cmake --build . --config Release -- -j $(NUM_THREADS)
cmake --build . --config Release

alldebug:
$(call mkdirp,build/debug) && cd build/debug && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=TRUE -DBUILD_BENCHMARK=TRUE -DBUILD_NODEJS=TRUE ../.. && \
cmake --build . --config Debug -- -j $(NUM_THREADS)
cmake --build . --config Debug

benchmark:
$(call mkdirp,build/release) && cd build/release && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARK=TRUE ../.. && \
cmake --build . --config Release -- -j $(NUM_THREADS)
cmake --build . --config Release

nodejs:
$(call mkdirp,build/release) && cd build/release && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Release -DBUILD_NODEJS=TRUE ../.. && \
cmake --build . --config Release -- -j $(NUM_THREADS)
cmake --build . --config Release

java:
$(call mkdirp,build/release) && cd build/release && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Release -DBUILD_JAVA=TRUE ../.. && \
cmake --build . --config Release -- -j $(NUM_THREADS)
cmake --build . --config Release

test:
$(call mkdirp,build/release) && cd build/release && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=TRUE ../.. && \
cmake --build . --config Release -- -j $(NUM_THREADS)
cmake --build . --config Release
cd $(ROOT_DIR)/build/release/test && \
ctest --output-on-failure -j ${TEST_JOBS}

lcov:
$(call mkdirp,build/release) && cd build/release && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=TRUE -DBUILD_NODEJS=TRUE -DBUILD_LCOV=TRUE ../.. && \
cmake --build . --config Release -- -j $(NUM_THREADS)
cmake --build . --config Release
cd $(ROOT_DIR)/build/release/test && \
ctest --output-on-failure -j ${TEST_JOBS}

Expand Down
3 changes: 0 additions & 3 deletions tools/rust_api/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ fn link_libraries() {
}

fn build_bundled_cmake() -> Result<Vec<PathBuf>, Box<dyn std::error::Error>> {
if let Ok(jobs) = std::env::var("NUM_THREADS") {
std::env::set_var("NUM_JOBS", jobs);
}
let kuzu_root = {
let root = Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("kuzu-src");
if root.is_symlink() || root.is_dir() {
Expand Down

0 comments on commit ca3128e

Please sign in to comment.