diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-05-26 01:25:05 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-05-26 03:17:31 +0530 |
commit | 55239c4ca21af48c154370a2fa7b07460af5f861 (patch) | |
tree | d5f8d21f7c0725eb97d259b26738ffa9c21afb97 | |
parent | a47df351ca045ccd9f31c7fea1810d8e3603eb9e (diff) |
ci: Add jobs for MSVC, macOS, iOS, Android
-rw-r--r-- | .gitlab-ci.yml | 175 |
1 files changed, 167 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79aecd9..f98e4ea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,24 +83,26 @@ build-container-aarch64: extends: - .fdo.distribution-image@ubuntu script: - - meson build --wrap-mode=nofallback - - cd build - - ninja + - meson setup --wrap-mode=nofallback builddir + - ninja -C builddir artifacts: + expire_in: '5 days' + when: 'always' paths: - - build/ + - "builddir/meson-logs/*txt" .build-vendored-absl: stage: build extends: - .fdo.distribution-image@ubuntu script: - - meson build --force-fallback-for=abseil-cpp - - cd build - - ninja + - meson setup --force-fallback-for=abseil-cpp builddir + - ninja -C builddir artifacts: + expire_in: '5 days' + when: 'always' paths: - - build/ + - "builddir/meson-logs/*txt" build-distro-absl-x86_64: extends: @@ -121,3 +123,160 @@ build-vendored-absl-aarch64: extends: - .build-vendored-absl - .ubuntu-aarch64 + +# Update from: +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/.gitlab-ci.yml +# https://gitlab.freedesktop.org/gstreamer/orc/-/blob/main/.gitlab-ci.yml +vs2019 amd64: + # Update from https://gitlab.freedesktop.org/gstreamer/gstreamer/container_registry + image: 'registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2023-04-21.0-main' + stage: 'build' + tags: + - 'docker' + - 'windows' + - '2022' + artifacts: + expire_in: '5 days' + when: 'always' + paths: + - "builddir/meson-logs/*txt" + variables: + # Make sure any failure in PowerShell scripts is fatal + ErrorActionPreference: 'Stop' + WarningPreference: 'Stop' + ARCH: 'amd64' + PLAT: 'Desktop' + before_script: + # Make sure meson is up to date, so we don't need to rebuild the image with each release + - pip3 install -U meson ninja + script: + # Gitlab executes PowerShell in docker, but VsDevCmd.bat is a batch script. + # Environment variables substitutions is done by PowerShell before calling + # cmd.exe, that's why we use $env:FOO instead of %FOO% + - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH -app_platform=$env:PLAT && + meson setup builddir && + meson compile --verbose -C builddir" + +# Update from: +# https://gitlab.freedesktop.org/gstreamer/cerbero/-/blob/main/.gitlab-ci.yml +# https://gitlab.freedesktop.org/gstreamer/orc/-/blob/main/.gitlab-ci.yml +macos x86_64: + stage: 'build' + tags: + - gst-macos-13 + artifacts: + expire_in: '5 days' + when: 'always' + paths: + - "builddir/meson-logs/*txt" + before_script: + - pip3 install --upgrade pip + # Need to install certificates for python + - pip3 install --upgrade certifi + # Anther way to install certificates + - open /Applications/Python\ 3.8/Install\ Certificates.command + # Make sure meson and ninja are up to date + - pip3 install -U meson ninja + script: + - CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH} + - meson setup builddir + - meson compile --verbose -C builddir + +# Update from: +# https://gitlab.freedesktop.org/gstreamer/cerbero/-/blob/main/.gitlab-ci.yml +# https://gitlab.freedesktop.org/gstreamer/orc/-/blob/main/.gitlab-ci.yml +ios arm64: + stage: 'build' + tags: + - gst-ios-16 + artifacts: + name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}" + expire_in: '5 days' + when: 'always' + paths: + - "builddir/meson-logs/*txt" + before_script: + - pip3 install --upgrade pip + # Need to install certificates for python + - pip3 install --upgrade certifi + # Anther way to install certificates + - open /Applications/Python\ 3.8/Install\ Certificates.command + # Make sure meson and ninja are up to date + - pip3 install -U meson ninja + script: + - CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH} + - | + cat > ios-cross-file.txt <<EOF + [host_machine] + system = 'darwin' + cpu_family = 'aarch64' + cpu = 'aarch64' + endian = 'little' + + [properties] + c_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0'] + objc_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0'] + cpp_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0'] + objcpp_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0'] + c_link_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0'] + objc_link_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0'] + cpp_link_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0'] + objcpp_link_args = ['-arch', 'arm64', '--sysroot=$(xcrun --sdk iphoneos --show-sdk-path)', '-miphoneos-version-min=8.0'] + + [binaries] + ar = '$(xcrun --find --sdk iphoneos ar)' + c = '$(xcrun --find --sdk iphoneos clang)' + objc = '$(xcrun --find --sdk iphoneos clang)' + cpp = '$(xcrun --find --sdk iphoneos clang++)' + objcpp = '$(xcrun --find --sdk iphoneos clang++)' + ranlib = '$(xcrun --find --sdk iphoneos ranlib)' + strip = '$(xcrun --find --sdk iphoneos strip)' + pkgconfig = 'false' + cmake = 'false' + EOF + - meson setup --cross-file ios-cross-file.txt builddir + - meson compile --verbose -C builddir + +# Update from: +# https://gitlab.freedesktop.org/gstreamer/cerbero/-/blob/main/.gitlab-ci.yml +# https://gitlab.freedesktop.org/gstreamer/orc/-/blob/main/.gitlab-ci.yml +android fedora arm64: + # Update from https://gitlab.freedesktop.org/gstreamer/cerbero/container_registry + image: 'registry.freedesktop.org/gstreamer/cerbero/amd64/android-fedora:2021-10-22.0-1.18' + stage: 'build' + artifacts: + expire_in: '5 days' + when: 'always' + paths: + - "builddir/meson-logs/*.txt" + before_script: + - dnf install -y python3-pip gcc ninja-build + - pip3 install --user meson + script: + - export PATH="$HOME/.local/bin:$PATH" + - | + cat > android-cross-file.txt <<EOF + [constants] + ndk_path = '/android/ndk' + toolchain = ndk_path + '/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android' + api = '28' + + [host_machine] + system = 'android' + cpu_family = 'aarch64' + cpu = 'aarch64' + endian = 'little' + + [properties] + sys_root = ndk_path + '/sysroot' + c_link_args = ['-fuse-ld=gold'] + cpp_link_args = ['-fuse-ld=gold'] + + [binaries] + c = toolchain + api + '-clang' + cpp = toolchain + api + '-clang++' + ar = toolchain + '-ar' + strip = toolchain + '-strip' + EOF + - meson setup --cross-file android-cross-file.txt builddir + - meson compile --verbose -C builddir |