Skip to content

Commit 83b44b1

Browse files
authored
fix(ci): replace make with ninja. (#885)
* fix(ci): replace make with ninja. Signed-off-by: syaojun <libevent@yeah.net> * fix(ci): fix the cpplint Signed-off-by: syaojun <libevent@yeah.net> * fix(ci): fix the cpplint2 Signed-off-by: syaojun <libevent@yeah.net> * feat(ci): keep a make command Signed-off-by: syaojun <libevent@yeah.net> * feat(ci): keep a make command2 Signed-off-by: syaojun <libevent@yeah.net> --------- Signed-off-by: syaojun <libevent@yeah.net>
1 parent d535a43 commit 83b44b1

3 files changed

Lines changed: 22 additions & 24 deletions

File tree

.github/workflows/ci-nightly.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install dependencies
4848
run: |
4949
sudo apt-get update -y
50-
sudo apt-get install -y libboost-graph-dev ccache libcurl4-openssl-dev
50+
sudo apt-get install -y libboost-graph-dev ccache libcurl4-openssl-dev ninja-build
5151
5252
# install Catch2 v3
5353
git clone --branch v3.6.0 https://github.com/catchorg/Catch2.git --depth 1
@@ -62,14 +62,14 @@ jobs:
6262
run: |
6363
mkdir build-debug
6464
pushd build-debug
65-
cmake ../cpp -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_ARROW_FROM_SOURCE=ON
65+
cmake ../cpp -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_ARROW_FROM_SOURCE=ON
6666
popd
6767
6868
- name: Build GraphAr-debug
6969
run: |
7070
pushd build-debug
71-
make -j$(nproc)
72-
make graphar-ccache-stats
71+
ninja
72+
ninja graphar-ccache-stats
7373
popd
7474
7575
- name: Test-debug
@@ -83,14 +83,14 @@ jobs:
8383
run: |
8484
mkdir build-release
8585
pushd build-release
86-
cmake ../cpp -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_ARROW_FROM_SOURCE=ON
86+
cmake ../cpp -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_ARROW_FROM_SOURCE=ON
8787
popd
8888
8989
- name: Build GraphAr-release
9090
run: |
9191
pushd build-release
92-
make -j$(nproc)
93-
make graphar-ccache-stats
92+
ninja
93+
ninja graphar-ccache-stats
9494
popd
9595
9696
- name: Test-release

.github/workflows/ci.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
libarrow-dataset-dev=17.0.0-1 \
7272
libarrow-acero-dev=17.0.0-1 \
7373
libparquet-dev=17.0.0-1
74-
sudo apt-get install -y libboost-graph-dev ccache libcurl4-openssl-dev doxygen lcov
74+
sudo apt-get install -y libboost-graph-dev ccache libcurl4-openssl-dev doxygen lcov ninja-build
7575
7676
# install benchmark
7777
git clone --branch v1.8.3 https://github.com/google/benchmark.git --depth 1
@@ -94,7 +94,7 @@ jobs:
9494
run: |
9595
mkdir build
9696
cd build
97-
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON -DGRAPHAR_ENABLE_COVERAGE=ON
97+
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON -DGRAPHAR_ENABLE_COVERAGE=ON
9898
9999
- name: clang-format
100100
run: |
@@ -111,14 +111,11 @@ jobs:
111111
- name: cpplint
112112
working-directory: "cpp/build"
113113
run: |
114-
function ec() { [[ "$1" == "-h" ]] && { shift && eval $* > /dev/null 2>&1; ec=$?; echo $ec; } || eval $*; ec=$?; }
115-
116-
ec make graphar-cpplint
117-
if [[ "$ec" != "0" ]]; then
114+
if ! ninja graphar-cpplint; then
118115
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
119116
echo "| cpplint failures found! Run: "
120117
echo "|"
121-
echo "| make graphar-cpplint"
118+
echo "| ninja graphar-cpplint"
122119
echo "|"
123120
echo "| to fix this error."
124121
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@@ -129,11 +126,11 @@ jobs:
129126
working-directory: "cpp/build"
130127
run: |
131128
cmake -DENABLE_DOCS=ON ..
132-
make docs
129+
ninja docs
133130
134131
- name: Build GraphAr
135132
working-directory: "cpp/build"
136-
run: make -j$(nproc)
133+
run: ninja
137134

138135
- name: Test
139136
working-directory: "cpp/build"
@@ -167,8 +164,8 @@ jobs:
167164
run: |
168165
mkdir build-release
169166
pushd build-release
170-
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON
171-
make -j$(nproc)
167+
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON
168+
ninja
172169
export ASAN_OPTIONS=detect_leaks=0
173170
ctest --output-on-failure
174171
popd
@@ -232,8 +229,8 @@ jobs:
232229
run: |
233230
mkdir build
234231
pushd build
235-
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON
236-
make -j$(nproc)
232+
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON
233+
ninja
237234
popd
238235
239236
- name: Running Test
@@ -247,8 +244,8 @@ jobs:
247244
run: |
248245
mkdir build-release
249246
pushd build-release
250-
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON
251-
make -j$(nproc)
247+
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON
248+
ninja
252249
export ASAN_OPTIONS=detect_leaks=0
253250
ctest --output-on-failure
254251
popd
@@ -265,8 +262,8 @@ jobs:
265262
run: |
266263
mkdir build-static
267264
pushd build-static
268-
cmake .. -DUSE_STATIC_ARROW=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON
269-
make -j$(nproc)
265+
cmake .. -G Ninja -DUSE_STATIC_ARROW=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON
266+
ninja
270267
export ASAN_OPTIONS=detect_leaks=0
271268
export ASAN_OPTIONS=detect_container_overflow=0
272269
ctest --output-on-failure

cpp/Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717

1818
brew "cmake"
19+
brew "ninja"
1920
brew "google-benchmark"
2021
brew "apache-arrow"
2122
brew "boost"

0 commit comments

Comments
 (0)