mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 11:30:59 +00:00
ci: Add visual studio/msvc builds
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/841>
This commit is contained in:
parent
4616e3225c
commit
de3972a707
2 changed files with 109 additions and 0 deletions
|
@ -10,6 +10,10 @@ include:
|
||||||
variables:
|
variables:
|
||||||
FDO_UPSTREAM_REPO: gstreamer/gst-plugins-rs
|
FDO_UPSTREAM_REPO: gstreamer/gst-plugins-rs
|
||||||
|
|
||||||
|
WINDOWS_BASE: "registry.freedesktop.org/gstreamer/gstreamer-rs/windows"
|
||||||
|
WINDOWS_RUST_MINIMUM_IMAGE: "$WINDOWS_BASE:$GST_RS_IMG_TAG-main-$GST_RS_MSRV"
|
||||||
|
WINDOWS_RUST_STABLE_IMAGE: "$WINDOWS_BASE:$GST_RS_IMG_TAG-main-$GST_RS_STABLE"
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_MERGE_REQUEST_IID
|
- if: $CI_MERGE_REQUEST_IID
|
||||||
|
@ -256,6 +260,42 @@ gst-build:
|
||||||
- 'build/meson-logs/'
|
- 'build/meson-logs/'
|
||||||
- 'build-gst-full/meson-logs/'
|
- 'build-gst-full/meson-logs/'
|
||||||
|
|
||||||
|
.msvc2019 build:
|
||||||
|
stage: 'test'
|
||||||
|
tags:
|
||||||
|
- 'docker'
|
||||||
|
- 'windows'
|
||||||
|
- '2022'
|
||||||
|
parallel:
|
||||||
|
matrix:
|
||||||
|
- FEATURES:
|
||||||
|
- "--no-default-features"
|
||||||
|
- "--all-features"
|
||||||
|
- ""
|
||||||
|
script:
|
||||||
|
- echo $env:FEATURES
|
||||||
|
|
||||||
|
# Set the code page to UTF-8
|
||||||
|
- chcp 65001
|
||||||
|
|
||||||
|
# We need to build each crate separately to choose that can build on windows
|
||||||
|
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 &&
|
||||||
|
powershell ./ci/run_windows_tests.ps1"
|
||||||
|
|
||||||
|
- |
|
||||||
|
if (!$?) {
|
||||||
|
Write-Host "Tests Failed!"
|
||||||
|
Exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
test windows msrv:
|
||||||
|
extends: '.msvc2019 build'
|
||||||
|
image: $WINDOWS_RUST_MINIMUM_IMAGE
|
||||||
|
|
||||||
|
test windows stable:
|
||||||
|
extends: '.msvc2019 build'
|
||||||
|
image: "$WINDOWS_RUST_STABLE_IMAGE"
|
||||||
|
|
||||||
rustfmt:
|
rustfmt:
|
||||||
extends: .img-stable
|
extends: .img-stable
|
||||||
stage: "lint"
|
stage: "lint"
|
||||||
|
|
69
ci/run_windows_tests.ps1
Normal file
69
ci/run_windows_tests.ps1
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
$env:ErrorActionPreference='Stop'
|
||||||
|
|
||||||
|
# List of all the crates we want to build
|
||||||
|
# We need to do this manually to avoid trying
|
||||||
|
# to build the ones which can't work on windows
|
||||||
|
[string[]] $crates = @(
|
||||||
|
# Same as default-members in Cargo.toml
|
||||||
|
"tutorial",
|
||||||
|
"version-helper",
|
||||||
|
"audio/audiofx",
|
||||||
|
"audio/claxon",
|
||||||
|
"audio/lewton",
|
||||||
|
"generic/file",
|
||||||
|
"generic/fmp4",
|
||||||
|
"generic/threadshare",
|
||||||
|
"net/onvif",
|
||||||
|
"net/raptorq",
|
||||||
|
"net/reqwest",
|
||||||
|
"net/aws",
|
||||||
|
"utils/fallbackswitch",
|
||||||
|
"utils/togglerecord",
|
||||||
|
"utils/tracers",
|
||||||
|
"utils/uriplaylistbin",
|
||||||
|
"video/cdg",
|
||||||
|
"video/ffv1",
|
||||||
|
"video/flavors",
|
||||||
|
"video/gif",
|
||||||
|
"video/rav1e",
|
||||||
|
"video/rspng",
|
||||||
|
"video/hsv",
|
||||||
|
"text/ahead",
|
||||||
|
"text/wrap",
|
||||||
|
"text/json",
|
||||||
|
"text/regex",
|
||||||
|
|
||||||
|
# Extra crates that can be built
|
||||||
|
# "audio/csound",
|
||||||
|
"audio/spotify",
|
||||||
|
"generic/sodium",
|
||||||
|
"net/hlssink3",
|
||||||
|
"video/closedcaption",
|
||||||
|
"video/dav1d",
|
||||||
|
"video/gtk4",
|
||||||
|
"video/videofx"
|
||||||
|
# "video/webp",
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach($crate in $crates)
|
||||||
|
{
|
||||||
|
Write-Host "Building crate: $crate"
|
||||||
|
Write-Host "Features: $env:FEATURES"
|
||||||
|
$env:LocalFeatures = $env:FEATURES
|
||||||
|
|
||||||
|
Write-Host "with features: $env:LocalFeatures"
|
||||||
|
cargo build --color=always --manifest-path $crate/Cargo.toml --all-targets $env:LocalFeatures
|
||||||
|
|
||||||
|
if (!$?) {
|
||||||
|
Write-Host "Failed to build crate: $crate"
|
||||||
|
Exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$env:G_DEBUG="fatal_warnings"
|
||||||
|
cargo test --no-fail-fast --color=always --manifest-path $crate/Cargo.toml --all-targets $env:LocalFeatures
|
||||||
|
|
||||||
|
if (!$?) {
|
||||||
|
Write-Host "Tests failed to for crate: $crate"
|
||||||
|
Exit 1
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue