mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-22 10:06:29 +00:00
ci: combine windows build jobs
Instead of having a matrix of jobs, use a single job running all the tests like the linux jobs do. This helps with improved cache hits as most of the deps are shared between the builds.
This commit is contained in:
parent
23c07d3cb3
commit
2bf5f0bf67
2 changed files with 29 additions and 21 deletions
|
@ -272,15 +272,7 @@ gst-build:
|
|||
- 'docker'
|
||||
- 'windows'
|
||||
- '2022'
|
||||
parallel:
|
||||
matrix:
|
||||
- CI_CARGO_FEATURES:
|
||||
- "--no-default-features"
|
||||
- "--all-features"
|
||||
- ""
|
||||
script:
|
||||
- echo $env:CI_CARGO_FEATURES
|
||||
|
||||
# Set the code page to UTF-8
|
||||
- chcp 65001
|
||||
|
||||
|
|
|
@ -1,16 +1,27 @@
|
|||
$env:ErrorActionPreference='Stop'
|
||||
|
||||
$exclude_crates = @(
|
||||
[string[]] $exclude_crates = @(
|
||||
"--exclude",
|
||||
"gst-plugin-csound",
|
||||
"--exclude",
|
||||
"gst-plugin-webp"
|
||||
)
|
||||
|
||||
Write-Host "Features: $env:CI_CARGO_FEATURES"
|
||||
Write-Host "Exlcude string: $exclude_crates"
|
||||
[string[]] $features_matrix = @(
|
||||
"--no-default-features",
|
||||
"",
|
||||
"--all-features"
|
||||
)
|
||||
|
||||
cargo build --color=always --workspace $exclude_crates --all-targets $env:CI_CARGO_FEATURES
|
||||
function Run-Tests {
|
||||
param (
|
||||
$Features
|
||||
)
|
||||
|
||||
Write-Host "Features: $Features"
|
||||
Write-Host "Exclude string: $exclude_crates"
|
||||
|
||||
cargo build --color=always --workspace $exclude_crates --all-targets $Features
|
||||
|
||||
if (!$?) {
|
||||
Write-Host "Build failed"
|
||||
|
@ -18,9 +29,14 @@ if (!$?) {
|
|||
}
|
||||
|
||||
$env:G_DEBUG="fatal_warnings"
|
||||
cargo test --no-fail-fast --color=always --workspace $exclude_crates --all-targets $env:CI_CARGO_FEATURES
|
||||
cargo test --no-fail-fast --color=always --workspace $exclude_crates --all-targets $Features
|
||||
|
||||
if (!$?) {
|
||||
Write-Host "Tests failed"
|
||||
Exit 1
|
||||
}
|
||||
}
|
||||
|
||||
foreach($feature in $features_matrix) {
|
||||
Run-Tests -Features $feature
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue