Welcome to mirror list, hosted at ThFree Co, Russian Federation.

run_windows_tests.ps1 « ci - github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 14e506458ff11933167a75d11ef787c4b9321e7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$env:ErrorActionPreference='Stop'

[string[]] $exclude_crates = @(
    "--exclude",
    "gst-plugin-csound",
    "--exclude",
    "gst-plugin-webp"
)

[string[]] $features_matrix = @(
    "--no-default-features",
    "",
    "--all-features"
)

function Run-Tests {
    param (
        $Features
    )
    $local_exclude = $exclude_crates;

    # In this case the plugin will pull x11/wayland features
    # which will fail to build on windows.
    if (($Features -eq '--all-features') -or ($Features -eq '')) {
        $local_exclude += @("--exclude", "gst-plugin-gtk4")
    }

    Write-Host "Features: $Features"
    Write-Host "Exclude string: $local_exclude"

    cargo build --color=always --workspace $local_exclude --all-targets $Features

    if (!$?) {
        Write-Host "Build failed"
        Exit 1
    }

    $env:G_DEBUG="fatal_warnings"
    cargo test --no-fail-fast --color=always --workspace $local_exclude --all-targets $Features

    if (!$?) {
        Write-Host "Tests failed"
        Exit 1
    }
}

foreach($feature in $features_matrix) {
    Run-Tests -Features $feature
}