From 007dd55a715131a8ae9a7e31d1b2a0f09c64aae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20de=20Hesselle?= Date: Wed, 19 Jul 2023 13:51:50 +0200 Subject: [PATCH 1/3] Re-enable macOS CI on new self-hosted runner --- .gitlab-ci.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a3332abea..93ab3abd0b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -197,21 +197,29 @@ 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: - 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 + CCACHE_DIR: /Users/Shared/work/ccache + PIP_CACHE_DIR: /Users/Shared/build/cache + PIPENV_CACHE_DIR: $PIP_CACHE_DIR + PYTHONPYCACHEPREFIX: $PIP_CACHE_DIR before_script: - 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 + - python3 -m venv .venv + - ln -s /opt/cmake/CMake.app/Contents/bin/cmake .venv/bin + - ln -s /opt/ccache/ccache .venv/bin + - source .venv/bin/activate + - pip3 install meson==1.2.0 + - pip3 install ninja==1.11.1 script: - meson setup ${COMMON_MESON_FLAGS} -Dx11-backend=false From 9aeb5be8ad91f83030f3c5e5bdd68a47b4b1a970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20de=20Hesselle?= Date: Fri, 11 Aug 2023 19:13:58 +0200 Subject: [PATCH 2/3] gdk: Use subpixel_layout on macOS --- gdk/macos/gdkmacosmonitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; From b4428029af8b7e7164fd5e1c835018696c932fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20de=20Hesselle?= Date: Fri, 11 Aug 2023 20:52:07 +0200 Subject: [PATCH 3/3] Change workflow to enable MR pipelines This makes it possible to have macOS CI run for everything inside the main repository and for merge requests. --- .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93ab3abd0b..0cbf0cd7d7 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: @@ -199,6 +207,9 @@ msys2-mingw64: macos-x86_64: rules: + # run merge request pipelines + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + # do not run in forks - if: $CI_PROJECT_NAMESPACE == "GNOME" stage: build tags: