From 0d9bbc9d641362cd755adfc17533db270126024d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20de=20Hesselle?= Date: Sun, 18 Feb 2024 20:31:36 +0100 Subject: [PATCH] ci: Check for SDKROOT environment variable The SDKROOT variable is _the_ "master switch" to set the target OS version (much stricter compared to MACOSX_DEPLOYMENT_TARGET alone), yet it has no impact on the output of 'xcodebuild -showsdks'. Also rename the script to 'macos', it's not being called 'osx' anymore since 2016 (Sierra). --- .gitlab-ci.yml | 2 +- .gitlab-ci/{show-info-osx.sh => show-info-macos.sh} | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) rename .gitlab-ci/{show-info-osx.sh => show-info-macos.sh} (52%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index efe89b3b71..85637a027b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -240,7 +240,7 @@ macos: PIPENV_CACHE_DIR: $PIP_CACHE_DIR PYTHONPYCACHEPREFIX: $PIP_CACHE_DIR before_script: - - bash .gitlab-ci/show-info-osx.sh + - .gitlab-ci/show-info-macos.sh - python3 -m venv .venv # Building the introspection feature requires pkg-config and bison. - curl -L $CI_API_V4_URL/projects/30437/packages/generic/pkgconfig/v0.29.2+10/pkg-config-0.29.2+10_$(uname -m).tar.xz | tar -C .venv -xJ diff --git a/.gitlab-ci/show-info-osx.sh b/.gitlab-ci/show-info-macos.sh similarity index 52% rename from .gitlab-ci/show-info-osx.sh rename to .gitlab-ci/show-info-macos.sh index cc1bfdb87d..f7f2d0a2aa 100755 --- a/.gitlab-ci/show-info-osx.sh +++ b/.gitlab-ci/show-info-macos.sh @@ -3,6 +3,11 @@ set -eux -o pipefail xcodebuild -version || : -xcodebuild -showsdks || : + +if [ -z "$SDKROOT" ]; then + xcodebuild -showsdks || : +else + echo "SDKROOT = $SDKROOT" +fi system_profiler SPSoftwareDataType || :