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
|
|
@ -55,19 +55,19 @@ selene_exit=$?
|
|||
record "Selene" $selene_exit
|
||||
|
||||
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..."
|
||||
cargo clippy --all-targets --all-features 2>&1
|
||||
cargo clippy -j 16 --all-targets --all-features 2>&1
|
||||
clippy_exit=$?
|
||||
record "Clippy" $clippy_exit
|
||||
|
||||
step 7 "Build Everything"
|
||||
cargo build --locked --all-targets --all-features
|
||||
cargo build -j 16 --locked --all-targets --all-features
|
||||
build_exit=$?
|
||||
record "Build" $build_exit
|
||||
|
||||
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=$?
|
||||
record "Rust Tests" $rust_tests
|
||||
|
||||
|
|
@ -101,24 +101,24 @@ if [ "$RBX_DOM" = true ]; then
|
|||
record "Selene (rbx_dom_lua)" $selene_rbxdom
|
||||
|
||||
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..."
|
||||
(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=$?
|
||||
record "Clippy (rbx-dom)" $clippy_rbxdom
|
||||
|
||||
step 14 "Build rbx-dom"
|
||||
(cd rbx-dom && cargo build --verbose)
|
||||
(cd rbx-dom && cargo build -j 16 --verbose)
|
||||
build_rbxdom=$?
|
||||
(cd rbx-dom && cargo build --all-features --verbose)
|
||||
(cd rbx-dom && cargo build -j 16 --all-features --verbose)
|
||||
build_rbxdom_all=$?
|
||||
record "Build (rbx-dom)" $build_rbxdom
|
||||
record "Build (rbx-dom all-features)" $build_rbxdom_all
|
||||
|
||||
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=$?
|
||||
(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=$?
|
||||
record "Tests (rbx-dom)" $tests_rbxdom
|
||||
record "Tests (rbx-dom all-features)" $tests_rbxdom_all
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue