This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 78d06bf  chore: use ninja for ci build (#215)
78d06bf is described below

commit 78d06bfd0f59d377f57a3cccbcaa3e9e96508d9a
Author: Junwang Zhao <[email protected]>
AuthorDate: Mon Sep 8 02:43:55 2025 +0800

    chore: use ninja for ci build (#215)
    
    Our CI runs quite slow, especially on windows, I observed task being
    terminated when it hit 30 minutes, not sure if that's the limit of gh
    actions.
    
    By using Ninja build, CI goes a lot faster, in general, it can save us
    more that 10 minutes in general. For specific jobs, below are some
    numbers(unit minutes):
    
    - ASAN 18 -> 7
    - Cpp linter 17 -> 7
    - Test Mac 13 -> 5
    - Test Ubuntu 17 -> 7
    - Test Windows 29 -> 17
---
 .github/workflows/cpp-linter.yml     |  2 +-
 .github/workflows/sanitizer_test.yml |  2 +-
 README.md                            | 10 +++++-----
 ci/scripts/build_example.sh          |  1 +
 ci/scripts/build_iceberg.sh          |  1 +
 5 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml
index 8a3d4cc..3a4a6d2 100644
--- a/.github/workflows/cpp-linter.yml
+++ b/.github/workflows/cpp-linter.yml
@@ -37,7 +37,7 @@ jobs:
       - name: Run build
         run: |
           mkdir build && cd build
-          cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+          cmake .. -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
           cmake --build .
       - uses: 
cpp-linter/cpp-linter-action@f91c446a32ae3eb9f98fef8c9ed4c7cb613a4f8a
         id: linter
diff --git a/.github/workflows/sanitizer_test.yml 
b/.github/workflows/sanitizer_test.yml
index 7e6a2dc..11fda10 100644
--- a/.github/workflows/sanitizer_test.yml
+++ b/.github/workflows/sanitizer_test.yml
@@ -45,7 +45,7 @@ jobs:
       - name: Configure and Build with ASAN & UBSAN
         run: |
           mkdir build && cd build
-          cmake .. -DCMAKE_BUILD_TYPE=Debug -DICEBERG_ENABLE_ASAN=ON 
-DICEBERG_ENABLE_UBSAN=ON
+          cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DICEBERG_ENABLE_ASAN=ON 
-DICEBERG_ENABLE_UBSAN=ON
           cmake --build . --verbose
       - name: Run Tests
         working-directory: build
diff --git a/README.md b/README.md
index 37fa9ca..6adfdb3 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ C++ implementation of [Apache 
Iceberg™](https://iceberg.apache.org/).
 
 ```bash
 cd iceberg-cpp
-cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/install 
-DICEBERG_BUILD_STATIC=ON -DICEBERG_BUILD_SHARED=ON
+cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install 
-DICEBERG_BUILD_STATIC=ON -DICEBERG_BUILD_SHARED=ON
 cmake --build build
 ctest --test-dir build --output-on-failure
 cmake --install build
@@ -43,7 +43,7 @@ cmake --install build
 #### Vendored Apache Arrow (default)
 
 ```bash
-cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/install 
-DICEBERG_BUILD_BUNDLE=ON
+cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install 
-DICEBERG_BUILD_BUNDLE=ON
 cmake --build build
 ctest --test-dir build --output-on-failure
 cmake --install build
@@ -52,7 +52,7 @@ cmake --install build
 #### Provided Apache Arrow
 
 ```bash
-cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/install 
-DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON
+cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install 
-DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON
 cmake --build build
 ctest --test-dir build --output-on-failure
 cmake --install build
@@ -64,14 +64,14 @@ After installing the core libraries, you can build the 
examples:
 
 ```bash
 cd iceberg-cpp/example
-cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/install
+cmake -S . -B build -G Ninja -DCMAKE_PREFIX_PATH=/path/to/install
 cmake --build build
 ```
 
 If you are using provided Apache Arrow, you need to include `/path/to/arrow` 
in `CMAKE_PREFIX_PATH` as below.
 
 ```bash
-cmake -S . -B build -DCMAKE_PREFIX_PATH="/path/to/install;/path/to/arrow"
+cmake -S . -B build -G Ninja 
-DCMAKE_PREFIX_PATH="/path/to/install;/path/to/arrow"
 ```
 
 ## Contribute
diff --git a/ci/scripts/build_example.sh b/ci/scripts/build_example.sh
index eb33e12..041e848 100755
--- a/ci/scripts/build_example.sh
+++ b/ci/scripts/build_example.sh
@@ -30,6 +30,7 @@ is_windows() {
 }
 
 CMAKE_ARGS=(
+    "-G Ninja"
     "-DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX:-${ICEBERG_HOME}}"
 )
 
diff --git a/ci/scripts/build_iceberg.sh b/ci/scripts/build_iceberg.sh
index 4351b0f..40bfd16 100755
--- a/ci/scripts/build_iceberg.sh
+++ b/ci/scripts/build_iceberg.sh
@@ -30,6 +30,7 @@ is_windows() {
 }
 
 CMAKE_ARGS=(
+    "-G Ninja"
     "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-${ICEBERG_HOME}}"
     "-DICEBERG_BUILD_STATIC=ON"
     "-DICEBERG_BUILD_SHARED=ON"

Reply via email to