From: René de Hesselle Date: Thu, 19 Oct 2023 14:22:54 +0000 (+0200) Subject: ci: Backport CI yaml from main X-Git-Tag: archive/raspbian/4.12.4+ds-3+rpi1^2~21^2^2~30^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0f8b9c73cdd8cec8714bc8eea59cf56f13603036;p=gtk4.git ci: Backport CI yaml from main This makes the CI yaml identical to the one in main, which changes two things: - modernize workflow configuration - use a new macOS runner for macOS CI --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a3332abea..cffc7a824f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,8 +30,16 @@ variables: workflow: rules: - - if: $CI_COMMIT_TAG + # run merge request pipelines + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + # do not run branch pipelines if corresponding merge requests exist... + # (this avoids duplicate pipelines) + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS + when: never + # ...but otherwise run branch pipelines - if: $CI_COMMIT_BRANCH + # run tag pipelines + - if: $CI_COMMIT_TAG default: retry: @@ -197,28 +205,44 @@ msys2-mingw64: paths: - "${CI_PROJECT_DIR}/_build/gtkdll.tar.gz" -macos: - # Sadly, this fails regularly, and its failure is never enlightening - allow_failure: true +macos-x86_64: rules: + # Do not run in forks as the runner is not available there. - if: $CI_PROJECT_NAMESPACE == "GNOME" stage: build tags: - - macos + - macosintel needs: [] + variables: + MESON_FORCE_BACKTRACKE: 1 + TMPDIR: /Users/Shared/work/tmp + SDKROOT: /opt/sdks/MacOSX10.13.4.sdk + PIP_CACHE_DIR: /Users/Shared/build/cache + PIPENV_CACHE_DIR: $PIP_CACHE_DIR + PYTHONPYCACHEPREFIX: $PIP_CACHE_DIR + EXTRA_MESON_FLAGS: "-Dgobject-introspection:werror=false" before_script: + # Not using ccache on purpose as it accelerates the build so much that it + # can trigger race conditions in the gobject-introspection subproject. - bash .gitlab-ci/show-info-osx.sh - - pip3 install --user meson~=1.0 - - pip3 install --user ninja - - export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH - - export MESON_FORCE_BACKTRACE=1 + - /opt/macports/bin/python3.10 -m venv .venv + - ln -s /opt/cmake/CMake.app/Contents/bin/cmake .venv/bin + - ln -s /opt/pkg-config/bin/pkg-config .venv/bin + - ln -s /opt/bison/bin/bison .venv/bin + - source .venv/bin/activate + - pip3 install meson==1.2.0 + - pip3 install ninja==1.11.1 + - pip3 install /Users/Shared/build/pkgs/PyGObject-3.44.0-cp310-cp310-macosx_10_13_x86_64.whl + /Users/Shared/build/pkgs/pycairo-1.23.0-cp310-cp310-macosx_10_13_x86_64.whl script: - - meson setup ${COMMON_MESON_FLAGS} + - meson setup + ${COMMON_MESON_FLAGS} + ${EXTRA_MESON_FLAGS} -Dx11-backend=false -Dbroadway-backend=true -Dmacos-backend=true -Dmedia-gstreamer=disabled - -Dintrospection=disabled + -Dintrospection=enabled -Dcpp_std=c++11 -Dpixman:tests=disabled -Dlibjpeg-turbo:simd=disabled