Skip to content

Commit

Permalink
CI macos: pkg-config install fix
Browse files Browse the repository at this point in the history
THe problem seems to be that there is preinstalled [email protected] in
CI but the version that is being to be installed is an alias for pkgconf.

The problem seems to be cumbersome, because installing pkgconf fails, pkg-config
as well (tries to install pkgconf 2.3.0; installed version of pkg-config
is [email protected]).

So made just a workaround, that will not be needed after the updated
pkg-config (linked to pkgconf) applies to all macos runners (will be
preinstalled).

The problematic package is pkg-config in current macos-13 runner but
[email protected] in macos-14 image.
  • Loading branch information
MartinPulec committed Nov 25, 2024
1 parent 1edef2b commit 3e8100c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/scripts/macOS/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ echo "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" >> "$GITHUB_ENV"
echo "/usr/local/opt/qt/bin" >> "$GITHUB_PATH"
echo "DYLIBBUNDLER_FLAGS=$DYLIBBUNDLER_FLAGS" >> "$GITHUB_ENV"

# Ensure that pkg-config is installed but unlinked.
# This is to prevent interference with pkgconf - both can be installed as
# a dependency of other packages so ensure a defined state (both installed;
# pkgconf installed and enabled later).
if ! brew list pkg-config 2>/dev/null; then
# TOREMOVE: temporal CI fix, remove after a short period (let say after 2024)
for n in $(brew list --formula -1 | grep -E '^(pkg-config(@.*)?|pkgconf)$'); do
brew uninstall "$n"
done
brew install pkg-config
# if pkg-config is not alias for pkgconf, install it for deps but unlink
if brew list pkg-config | grep -qv pkgconf; then
brew uninstall pkg-config
brew install pkgconf
brew unlink pkgconf
brew install pkg-config
fi
brew unlink pkg-config

set -- \
asciidoctor \
Expand Down

0 comments on commit 3e8100c

Please sign in to comment.