include: - project: 'freedesktop/ci-templates' ref: 'master' file: '/templates/fedora.yml' stages: - 'build docker' - 'build' # Use the resulting binaries - 'integrate' variables: # CI_GSTREAMER_* variables are overridden by gstreamer's CI when it triggers cerbero CI. CI_GSTREAMER_REF_NAME: '1.22' CI_GSTREAMER_URL: 'https://gitlab.freedesktop.org/gstreamer/gstreamer.git' CI_GSTREAMER_TRIGGERED: 'false' GST_UPSTREAM_BRANCH: '1.22' WINDOWS_IMAGE: 'registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2023-02-01.0-1.22' DEFAULT_CERBERO_ARGS: > --variants werror --timestamps workflow: rules: - if: $CI_MERGE_REQUEST_IID - if: $CI_COMMIT_TAG - if: $CI_COMMIT_BRANCH # # Global CI policy # # This can be used to configure global behaviour our our jobs. # default: retry: max: 2 when: - 'runner_system_failure' - 'stuck_or_timeout_failure' - 'scheduler_failure' - 'api_failure' interruptible: true .fedora image: variables: ### # IMPORTANT # These are the version tags for the docker images the CI runs against. # If you are hacking on them or need a them to rebuild, its enough # to change any part of the string of the image you want. ### FDO_DISTRIBUTION_TAG: '2022-12-24.0' FDO_DISTRIBUTION_VERSION: '36' FDO_DISTRIBUTION_PACKAGES: sudo git-core lbzip2 rsync wine which python3-distro FDO_DISTRIBUTION_EXEC: ci/docker_setup.sh FDO_UPSTREAM_REPO: gstreamer/cerbero .android fedora image: variables: ### # IMPORTANT # These are the version tags for the docker images the CI runs against. # If you are hacking on them or need a them to rebuild, its enough # to change any part of the string of the image you want. ### FDO_DISTRIBUTION_TAG: '2022-12-24.0' FDO_DISTRIBUTION_VERSION: '36' FDO_DISTRIBUTION_PACKAGES: file git-core java-11-openjdk-devel lbzip2 python3-distro make pkg-config unzip which xz FDO_DISTRIBUTION_EXEC: ci/docker_android_setup.sh $ANDROID_HOME $ANDROID_NDK_HOME $GST_UPSTREAM_BRANCH FDO_UPSTREAM_REPO: gstreamer/cerbero FDO_REPO_SUFFIX: android ANDROID_HOME: "/android/sdk" ANDROID_NDK_HOME: "/android/ndk" .manual trigger: rules: # If this pipeline is triggered from gstreamer, trigger the pipeline automatically - if: '$CI_PIPELINE_SOURCE == "pipeline"' # If this matches, it means the pipeline is running against either the main # or a stable branch, so make it automatic cause they need to update artifacts, # like the docs site or cerbero deps - if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH' # If the MR is assigned to the Merge bot, trigger the pipeline automatically - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"' # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline # to avoid wasting CI resources - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"' when: 'manual' fedora image: stage: "build docker" extends: - .manual trigger - .fedora image - .fdo.container-build@fedora variables: GIT_STRATEGY: none android fedora image: stage: "build docker" extends: - .manual trigger - .android fedora image - .fdo.container-build@fedora variables: GIT_STRATEGY: none # Template for all Cerbero GStreamer builds # # Parameters: # CONFIG: The name of the configuration file to use # ARCH: The cerbero _ (used in cache key) # .cerbero: stage: "build" extends: - .fedora image - .fdo.distribution-image@fedora # Ensure that the runners it will be executed on # will have plenty of space for the cache tags: ['gstreamer'] timeout: '3h' variables: CCACHE_COMPILERCHECK: "content" CCACHE_COMPRESS: "true" CCACHE_BASEDIR: "/cache/gstreamer/cerbero/" CCACHE_DIR: "/cache/gstreamer/cerbero/ccache/" # shared across everything really CCACHE_MAXSIZE: "50G" CERBERO_HOME: "cerbero-build" CERBERO_SOURCES: "cerbero-sources" CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS}" CERBERO: "./cerbero-uninstalled -c config/${CONFIG} -c localconf.cbc" CERBERO_PACKAGE_ARGS: "-t" CERBERO_RUN_SUFFIX: "" # '.exe' on cross-winXX CERBERO_BOOTSTRAP_SYSTEM: "no" HAVE_CCACHE: "yes" # used by macos packages as we only ever install to a fixed directory CERBERO_OVERRIDDEN_DIST_DIR: "" # location where the cerbero git repo is stored on the image CERBERO_HOST_DIR: "/" before_script: - echo $CI_PIPELINE_SOURCE # cmake takes forever to bootstrap from source - test $(uname) = Darwin && pip3 install cmake==3.24.* - ./ci/cerbero_setup.sh cerbero_before_script cache: key: "${CI_JOB_NAME}" paths: - "${CERBERO_SOURCES}" artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}" expire_in: '5 days' when: 'always' paths: - "*/logs" - "*/sources/*/*/_builddir/meson-logs/meson-log.txt" - "*/sources/*/*/_builddir/CMakeFiles/CMakeError.log" - "*/sources/*/*/_builddir/CMakeFiles/CMakeLog.log" - "*.tar.*" # Template for Cerbero GStreamer Deps # # This template is used by cerbero/ project to pre-built the GStreamer # dependencies. When available, the .cerbero jobs will download this artifact # in order to speed up the build. # # Parameters: # CONFIG: The name of the configuration file to use # ARCH: The cerbero _ (used in cache key) # # Produce an artifact with the dist/ and .cache along # with the associated build-tools. .cerbero deps: extends: .cerbero rules: - if: '$CI_GSTREAMER_TRIGGERED != "true" || $CI_PROJECT_NAMESPACE != "gstreamer"' script: - ./ci/cerbero_setup.sh cerbero_deps_script # Template for Cerbero GStreamer MR Pipelines # # This template is used when a cerbero pipeline is triggered by a merge request # in another project such as gstreamer running inside the GSTreamer namespace # which implies that the default cerbero branch is used. In that case, we fetch # a cache (if available) and use it instead of building from scratch. .cerbero mr: extends: .cerbero rules: - if: '$CI_GSTREAMER_TRIGGERED == "true" && $CI_PROJECT_NAMESPACE == "gstreamer"' script: - ./ci/cerbero_setup.sh cerbero_script # Don't interrupt gstreamer MR CI when cerbero main gets pushes interruptible: false # # Cerbero Linux X86_64 build # cerbero deps fedora x86_64: extends: '.cerbero deps' variables: CONFIG: "linux.config" ARCH: "linux_x86_64" build cerbero fedora x86_64: extends: '.cerbero mr' variables: CONFIG: "linux.config" # # Cerbero Android Universal build # .cerbero cross-android universal: variables: CONFIG: "cross-android-universal.cbc" ARCH: "android_universal" artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}" expire_in: '5 days' when: 'always' paths: - "*/logs" - "*/sources/*/*/*/_builddir/meson-logs/meson-log.txt" - "*/sources/*/*/*/_builddir/CMakeFiles/CMakeError.log" - "*/sources/*/*/*/_builddir/CMakeFiles/CMakeLog.log" - "*[0-9].tar.*" cerbero deps cross-android universal: extends: - '.cerbero deps' - '.cerbero cross-android universal' build cerbero cross-android universal: extends: - '.cerbero mr' - '.cerbero cross-android universal' # # Cerbero Cross Windows builds # cerbero deps cross-windows x86: extends: '.cerbero deps' variables: CONFIG: "cross-win32.cbc" ARCH: "mingw_x86" CERBERO_RUN_SUFFIX: ".exe" build cerbero cross win32: extends: '.cerbero mr' variables: CONFIG: "cross-win32.cbc" CERBERO_RUN_SUFFIX: ".exe" cerbero deps cross-windows x86_64: extends: '.cerbero deps' variables: CONFIG: "cross-win64.cbc" ARCH: "mingw_x86_64" CERBERO_RUN_SUFFIX: ".exe" build cerbero cross win64: extends: '.cerbero mr' variables: CONFIG: "cross-win64.cbc" CERBERO_RUN_SUFFIX: ".exe" # # Build an Android App using the android binaries # .cross-android universal examples: # Ensure that the runners it will be executed on # will have plenty of space for the cache tags: ['gstreamer'] extends: - .android fedora image - .fdo.suffixed-image@fedora stage: 'integrate' variables: EXAMPLES_HOME: ${CI_PROJECT_DIR}/gstreamer/subprojects GSTREAMER_ROOT_ANDROID: ${CI_PROJECT_DIR}/cerbero-android-universal script: # Clone gstreamer repository to get gst-examples and gst-docs - rm -rf gstreamer - git clone $CI_GSTREAMER_URL -b $CI_GSTREAMER_REF_NAME --depth 1 - mkdir -p ${EXAMPLES_HOME}/outputs # extract our binaries - rm -f gstreamer-1.0-android-universal-*-runtime.tar.* - mkdir ${GSTREAMER_ROOT_ANDROID} - time tar -C ${GSTREAMER_ROOT_ANDROID} -xf gstreamer-1.0-android-universal-*.tar.* # gst-examples - player - chmod +x ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew - ./ci/run_retry.sh ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-examples/playback/player/android assembleDebug - cp ${EXAMPLES_HOME}/gst-examples/playback/player/android/app/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/ # gst-examples - vulkan - chmod +x ${EXAMPLES_HOME}/gst-examples/vulkan/android/gradlew - ./ci/run_retry.sh ${EXAMPLES_HOME}/gst-examples/vulkan/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-examples/vulkan/android assembleDebug - cp ${EXAMPLES_HOME}/gst-examples/vulkan/android/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/ # gst-docs android tutorials - chmod +x ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew - ./ci/run_retry.sh ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android assembleDebug - cp ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/android-tutorial-*/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/ after_script: - rm -rf ${GSTREAMER_ROOT_ANDROID} gstreamer artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}" expire_in: '5 days' when: 'always' paths: - "${EXAMPLES_HOME}/outputs" cross-android universal examples: extends: ".cross-android universal examples" rules: - if: '$CI_GSTREAMER_TRIGGERED == "true" && $CI_PROJECT_NAMESPACE == "gstreamer"' needs: - "build cerbero cross-android universal" cerbero cross-android universal examples: extends: ".cross-android universal examples" rules: - if: '$CI_GSTREAMER_TRIGGERED != "true" || $CI_PROJECT_NAMESPACE != "gstreamer"' needs: - "cerbero deps cross-android universal" # # Cerbero macOS Universal build # .cerbero cross-macos universal: variables: ARCH: "darwin_universal" CONFIG: "cross-macos-universal.cbc" CERBERO_PACKAGE_ARGS: "" HAVE_CCACHE: "" CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/" tags: - gst-macos-13 artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}" expire_in: '5 days' when: 'always' paths: - "*/logs" - "*/sources/*/*/*/_builddir/meson-logs/meson-log.txt" - "*/sources/*/*/*/_builddir/CMakeFiles/CMakeError.log" - "*/sources/*/*/*/_builddir/CMakeFiles/CMakeLog.log" - "gstreamer-1.0-1.*.pkg" - "gstreamer-1.0-devel-1.*.pkg" cerbero deps cross-macos universal: extends: - '.cerbero deps' - '.cerbero cross-macos universal' build cerbero cross-macos universal: extends: - '.cerbero mr' - '.cerbero cross-macos universal' # # Cerbero iOS build # .cerbero cross-ios universal: variables: ARCH: "ios_universal" CONFIG: "cross-ios-universal.cbc" CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror" CERBERO_PACKAGE_ARGS: "" HAVE_CCACHE: "" CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/" tags: - gst-ios-16 artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}" expire_in: '5 days' when: 'always' paths: - "*/logs" - "*/sources/*/*/*/_builddir/meson-logs/meson-log.txt" - "*/sources/*/*/*/_builddir/CMakeFiles/CMakeError.log" - "*/sources/*/*/*/_builddir/CMakeFiles/CMakeLog.log" - "gstreamer-1.0-*-ios-universal.pkg" cerbero deps cross-ios universal: extends: - '.cerbero deps' - '.cerbero cross-ios universal' build cerbero cross-ios universal: extends: - '.cerbero mr' - '.cerbero cross-ios universal' # # Build an iOS App using the iOS binaries # .cross-ios universal examples: stage: 'integrate' variables: EXAMPLES_HOME: gstreamer/subprojects # disable codesigning so we don't need developer identities on the CI # machines XCODE_BUILD_ARGS: > CODE_SIGNING_REQUIRED="NO" CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED="NO" CODE_SIGN_ENTITLEMENTS="" script: # install the binaries - installer -pkg gstreamer-1.0-devel-*-ios-universal.pkg -target CurrentUserHomeDirectory -verbose # Clone gstreamer repository to get gst-examples and gst-docs - git clone $CI_GSTREAMER_URL -b $CI_GSTREAMER_REF_NAME --depth 1 # dump some useful information - xcodebuild -version - xcodebuild -showsdks # gst-docs ios tutorials - ./ci/run_retry.sh xcodebuild -showBuildSettings -alltargets -project ${EXAMPLES_HOME}/gst-docs/examples/tutorials/xcode\ iOS/GStreamer\ iOS\ Tutorials.xcodeproj - ./ci/run_retry.sh xcodebuild -alltargets -destination generic/platform=iOS -project ${EXAMPLES_HOME}/gst-docs/examples/tutorials/xcode\ iOS/GStreamer\ iOS\ Tutorials.xcodeproj ${XCODE_BUILD_ARGS} # gst-examples - ./ci/run_retry.sh xcodebuild -showBuildSettings -alltargets -project ${EXAMPLES_HOME}/gst-examples/playback/player/ios/GstPlay.xcodeproj - ./ci/run_retry.sh xcodebuild -alltargets -destination generic/platform=iOS -project ${EXAMPLES_HOME}/gst-examples/playback/player/ios/GstPlay.xcodeproj ${XCODE_BUILD_ARGS} after_script: - rm -rf gstreamer tags: - gst-ios-16 cross-ios universal examples: extends: ".cross-ios universal examples" rules: - if: '$CI_GSTREAMER_TRIGGERED == "true" && $CI_PROJECT_NAMESPACE == "gstreamer"' needs: - "build cerbero cross-ios universal" cerbero cross-ios universal examples: extends: ".cross-ios universal examples" rules: - if: '$CI_GSTREAMER_TRIGGERED != "true" || $CI_PROJECT_NAMESPACE != "gstreamer"' needs: - "cerbero deps cross-ios universal" # # Cerbero Native Windows builds # .cerbero windows native: image: $WINDOWS_IMAGE tags: - 'docker' - 'windows' - 'gstreamer-windows' - '2022' variables: CONFIG: 'win64.cbc' ARCH: 'msvc_x86_64' CERBERO_HOST_DIR: "C:/cerbero" CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v visualstudio -v nowerror" CERBERO_RUN_SUFFIX: ".exe" CERBERO_BOOTSTRAP_SYSTEM: "no" HAVE_CCACHE: "" before_script: - $env:CI_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\', '/') - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && ./ci/cerbero_setup.sh cerbero_before_script" cerbero deps msvc x86_64: extends: ['.cerbero deps', '.cerbero windows native'] script: - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && ./ci/cerbero_setup.sh cerbero_deps_script" build cerbero msvc x86_64: extends: ['.cerbero mr', '.cerbero windows native'] script: - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && ./ci/cerbero_setup.sh cerbero_script" # FIXME: UWP build is disabled until build issues with latest GLib version are sorted out cerbero deps uwp universal: extends: ['cerbero deps msvc x86_64'] variables: CONFIG: 'cross-uwp-universal.cbc' ARCH: 'uwp_universal' CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror" script: - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && ./ci/cerbero_setup.sh cerbero_deps_script" - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && CERBERO_ARGS='$env:CERBERO_ARGS,vscrt=mdd' && ./ci/cerbero_setup.sh cerbero_deps_script" when: 'manual' # FIXME: UWP build is disabled until build issues with latest GLib version are sorted out build cerbero uwp universal: extends: ['build cerbero msvc x86_64'] variables: CONFIG: 'cross-uwp-universal.cbc' ARCH: 'uwp_universal' CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror" script: - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && ./ci/cerbero_setup.sh cerbero_script" - C:\MinGW\msys\1.0\bin\bash.exe --login -c "cd $env:CI_PROJECT_DIR && CERBERO_ARGS='$env:CERBERO_ARGS,vscrt=mdd' && ./ci/cerbero_setup.sh cerbero_script" when: 'manual'