Skip to content

Commit bd6865f

Browse files
committed
Clean up
1 parent ee55aa2 commit bd6865f

2 files changed

Lines changed: 9 additions & 23 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ jobs:
2020
- name: Configure CMake
2121
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
2222
- name: Build
23-
run: |
24-
cores=$(sysctl -n hw.ncpu)
25-
ninja -C ${{github.workspace}}/build -j$((cores + 1))
23+
run: ninja -C ${{github.workspace}}/build
2624
- name: Test
2725
working-directory: ${{github.workspace}}/build
28-
run: |
29-
cores=$(sysctl -n hw.ncpu)
30-
ctest -C ${{env.BUILD_TYPE}} --output-on-failure --parallel $cores
26+
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --parallel
3127

3228
ubuntu:
3329
runs-on: ubuntu-latest
@@ -42,15 +38,12 @@ jobs:
4238
-DCMAKE_C_FLAGS="-fsanitize=leak" \
4339
-DCMAKE_CXX_FLAGS="-fsanitize=leak"
4440
- name: Build
45-
run: |
46-
cores=$(nproc)
47-
ninja -C ${{github.workspace}}/build -j$((cores + 1))
41+
run: ninja -C ${{github.workspace}}/build
4842
- name: Test with LSan
4943
working-directory: ${{github.workspace}}/build
5044
run: |
5145
export ASAN_OPTIONS="detect_leaks=1:halt_on_error=1:verbosity=1"
52-
cores=$(nproc)
53-
ctest -C ${{env.BUILD_TYPE}} --output-on-failure --parallel $cores
46+
ctest -C ${{env.BUILD_TYPE}} --output-on-failure --parallel
5447
5548
selfhosted:
5649
runs-on: self-hosted
@@ -59,11 +52,7 @@ jobs:
5952
- name: Configure CMake
6053
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_GLCACHE=on -DENABLE_LRB=on
6154
- name: Build
62-
run: |
63-
cores=$(nproc)
64-
ninja -C ${{github.workspace}}/build -j$((cores + 1))
55+
run: ninja -C ${{github.workspace}}/build
6556
- name: Test
6657
working-directory: ${{github.workspace}}/build
67-
run: |
68-
cores=$(nproc)
69-
ctest -C ${{env.BUILD_TYPE}} --output-on-failure --parallel $cores
58+
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --parallel

scripts/install_dependency.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ install_cmake() {
158158
# Install XGBoost
159159
install_xgboost() {
160160
log_info "Installing XGBoost..."
161-
local cores=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2)
162161
pushd /tmp/ >/dev/null
163162
if [[ ! -d "xgboost" ]]; then
164163
git clone --recursive https://github.com/dmlc/xgboost
@@ -167,7 +166,7 @@ install_xgboost() {
167166
mkdir -p build
168167
pushd build >/dev/null
169168
cmake -G Ninja ..
170-
ninja -j$((cores + 1))
169+
ninja
171170
sudo ninja install
172171
popd >/dev/null
173172
popd >/dev/null
@@ -177,7 +176,6 @@ install_xgboost() {
177176
# Install LightGBM
178177
install_lightgbm() {
179178
log_info "Installing LightGBM..."
180-
local cores=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2)
181179
pushd /tmp/ >/dev/null
182180
if [[ ! -d "LightGBM" ]]; then
183181
git clone --recursive https://github.com/microsoft/LightGBM
@@ -186,7 +184,7 @@ install_lightgbm() {
186184
mkdir -p build
187185
pushd build >/dev/null
188186
cmake -G Ninja ..
189-
ninja -j$((cores + 1))
187+
ninja
190188
sudo ninja install
191189
popd >/dev/null
192190
popd >/dev/null
@@ -196,7 +194,6 @@ install_lightgbm() {
196194
# Install Zstd
197195
install_zstd() {
198196
log_info "Installing Zstd..."
199-
local cores=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2)
200197
pushd /tmp/ >/dev/null
201198
local zstd_version="1.5.0"
202199
if [[ ! -f "zstd-${zstd_version}.tar.gz" ]]; then
@@ -207,7 +204,7 @@ install_zstd() {
207204
mkdir -p _build
208205
pushd _build >/dev/null
209206
cmake -G Ninja ..
210-
ninja -j$((cores + 1))
207+
ninja
211208
sudo ninja install
212209
popd >/dev/null
213210
popd >/dev/null

0 commit comments

Comments
 (0)