Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 78d06bf

Browse files
authored
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
1 parent bc4526d commit 78d06bf

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

.github/workflows/cpp-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Run build
3838
run: |
3939
mkdir build && cd build
40-
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
40+
cmake .. -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
4141
cmake --build .
4242
- uses: cpp-linter/cpp-linter-action@f91c446a32ae3eb9f98fef8c9ed4c7cb613a4f8a
4343
id: linter

.github/workflows/sanitizer_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Configure and Build with ASAN & UBSAN
4646
run: |
4747
mkdir build && cd build
48-
cmake .. -DCMAKE_BUILD_TYPE=Debug -DICEBERG_ENABLE_ASAN=ON -DICEBERG_ENABLE_UBSAN=ON
48+
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DICEBERG_ENABLE_ASAN=ON -DICEBERG_ENABLE_UBSAN=ON
4949
cmake --build . --verbose
5050
- name: Run Tests
5151
working-directory: build

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
3232

3333
```bash
3434
cd iceberg-cpp
35-
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_STATIC=ON -DICEBERG_BUILD_SHARED=ON
35+
cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_STATIC=ON -DICEBERG_BUILD_SHARED=ON
3636
cmake --build build
3737
ctest --test-dir build --output-on-failure
3838
cmake --install build
@@ -43,7 +43,7 @@ cmake --install build
4343
#### Vendored Apache Arrow (default)
4444

4545
```bash
46-
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_BUNDLE=ON
46+
cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_BUNDLE=ON
4747
cmake --build build
4848
ctest --test-dir build --output-on-failure
4949
cmake --install build
@@ -52,7 +52,7 @@ cmake --install build
5252
#### Provided Apache Arrow
5353

5454
```bash
55-
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON
55+
cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON
5656
cmake --build build
5757
ctest --test-dir build --output-on-failure
5858
cmake --install build
@@ -64,14 +64,14 @@ After installing the core libraries, you can build the examples:
6464

6565
```bash
6666
cd iceberg-cpp/example
67-
cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/install
67+
cmake -S . -B build -G Ninja -DCMAKE_PREFIX_PATH=/path/to/install
6868
cmake --build build
6969
```
7070

7171
If you are using provided Apache Arrow, you need to include `/path/to/arrow` in `CMAKE_PREFIX_PATH` as below.
7272

7373
```bash
74-
cmake -S . -B build -DCMAKE_PREFIX_PATH="/path/to/install;/path/to/arrow"
74+
cmake -S . -B build -G Ninja -DCMAKE_PREFIX_PATH="/path/to/install;/path/to/arrow"
7575
```
7676

7777
## Contribute

ci/scripts/build_example.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ is_windows() {
3030
}
3131

3232
CMAKE_ARGS=(
33+
"-G Ninja"
3334
"-DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX:-${ICEBERG_HOME}}"
3435
)
3536

ci/scripts/build_iceberg.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ is_windows() {
3030
}
3131

3232
CMAKE_ARGS=(
33+
"-G Ninja"
3334
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-${ICEBERG_HOME}}"
3435
"-DICEBERG_BUILD_STATIC=ON"
3536
"-DICEBERG_BUILD_SHARED=ON"

0 commit comments

Comments
 (0)