2021-12-14 20:38:45 +00:00
|
|
|
include:
|
|
|
|
- project: "freedesktop/ci-templates" # the project to include from
|
|
|
|
ref: "34f4ade99434043f88e164933f570301fd18b125" # git ref of that project
|
|
|
|
file: "/templates/fedora.yml" # the actual file to include
|
2022-11-14 13:40:53 +00:00
|
|
|
- local: "ci/images_template.yml"
|
2021-12-14 20:38:45 +00:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- prepare
|
|
|
|
- lint
|
|
|
|
- test
|
2022-02-07 12:03:13 +00:00
|
|
|
- release
|
2021-12-14 20:38:45 +00:00
|
|
|
|
|
|
|
variables:
|
|
|
|
FDO_UPSTREAM_REPO: "dabrain34/GstPipelineStudio"
|
2023-08-26 10:59:57 +00:00
|
|
|
GNOME_RUNTIME_IMAGE: "quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master"
|
|
|
|
WINDOWS_RUST_STABLE_IMAGE: "$CI_REGISTRY_IMAGE/windows:$GST_RS_WIN_IMG_TAG"
|
|
|
|
WINDOWS_RUST_STABLE_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows:$GST_RS_WIN_IMG_TAG"
|
2021-12-14 20:38:45 +00:00
|
|
|
|
|
|
|
# Version and tag for our current container
|
|
|
|
.fedora:
|
|
|
|
variables:
|
2023-08-25 11:36:09 +00:00
|
|
|
FDO_DISTRIBUTION_VERSION: "38"
|
2021-12-14 20:38:45 +00:00
|
|
|
# Update this to trigger a container rebuild
|
2023-08-26 10:59:57 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: "2023-08-25.1"
|
2022-03-07 08:26:23 +00:00
|
|
|
before_script:
|
|
|
|
- source ./ci/env.sh
|
|
|
|
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
|
|
|
|
# If cargo exists assume we probably will want to update
|
|
|
|
# the lockfile
|
|
|
|
#- |
|
|
|
|
# if command -v cargo; then
|
|
|
|
# cargo generate-lockfile --color=always
|
|
|
|
# cargo update --color=always
|
|
|
|
# fi
|
2021-12-14 20:38:45 +00:00
|
|
|
|
|
|
|
build-fedora-container:
|
|
|
|
extends:
|
|
|
|
- .fedora # our template job above
|
|
|
|
- .fdo.container-build@fedora@x86_64 # the CI template
|
|
|
|
stage: prepare
|
|
|
|
variables:
|
|
|
|
# clang-devel: required by rust bindgen
|
|
|
|
FDO_DISTRIBUTION_PACKAGES: >-
|
|
|
|
gtk4-devel
|
|
|
|
clang-devel
|
|
|
|
gstreamer1-devel
|
|
|
|
gstreamer1-plugins-base-devel
|
2022-01-07 17:17:12 +00:00
|
|
|
gstreamer1-plugins-bad-free-devel
|
|
|
|
ninja-build
|
|
|
|
pkg-config
|
|
|
|
python3-devel
|
|
|
|
python3-pip
|
|
|
|
python3-setuptools
|
2022-01-26 15:06:42 +00:00
|
|
|
util-linux
|
|
|
|
xorg-x11-server-Xvfb
|
2022-03-07 08:26:23 +00:00
|
|
|
wget
|
2022-09-05 16:21:33 +00:00
|
|
|
git
|
2023-04-21 10:37:10 +00:00
|
|
|
flex
|
|
|
|
bison
|
2022-01-07 17:17:12 +00:00
|
|
|
FDO_DISTRIBUTION_EXEC: >-
|
2022-03-07 08:26:23 +00:00
|
|
|
ci/install-rust.sh stable &&
|
2022-01-07 17:17:12 +00:00
|
|
|
pip3 install meson
|
2021-12-14 20:38:45 +00:00
|
|
|
|
2022-11-14 13:40:53 +00:00
|
|
|
.windows rust docker build:
|
|
|
|
stage: prepare
|
|
|
|
variables:
|
|
|
|
# Unlike the buildah/linux jobs, this file
|
|
|
|
# needs to be relative to windows-docker/ subdir
|
|
|
|
# as it makes life easier in the powershell script
|
|
|
|
#
|
|
|
|
# We also don't need a CONTEXT_DIR var as its also
|
|
|
|
# hardcoded to be windows-docker/
|
2023-08-26 10:59:57 +00:00
|
|
|
DOCKERFILE: "ci/windows-docker/Dockerfile"
|
|
|
|
GST_UPSTREAM_BRANCH: "1.22"
|
2022-11-14 13:40:53 +00:00
|
|
|
tags:
|
2023-08-26 10:59:57 +00:00
|
|
|
- "windows"
|
|
|
|
- "shell"
|
|
|
|
- "2022"
|
2022-11-14 13:40:53 +00:00
|
|
|
script:
|
|
|
|
# We need to pass an array and to resolve the env vars, so we can't use a variable:
|
2023-03-06 11:16:30 +00:00
|
|
|
- $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_GST_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "RUST_VERSION=$RUST_VERSION")
|
2022-11-14 13:40:53 +00:00
|
|
|
- "& ci/windows-docker/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
|
|
|
|
- |
|
|
|
|
if (!($?)) {
|
|
|
|
echo "Failed to build the image"
|
|
|
|
Exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
windows rust docker stable:
|
2023-08-26 10:59:57 +00:00
|
|
|
extends: ".windows rust docker build"
|
2022-11-14 13:40:53 +00:00
|
|
|
variables:
|
|
|
|
RUST_IMAGE: !reference [variables, "WINDOWS_RUST_STABLE_IMAGE"]
|
2023-08-26 10:59:57 +00:00
|
|
|
RUST_UPSTREAM_IMAGE:
|
|
|
|
!reference [variables, "WINDOWS_RUST_STABLE_UPSTREAM_IMAGE"]
|
2022-11-14 13:40:53 +00:00
|
|
|
RUST_VERSION: !reference [variables, "GST_RS_STABLE"]
|
|
|
|
|
|
|
|
.msvc2019 build:
|
|
|
|
stage: test
|
|
|
|
tags:
|
2023-08-26 10:59:57 +00:00
|
|
|
- "docker"
|
|
|
|
- "windows"
|
|
|
|
- "2022"
|
2022-11-14 13:40:53 +00:00
|
|
|
|
2022-11-14 18:55:00 +00:00
|
|
|
windows installer stable:
|
2022-11-14 13:40:53 +00:00
|
|
|
needs:
|
2023-08-26 10:59:57 +00:00
|
|
|
- job: "windows rust docker stable"
|
2022-11-14 13:40:53 +00:00
|
|
|
artifacts: false
|
|
|
|
image: "$WINDOWS_RUST_STABLE_IMAGE"
|
2023-08-26 10:59:57 +00:00
|
|
|
extends: ".msvc2019 build"
|
2022-11-14 18:55:00 +00:00
|
|
|
script:
|
2023-08-26 10:59:57 +00:00
|
|
|
- rustc --version
|
2023-03-05 19:57:26 +00:00
|
|
|
- git fetch --tags
|
2022-11-14 18:55:00 +00:00
|
|
|
- "& ./ci/build_gps.ps1"
|
2023-03-05 19:57:26 +00:00
|
|
|
- "& ./installer/wix/prepare_gstreamer.ps1"
|
|
|
|
- "& ./installer/wix/build_installer.ps1"
|
2022-11-14 18:55:00 +00:00
|
|
|
artifacts:
|
2023-08-26 10:59:57 +00:00
|
|
|
paths:
|
|
|
|
- installer/wix/*.msi
|
|
|
|
expire_in: 10 days
|
|
|
|
when: "manual"
|
2022-11-14 13:40:53 +00:00
|
|
|
|
2022-01-31 18:38:06 +00:00
|
|
|
rustfmt-clippy:
|
2021-12-14 20:38:45 +00:00
|
|
|
extends:
|
|
|
|
- .fedora
|
|
|
|
- .fdo.distribution-image@fedora
|
|
|
|
stage: lint
|
|
|
|
script:
|
2022-01-07 17:17:12 +00:00
|
|
|
- meson build
|
2021-12-14 20:38:45 +00:00
|
|
|
- cargo fmt --version
|
|
|
|
- cargo fmt -- --color=always --check
|
2022-01-31 18:38:06 +00:00
|
|
|
- cargo clippy --version
|
|
|
|
- cargo clippy --color=always --all-targets -- -D warnings
|
2021-12-14 20:38:45 +00:00
|
|
|
|
2023-04-12 20:18:32 +00:00
|
|
|
windows installer release:
|
2023-08-26 10:59:57 +00:00
|
|
|
extends: "windows installer stable"
|
2023-04-12 20:18:32 +00:00
|
|
|
stage: release
|
|
|
|
only:
|
|
|
|
- flatpak
|
|
|
|
- tags
|
|
|
|
artifacts:
|
2023-08-26 10:59:57 +00:00
|
|
|
paths:
|
|
|
|
- installer/wix/*.msi
|
|
|
|
when: "always"
|
2023-04-12 20:18:32 +00:00
|
|
|
|
2023-09-17 14:43:31 +00:00
|
|
|
linux release:
|
|
|
|
extends:
|
|
|
|
- .fedora
|
|
|
|
- .fdo.distribution-image@fedora
|
|
|
|
stage: release
|
|
|
|
only:
|
|
|
|
- flatpak
|
|
|
|
- tags
|
|
|
|
script:
|
|
|
|
- meson builddir -Dbuildtype=release
|
|
|
|
- ninja -C builddir/ dist
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- builddir/meson-dist/*
|
|
|
|
when: "always"
|
|
|
|
|
2021-12-14 20:38:45 +00:00
|
|
|
test-stable:
|
|
|
|
extends:
|
|
|
|
- .fedora
|
|
|
|
- .fdo.distribution-image@fedora
|
|
|
|
stage: test
|
|
|
|
script:
|
2022-01-07 17:17:12 +00:00
|
|
|
- meson build
|
2021-12-14 20:38:45 +00:00
|
|
|
- rustc --version
|
|
|
|
- cargo build --color=always --all-targets
|
2022-01-26 15:06:42 +00:00
|
|
|
- >
|
|
|
|
xvfb-run -a -s "-screen 0 1024x768x24"
|
|
|
|
cargo test --color=always
|
2021-12-14 20:38:45 +00:00
|
|
|
|
2022-01-19 11:26:39 +00:00
|
|
|
rustdoc:
|
2021-12-14 20:38:45 +00:00
|
|
|
extends:
|
|
|
|
- .fedora
|
|
|
|
- .fdo.distribution-image@fedora
|
2022-02-07 12:03:13 +00:00
|
|
|
stage: release
|
2022-02-07 10:59:37 +00:00
|
|
|
only:
|
|
|
|
- flatpak
|
|
|
|
- tags
|
2021-12-14 20:38:45 +00:00
|
|
|
variables:
|
|
|
|
RUSTDOCFLAGS: "-Dwarnings"
|
|
|
|
script:
|
2022-01-07 17:17:12 +00:00
|
|
|
- meson build
|
2021-12-14 20:38:45 +00:00
|
|
|
- rustdoc --version
|
|
|
|
- cargo doc --no-deps
|
|
|
|
|
2022-02-07 12:03:13 +00:00
|
|
|
dist-package:
|
|
|
|
extends:
|
|
|
|
- .fedora
|
|
|
|
- .fdo.distribution-image@fedora
|
|
|
|
stage: release
|
|
|
|
only:
|
|
|
|
- flatpak
|
|
|
|
script:
|
|
|
|
- meson build
|
|
|
|
- ninja -C build dist
|
|
|
|
|
2022-01-14 12:19:11 +00:00
|
|
|
flatpak:
|
2022-03-07 08:26:23 +00:00
|
|
|
image: $GNOME_RUNTIME_IMAGE
|
2023-04-13 09:16:47 +00:00
|
|
|
stage: test
|
2022-01-14 12:19:11 +00:00
|
|
|
variables:
|
2022-01-14 15:32:09 +00:00
|
|
|
MANIFEST_PATH: "build-aux/org.freedesktop.dabrain34.GstPipelineStudio.Devel.json"
|
|
|
|
APP_ID: "org.freedesktop.dabrain34.GstPipelineStudio.Devel"
|
2023-04-13 09:16:47 +00:00
|
|
|
BUNDLE: "gst-pipeline-studio-nightly.flatpak"
|
2022-01-14 12:19:11 +00:00
|
|
|
script:
|
|
|
|
- flatpak-builder app ${MANIFEST_PATH}
|
|
|
|
- flatpak build-export repo app
|
|
|
|
- flatpak build-bundle repo ${BUNDLE} ${APP_ID}
|
|
|
|
artifacts:
|
2022-01-14 15:32:09 +00:00
|
|
|
name: "Flatpak artifacts"
|
|
|
|
expose_as: "Get Flatpak bundle here"
|
|
|
|
when: "always"
|
2022-01-14 12:19:11 +00:00
|
|
|
paths:
|
2022-01-14 15:32:09 +00:00
|
|
|
- "${BUNDLE}"
|
|
|
|
expire_in: 14 days
|
2023-04-13 09:16:47 +00:00
|
|
|
cache:
|
|
|
|
key: "flatpak"
|
|
|
|
paths:
|
|
|
|
- .flatpak-builder/downloads/
|
|
|
|
- .flatpak-builder/git/
|
|
|
|
- target/
|
|
|
|
- target_test/
|
2023-08-26 10:59:57 +00:00
|
|
|
when: "manual"
|
2022-03-18 22:49:47 +00:00
|
|
|
|
|
|
|
macos installer stable:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- gst-macos-11.1
|
|
|
|
before_script:
|
|
|
|
- pip3 install --upgrade pip
|
|
|
|
# Make sure meson is up to date
|
|
|
|
- pip3 install -U meson
|
|
|
|
# Need to install certificates for python
|
|
|
|
- pip3 install --upgrade certifi
|
|
|
|
# Another way to install certificates
|
|
|
|
- open /Applications/Python\ 3.8/Install\ Certificates.command
|
|
|
|
# Get ninja
|
|
|
|
- pip3 install -U ninja
|
|
|
|
script:
|
|
|
|
# rust toolchain
|
|
|
|
- curl https://sh.rustup.rs -sSf | sh -s -- -y
|
|
|
|
- source $HOME/.cargo/env
|
|
|
|
# brew install
|
|
|
|
- /bin/bash -c "./installer/macos/brew_setup.sh"
|
|
|
|
- /bin/bash -c "./installer/macos/deploy_macos.sh"
|
|
|
|
artifacts:
|
|
|
|
name: "MacOS installer"
|
|
|
|
paths:
|
|
|
|
- installer/**/GstPipelineStudio*.dmg
|
|
|
|
- installer/**/GstPipelineStudio*.tar.gz
|
|
|
|
expire_in: 14 days
|
2023-08-26 10:59:57 +00:00
|
|
|
when: "manual"
|
2022-03-18 22:49:47 +00:00
|
|
|
|
|
|
|
macos installer release:
|
2023-08-26 10:59:57 +00:00
|
|
|
extends: "macos installer stable"
|
2022-03-18 22:49:47 +00:00
|
|
|
stage: release
|
|
|
|
only:
|
|
|
|
- flatpak
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
name: "MacOS installer"
|
|
|
|
paths:
|
|
|
|
- installer/**/GstPipelineStudio*.dmg
|
|
|
|
- installer/**/GstPipelineStudio*.tar.gz
|
2023-08-26 10:59:57 +00:00
|
|
|
when: "always"
|