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:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user