diff options
author | Jordan Petridis <jordan@centricular.com> | 2022-09-12 15:17:17 +0300 |
---|---|---|
committer | Jordan Petridis <jordan@centricular.com> | 2022-09-12 16:35:56 +0300 |
commit | 2bf5f0bf676091787904f39baf7186431c4f6535 (patch) | |
tree | e30bf498ae127d3aa56ae5990821bd9b42018a3d /ci | |
parent | 23c07d3cb36761d34377f4f16b0c0bcd33f6132e (diff) |
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.
Diffstat (limited to 'ci')
-rw-r--r-- | ci/run_windows_tests.ps1 | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/ci/run_windows_tests.ps1 b/ci/run_windows_tests.ps1 index f2333d99f..7c2b54054 100644 --- a/ci/run_windows_tests.ps1 +++ b/ci/run_windows_tests.ps1 @@ -1,26 +1,42 @@ $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 + ) -if (!$?) { - Write-Host "Build failed" - Exit 1 -} + Write-Host "Features: $Features" + Write-Host "Exclude string: $exclude_crates" + + cargo build --color=always --workspace $exclude_crates --all-targets $Features -$env:G_DEBUG="fatal_warnings" -cargo test --no-fail-fast --color=always --workspace $exclude_crates --all-targets $env:CI_CARGO_FEATURES + if (!$?) { + Write-Host "Build failed" + Exit 1 + } + + $env:G_DEBUG="fatal_warnings" + cargo test --no-fail-fast --color=always --workspace $exclude_crates --all-targets $Features + + if (!$?) { + Write-Host "Tests failed" + Exit 1 + } +} -if (!$?) { - Write-Host "Tests failed" - Exit 1 +foreach($feature in $features_matrix) { + Run-Tests -Features $feature } |