mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
ci: Specify the number of build jobs on windows
Followup to 7b51a7c77b
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1502>
This commit is contained in:
parent
ce13ac33fd
commit
9b65cbece0
1 changed files with 13 additions and 2 deletions
|
@ -42,6 +42,17 @@
|
||||||
"--all-features"
|
"--all-features"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ($env:FDO_CI_CONCURRENT)
|
||||||
|
{
|
||||||
|
$ncpus = $env:FDO_CI_CONCURRENT
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ncpus = (Get-WmiObject -Class Win32_ComputerSystem).NumberOfLogicalProcessors
|
||||||
|
}
|
||||||
|
Write-Host "Build Jobs: $ncpus"
|
||||||
|
$cargo_opts = @("--color=always", "--jobs=$ncpus")
|
||||||
|
|
||||||
function Move-Junit {
|
function Move-Junit {
|
||||||
param (
|
param (
|
||||||
$Features
|
$Features
|
||||||
|
@ -100,7 +111,7 @@ foreach($features in $features_matrix) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "with features: $env:LocalFeatures"
|
Write-Host "with features: $env:LocalFeatures"
|
||||||
cargo build --color=always --manifest-path $crate/Cargo.toml --all-targets $env:LocalFeatures
|
cargo build $cargo_opts --manifest-path $crate/Cargo.toml --all-targets $env:LocalFeatures
|
||||||
|
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "Failed to build crate: $crate"
|
Write-Host "Failed to build crate: $crate"
|
||||||
|
@ -114,7 +125,7 @@ foreach($features in $features_matrix) {
|
||||||
|
|
||||||
$env:G_DEBUG="fatal_warnings"
|
$env:G_DEBUG="fatal_warnings"
|
||||||
$env:RUST_BACKTRACE="1"
|
$env:RUST_BACKTRACE="1"
|
||||||
cargo nextest run --profile=ci --no-fail-fast --color=always --manifest-path $crate/Cargo.toml $env:LocalFeatures
|
cargo nextest run --profile=ci --no-fail-fast $cargo_opts --manifest-path $crate/Cargo.toml $env:LocalFeatures
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "Tests failed to for crate: $crate"
|
Write-Host "Tests failed to for crate: $crate"
|
||||||
Exit 1
|
Exit 1
|
||||||
|
|
Loading…
Reference in a new issue