From 1eb8adb429585e551067514519c21e998c354729 Mon Sep 17 00:00:00 2001 From: Radu Marias Date: Tue, 17 Dec 2024 06:55:31 +0200 Subject: [PATCH] set num threads for build, test and bench --- scripts/check-before-push.bat | 6 ++++-- scripts/check-before-push.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/check-before-push.bat b/scripts/check-before-push.bat index d63d24ca..39ea86dd 100755 --- a/scripts/check-before-push.bat +++ b/scripts/check-before-push.bat @@ -4,6 +4,8 @@ setlocal set CARGO_TERM_COLOR=always gsset RUSTFLAGS=-Dwarnings set RUSTDOCFLAGS=-Dwarnings +set RUST_TEST_THREADS=14 +set CARGO_BUILD_JOBS=14 if %errorlevel% neq 0 exit /b %errorlevel% @@ -28,7 +30,7 @@ REM if %errorlevel% neq 0 exit /b %errorlevel% cargo test --release --all --all-features if %errorlevel% neq 0 exit /b %errorlevel% -REM cargo bench --workspace --all-targets --all-features --target x86_64-unknown-linux-gnu +REM cargo bench --workspace --all-targets --all-features -j 14 if %errorlevel% neq 0 exit /b %errorlevel% cargo doc --workspace --all-features --no-deps @@ -71,7 +73,7 @@ if %errorlevel% neq 0 exit /b %errorlevel% cargo doc --workspace --all-features --no-deps if %errorlevel% neq 0 exit /b %errorlevel% -REM cargo bench --workspace --all-targets --all-features --target x86_64-unknown-linux-gnu +REM cargo bench --workspace --all-targets --all-features -j 14 if %errorlevel% neq 0 exit /b %errorlevel% cd .. diff --git a/scripts/check-before-push.sh b/scripts/check-before-push.sh index aad62c74..028407c3 100755 --- a/scripts/check-before-push.sh +++ b/scripts/check-before-push.sh @@ -5,6 +5,8 @@ set -e export CARGO_TERM_COLOR=always export RUSTFLAGS="-Dwarnings" export RUSTDOCFLAGS="-Dwarnings" +export RUST_TEST_THREADS=14 +export CARGO_BUILD_JOBS=14 cargo fmt --all @@ -21,7 +23,7 @@ cargo clippy --all-targets --release --target x86_64-unknown-linux-gnu -- \ -A clippy::missing_errors_doc \ -A clippy::type_complexity cargo test --release --all --all-features --target x86_64-unknown-linux-gnu -# cargo bench --workspace --all-targets --all-features --target x86_64-unknown-linux-gnu +cargo bench --workspace --all-targets --all-features --target x86_64-unknown-linux-gnu -j 14 cargo doc --workspace --all-features --no-deps --target x86_64-unknown-linux-gnu # cargo publish --dry-run --allow-dirty --target x86_64-unknown-linux-gnu @@ -44,6 +46,6 @@ cargo clippy --all-targets --release --target x86_64-unknown-linux-gnu -- \ -A clippy::missing_errors_doc \ -A clippy::type_complexity cargo test --release --all --all-features --target x86_64-unknown-linux-gnu -# cargo bench --workspace --all-targets --all-features --target x86_64-unknown-linux-gnu +cargo bench --workspace --all-targets --all-features --target x86_64-unknown-linux-gnu -j 14 cargo doc --workspace --all-features --no-deps --target x86_64-unknown-linux-gnu cd ..