mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 03:21:00 +00:00
ci: Specify the number of build jobs on windows
Followup to b5e0e071
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1840>
This commit is contained in:
parent
24ffee3fd6
commit
3788914cea
1 changed files with 13 additions and 2 deletions
|
@ -13,6 +13,17 @@ $env:ErrorActionPreference='Stop'
|
|||
"--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", "--all-targets")
|
||||
|
||||
function Run-Tests {
|
||||
param (
|
||||
$Features
|
||||
|
@ -28,7 +39,7 @@ function Run-Tests {
|
|||
Write-Host "Features: $Features"
|
||||
Write-Host "Exclude string: $local_exclude"
|
||||
|
||||
cargo build --color=always --workspace $local_exclude --all-targets $Features
|
||||
cargo build $cargo_opts --workspace $local_exclude $Features
|
||||
|
||||
if (!$?) {
|
||||
Write-Host "Build failed"
|
||||
|
@ -37,7 +48,7 @@ function Run-Tests {
|
|||
|
||||
$env:G_DEBUG="fatal_warnings"
|
||||
$env:RUST_BACKTRACE="1"
|
||||
cargo nextest run --profile=ci --no-fail-fast --color=always --workspace $local_exclude --all-targets $Features
|
||||
cargo nextest run $cargo_opts --profile=ci --no-fail-fast --workspace $local_exclude $Features
|
||||
if (!$?) {
|
||||
Write-Host "Tests failed"
|
||||
Exit 1
|
||||
|
|
Loading…
Reference in a new issue