GHA/macos: tweak toolchain dump steps
- use documented flavour of `xcrun` option. - show SDK version with a dedicated command. (Sometimes the SDK path is a symlink and doesn't tell the version. This is not at the moment the case in CI, but handle it anyway.) - align group header with reality. Preinstalled vs. installed Homebrew packages can be recognized by their directory timestamps. Installed ones have a current date. Closes #14434
This commit is contained in:
parent
588a6e334a
commit
e20413980c
21
.github/workflows/macos.yml
vendored
21
.github/workflows/macos.yml
vendored
@ -189,9 +189,10 @@ jobs:
|
||||
grep -h -r -E -o '.+[0-9.]+\.sdk/' "$(dirname "$("${CC}" -print-libgcc-file-name)")/include-fixed" | sed -E 's/^\t+//g' | tr -d '"' | sort -u || true
|
||||
which "${CC}"; "${CC}" --version || true
|
||||
xcodebuild -version || true
|
||||
xcrun -sdk macosx --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk macosx --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk macosx --show-sdk-version || true
|
||||
echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
|
||||
echo '::group::brew packages preinstalled'; ls -l "$(brew --prefix)/opt"; echo '::endgroup::'
|
||||
echo '::group::brew packages installed'; ls -l "$(brew --prefix)/opt"; echo '::endgroup::'
|
||||
|
||||
- name: 'autoreconf'
|
||||
run: autoreconf -fi
|
||||
@ -215,8 +216,8 @@ jobs:
|
||||
CC+=" --target=$(uname -m)-apple-darwin"
|
||||
fi
|
||||
if [ '${{ matrix.compiler }}' != 'clang' ]; then
|
||||
options+=" --with-sysroot=$(xcrun -sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
CFLAGS+=" --sysroot=$(xcrun -sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
options+=" --with-sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
CFLAGS+=" --sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
fi
|
||||
mkdir bld && cd bld && ../configure --enable-warnings --enable-werror \
|
||||
--disable-dependency-tracking \
|
||||
@ -323,9 +324,10 @@ jobs:
|
||||
grep -h -r -E -o '.+[0-9.]+\.sdk/' "$(dirname "$("${CC}" -print-libgcc-file-name)")/include-fixed" | sed -E 's/^\t+//g' | tr -d '"' | sort -u || true
|
||||
which "${CC}"; "${CC}" --version || true
|
||||
xcodebuild -version || true
|
||||
xcrun -sdk macosx --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk macosx --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk macosx --show-sdk-version || true
|
||||
echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
|
||||
echo '::group::brew packages preinstalled'; ls -l "$(brew --prefix)/opt"; echo '::endgroup::'
|
||||
echo '::group::brew packages installed'; ls -l "$(brew --prefix)/opt"; echo '::endgroup::'
|
||||
|
||||
- name: 'cmake configure'
|
||||
run: |
|
||||
@ -460,7 +462,8 @@ jobs:
|
||||
grep -h -r -E -o '.+[0-9.]+\.sdk/' "$(dirname "$("${CC}" -print-libgcc-file-name)")/include-fixed" | sed -E 's/^\t+//g' | tr -d '"' | sort -u || true
|
||||
which "${CC}"; "${CC}" --version || true
|
||||
xcodebuild -version || true
|
||||
xcrun -sdk macosx --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk macosx --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk macosx --show-sdk-version || true
|
||||
echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
|
||||
echo '::group::brew packages preinstalled'; ls -l "$(brew --prefix)/opt"; echo '::endgroup::'
|
||||
|
||||
@ -574,8 +577,8 @@ jobs:
|
||||
CC+=" --target=$(uname -m)-apple-darwin"
|
||||
fi
|
||||
if [ '${{ matrix.compiler }}' != 'clang' ]; then
|
||||
options+=" --with-sysroot=$(xcrun -sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
CFLAGS+=" --sysroot=$(xcrun -sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
options+=" --with-sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
CFLAGS+=" --sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
fi
|
||||
[ '${{ matrix.config }}' = 'OpenSSL' ] && options+=" --with-openssl=$(brew --prefix openssl)"
|
||||
[ '${{ matrix.config }}' = 'SecureTransport' ] && options+=' --with-secure-transport'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user