CI macOS: install only not installed brew formulas

The GitHub actions now complain if trying to install a formula, that is
already installed, eg:
```
  run macOS (macos-14)
  pkg-config 0.29.2_3 is already installed and up-to-date. To reinstall 0.29.2_3, run: brew reinstall pkg-config

```

As a workaround, install just the formulas, that are not already
installed.
This commit is contained in:
Martin Pulec
2024-05-17 09:48:57 +02:00
parent 8a76432548
commit d10a9d5cc7

View File

@@ -30,16 +30,42 @@ 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"
brew install autoconf automake libtool pkg-config \
asciidoctor
brew install libsoxr speexdsp
brew install ffmpeg portaudio sdl2 sdl2_mixer sdl2_ttf
brew install molten-vk vulkan-headers
brew install imagemagick libcaca libnatpmp jack opencv wolfssl
brew install ossp-uuid # for cineform
brew install qt
brew install glm
set -- \
asciidoctor \
autoconf \
automake \
ffmpeg \
glm \
imagemagick \
jack \
libcaca \
libnatpmp \
libsoxr \
libtool \
molten-vk \
opencv \
ossp-uuid `#for cineform` \
pkg-config \
portaudio \
qt \
sdl2 \
sdl2_mixer \
sdl2_ttf \
speexdsp \
vulkan-headers \
wolfssl \
# shellcheck disable=SC2034
for n in $(seq $#); do
# if not installed, add on the back of positional parameters
if ! brew list "$1" >/dev/null; then
set -- "$@" "$1"
fi
shift # remove from the front
done
brew install "$@"
mkdir $TEMP_INST
cd $TEMP_INST