mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 04:51:26 +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"
|
"--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 {
|
function Run-Tests {
|
||||||
param (
|
param (
|
||||||
$Features
|
$Features
|
||||||
|
@ -28,7 +39,7 @@ function Run-Tests {
|
||||||
Write-Host "Features: $Features"
|
Write-Host "Features: $Features"
|
||||||
Write-Host "Exclude string: $local_exclude"
|
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 (!$?) {
|
if (!$?) {
|
||||||
Write-Host "Build failed"
|
Write-Host "Build failed"
|
||||||
|
@ -37,7 +48,7 @@ function Run-Tests {
|
||||||
|
|
||||||
$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 --workspace $local_exclude --all-targets $Features
|
cargo nextest run $cargo_opts --profile=ci --no-fail-fast --workspace $local_exclude $Features
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "Tests failed"
|
Write-Host "Tests failed"
|
||||||
Exit 1
|
Exit 1
|
||||||
|
|
Loading…
Reference in a new issue