mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Optimize CI scripts for Rust tasks by adding parallel execution
- Updated `cargo` commands in both `ci.ps1` and `ci.sh` scripts to utilize the `-j 16` flag, enabling parallel execution for linting, building, and testing processes. This change improves the efficiency of CI workflows by reducing execution time for Rust tasks. - Ensured consistency across both scripts to maintain functionality and performance enhancements. These modifications enhance the overall performance of the CI pipeline for Rust projects.
This commit is contained in:
parent
075cca4c96
commit
c3efb0e560
2 changed files with 20 additions and 20 deletions
|
|
@ -56,19 +56,19 @@ $selene = $LASTEXITCODE
|
||||||
Record-Result "Selene" $selene
|
Record-Result "Selene" $selene
|
||||||
|
|
||||||
Write-Step 6 "Rust Linting (Clippy) - Auto-fix"
|
Write-Step 6 "Rust Linting (Clippy) - Auto-fix"
|
||||||
cargo clippy --fix --allow-dirty --allow-staged 2>&1 | Out-Null
|
cargo clippy -j 16 --fix --allow-dirty --allow-staged 2>&1 | Out-Null
|
||||||
Write-Host "Verifying..." -ForegroundColor Yellow
|
Write-Host "Verifying..." -ForegroundColor Yellow
|
||||||
cargo clippy --all-targets --all-features 2>&1
|
cargo clippy -j 16 --all-targets --all-features 2>&1
|
||||||
$clippy = $LASTEXITCODE
|
$clippy = $LASTEXITCODE
|
||||||
Record-Result "Clippy" $clippy
|
Record-Result "Clippy" $clippy
|
||||||
|
|
||||||
Write-Step 7 "Build Everything"
|
Write-Step 7 "Build Everything"
|
||||||
cargo build --locked --all-targets --all-features
|
cargo build -j 16 --locked --all-targets --all-features
|
||||||
$build = $LASTEXITCODE
|
$build = $LASTEXITCODE
|
||||||
Record-Result "Build" $build
|
Record-Result "Build" $build
|
||||||
|
|
||||||
Write-Step 8 "Run ALL Rust Tests"
|
Write-Step 8 "Run ALL Rust Tests"
|
||||||
$testOutput = cargo test --locked --all-targets --all-features -- --test-threads=16 2>&1
|
$testOutput = cargo test -j 16 --locked --all-targets --all-features -- --test-threads=16 2>&1
|
||||||
$rustTests = $LASTEXITCODE
|
$rustTests = $LASTEXITCODE
|
||||||
$testOutput | Write-Host
|
$testOutput | Write-Host
|
||||||
Record-Result "Rust Tests" $rustTests
|
Record-Result "Rust Tests" $rustTests
|
||||||
|
|
@ -106,18 +106,18 @@ if ($RbxDom) {
|
||||||
|
|
||||||
Write-Step 13 "Rust Linting (Clippy) for rbx-dom - Auto-fix"
|
Write-Step 13 "Rust Linting (Clippy) for rbx-dom - Auto-fix"
|
||||||
Push-Location rbx-dom
|
Push-Location rbx-dom
|
||||||
cargo clippy --fix --allow-dirty --allow-staged 2>&1 | Out-Null
|
cargo clippy -j 16 --fix --allow-dirty --allow-staged 2>&1 | Out-Null
|
||||||
Write-Host "Verifying..." -ForegroundColor Yellow
|
Write-Host "Verifying..." -ForegroundColor Yellow
|
||||||
cargo clippy --all-targets --all-features -- -D warnings 2>&1
|
cargo clippy -j 16 --all-targets --all-features -- -D warnings 2>&1
|
||||||
$clippyRbxDom = $LASTEXITCODE
|
$clippyRbxDom = $LASTEXITCODE
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Record-Result "Clippy (rbx-dom)" $clippyRbxDom
|
Record-Result "Clippy (rbx-dom)" $clippyRbxDom
|
||||||
|
|
||||||
Write-Step 14 "Build rbx-dom"
|
Write-Step 14 "Build rbx-dom"
|
||||||
Push-Location rbx-dom
|
Push-Location rbx-dom
|
||||||
cargo build --verbose
|
cargo build -j 16 --verbose
|
||||||
$buildRbxDom = $LASTEXITCODE
|
$buildRbxDom = $LASTEXITCODE
|
||||||
cargo build --all-features --verbose
|
cargo build -j 16 --all-features --verbose
|
||||||
$buildRbxDomAll = $LASTEXITCODE
|
$buildRbxDomAll = $LASTEXITCODE
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Record-Result "Build (rbx-dom)" $buildRbxDom
|
Record-Result "Build (rbx-dom)" $buildRbxDom
|
||||||
|
|
@ -125,9 +125,9 @@ if ($RbxDom) {
|
||||||
|
|
||||||
Write-Step 15 "Run ALL rbx-dom Rust Tests"
|
Write-Step 15 "Run ALL rbx-dom Rust Tests"
|
||||||
Push-Location rbx-dom
|
Push-Location rbx-dom
|
||||||
cargo test --verbose -- --test-threads=16
|
cargo test -j 16 --verbose -- --test-threads=16
|
||||||
$testsRbxDom = $LASTEXITCODE
|
$testsRbxDom = $LASTEXITCODE
|
||||||
cargo test --all-features --verbose -- --test-threads=16
|
cargo test -j 16 --all-features --verbose -- --test-threads=16
|
||||||
$testsRbxDomAll = $LASTEXITCODE
|
$testsRbxDomAll = $LASTEXITCODE
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Record-Result "Tests (rbx-dom)" $testsRbxDom
|
Record-Result "Tests (rbx-dom)" $testsRbxDom
|
||||||
|
|
|
||||||
|
|
@ -55,19 +55,19 @@ selene_exit=$?
|
||||||
record "Selene" $selene_exit
|
record "Selene" $selene_exit
|
||||||
|
|
||||||
step 6 "Rust Linting (Clippy) - Auto-fix"
|
step 6 "Rust Linting (Clippy) - Auto-fix"
|
||||||
cargo clippy --fix --allow-dirty --allow-staged >/dev/null 2>&1
|
cargo clippy -j 16 --fix --allow-dirty --allow-staged >/dev/null 2>&1
|
||||||
echo "Verifying..."
|
echo "Verifying..."
|
||||||
cargo clippy --all-targets --all-features 2>&1
|
cargo clippy -j 16 --all-targets --all-features 2>&1
|
||||||
clippy_exit=$?
|
clippy_exit=$?
|
||||||
record "Clippy" $clippy_exit
|
record "Clippy" $clippy_exit
|
||||||
|
|
||||||
step 7 "Build Everything"
|
step 7 "Build Everything"
|
||||||
cargo build --locked --all-targets --all-features
|
cargo build -j 16 --locked --all-targets --all-features
|
||||||
build_exit=$?
|
build_exit=$?
|
||||||
record "Build" $build_exit
|
record "Build" $build_exit
|
||||||
|
|
||||||
step 8 "Run ALL Rust Tests"
|
step 8 "Run ALL Rust Tests"
|
||||||
cargo test --locked --all-targets --all-features -- --test-threads=16 2>&1
|
cargo test -j 16 --locked --all-targets --all-features -- --test-threads=16 2>&1
|
||||||
rust_tests=$?
|
rust_tests=$?
|
||||||
record "Rust Tests" $rust_tests
|
record "Rust Tests" $rust_tests
|
||||||
|
|
||||||
|
|
@ -101,24 +101,24 @@ if [ "$RBX_DOM" = true ]; then
|
||||||
record "Selene (rbx_dom_lua)" $selene_rbxdom
|
record "Selene (rbx_dom_lua)" $selene_rbxdom
|
||||||
|
|
||||||
step 13 "Rust Linting (Clippy) for rbx-dom - Auto-fix"
|
step 13 "Rust Linting (Clippy) for rbx-dom - Auto-fix"
|
||||||
(cd rbx-dom && cargo clippy --fix --allow-dirty --allow-staged >/dev/null 2>&1)
|
(cd rbx-dom && cargo clippy -j 16 --fix --allow-dirty --allow-staged >/dev/null 2>&1)
|
||||||
echo "Verifying..."
|
echo "Verifying..."
|
||||||
(cd rbx-dom && cargo clippy --all-targets --all-features -- -D warnings 2>&1)
|
(cd rbx-dom && cargo clippy -j 16 --all-targets --all-features -- -D warnings 2>&1)
|
||||||
clippy_rbxdom=$?
|
clippy_rbxdom=$?
|
||||||
record "Clippy (rbx-dom)" $clippy_rbxdom
|
record "Clippy (rbx-dom)" $clippy_rbxdom
|
||||||
|
|
||||||
step 14 "Build rbx-dom"
|
step 14 "Build rbx-dom"
|
||||||
(cd rbx-dom && cargo build --verbose)
|
(cd rbx-dom && cargo build -j 16 --verbose)
|
||||||
build_rbxdom=$?
|
build_rbxdom=$?
|
||||||
(cd rbx-dom && cargo build --all-features --verbose)
|
(cd rbx-dom && cargo build -j 16 --all-features --verbose)
|
||||||
build_rbxdom_all=$?
|
build_rbxdom_all=$?
|
||||||
record "Build (rbx-dom)" $build_rbxdom
|
record "Build (rbx-dom)" $build_rbxdom
|
||||||
record "Build (rbx-dom all-features)" $build_rbxdom_all
|
record "Build (rbx-dom all-features)" $build_rbxdom_all
|
||||||
|
|
||||||
step 15 "Run ALL rbx-dom Rust Tests"
|
step 15 "Run ALL rbx-dom Rust Tests"
|
||||||
(cd rbx-dom && cargo test --verbose -- --test-threads=16)
|
(cd rbx-dom && cargo test -j 16 --verbose -- --test-threads=16)
|
||||||
tests_rbxdom=$?
|
tests_rbxdom=$?
|
||||||
(cd rbx-dom && cargo test --all-features --verbose -- --test-threads=16)
|
(cd rbx-dom && cargo test -j 16 --all-features --verbose -- --test-threads=16)
|
||||||
tests_rbxdom_all=$?
|
tests_rbxdom_all=$?
|
||||||
record "Tests (rbx-dom)" $tests_rbxdom
|
record "Tests (rbx-dom)" $tests_rbxdom
|
||||||
record "Tests (rbx-dom all-features)" $tests_rbxdom_all
|
record "Tests (rbx-dom all-features)" $tests_rbxdom_all
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue