1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

ci: add variable JOBS in script build_test.sh

This commit is contained in:
Sébastien Helleu
2025-05-04 20:14:59 +02:00
parent 8b6480272a
commit 9f4cbe599b
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -433,6 +433,7 @@ jobs:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
RUN_TESTS: "0"
JOBS: "2"
run: ./tools/build_test.sh ${{ matrix.config.buildargs }}
- name: Run WeeChat
+7 -2
View File
@@ -22,10 +22,11 @@
#
# Build WeeChat according to environment variables:
# - JOBS: number of parallel jobs
# - RUN_TESTS: set to 0 to disable run of tests
#
# Syntax to run the script with environment variables:
# RUN_TESTS=0 ./build_test.sh
# RUN_TESTS=0 JOBS=2 ./build_test.sh
#
# Syntax to run the script with arguments on command line:
# ./build_test.sh [arguments]
@@ -44,12 +45,16 @@ build_dir="build-tmp-$$"
mkdir "${build_dir}"
cd "${build_dir}"
if [ -z "${JOBS}" ]; then
JOBS="$(nproc)"
fi
cmake .. "$@"
if [ -f "build.ninja" ]; then
ninja -v
sudo ninja install
else
make VERBOSE=1 -j "$(nproc)"
make VERBOSE=1 -j "${JOBS}"
sudo make install
fi
if [ "$RUN_TESTS" != "0" ]; then