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 diff --git a/gdk/macos/gdkmacosglcontext-private.h b/gdk/macos/gdkmacosglcontext-private.h index 4e83e5cb0e..95966a4c12 100644 --- a/gdk/macos/gdkmacosglcontext-private.h +++ b/gdk/macos/gdkmacosglcontext-private.h @@ -27,9 +27,7 @@ #include "gdkmacosdisplay.h" #include "gdkmacossurface.h" -#import -#import -#import +#import G_BEGIN_DECLS diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c index 87e6e19fe0..a706a407b5 100644 --- a/gdk/macos/gdkmacosglcontext.c +++ b/gdk/macos/gdkmacosglcontext.c @@ -21,7 +21,6 @@ #include "gdkconfig.h" -#include #include #include @@ -499,7 +498,7 @@ gdk_macos_gl_context_begin_frame (GdkDrawContext *context, gdk_gl_context_make_current (GDK_GL_CONTEXT (self)); gdk_macos_gl_context_allocate (self); - GDK_DRAW_CONTEXT_CLASS (gdk_macos_gl_context_parent_class)->begin_frame (context, prefers_high_depth, region); + GDK_DRAW_CONTEXT_CLASS (gdk_macos_gl_context_parent_class)->begin_frame (context, depth, region); gdk_gl_context_make_current (GDK_GL_CONTEXT (self)); CHECK_GL (NULL, glBindFramebuffer (GL_FRAMEBUFFER, self->fbo)); diff --git a/gdk/macos/gdkmacosmonitor.c b/gdk/macos/gdkmacosmonitor.c index df2676b6cf..b1bf0b1f11 100644 --- a/gdk/macos/gdkmacosmonitor.c +++ b/gdk/macos/gdkmacosmonitor.c @@ -331,7 +331,7 @@ _gdk_macos_monitor_reconfigure (GdkMacosMonitor *self) gdk_monitor_set_physical_size (GDK_MONITOR (self), width_mm, height_mm); gdk_monitor_set_scale_factor (GDK_MONITOR (self), scale_factor); gdk_monitor_set_refresh_rate (GDK_MONITOR (self), refresh_rate); - gdk_monitor_set_subpixel_layout (GDK_MONITOR (self), GDK_SUBPIXEL_LAYOUT_UNKNOWN); + gdk_monitor_set_subpixel_layout (GDK_MONITOR (self), subpixel_layout); self->workarea = [screen visibleFrame];