-
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy path_ci-mac-homebrew.sh
More file actions
executable file
·54 lines (45 loc) · 1.98 KB
/
_ci-mac-homebrew.sh
File metadata and controls
executable file
·54 lines (45 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
# Copyright (C) Viktor Szakats. See LICENSE.md
# SPDX-License-Identifier: MIT
# shellcheck disable=SC3040,SC2039
set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o pipefail
extra='gnu-tar jq'
[[ "${CW_CONFIG:-}" = *'boringssl'* ]] && extra+=' go'
if [[ "${CW_CONFIG:-}" != *'mac'* ]] || [[ "${CW_CONFIG:-}" = *'llvm'* ]]; then
extra+=' llvm lld'
fi
if [[ "${CW_CONFIG:-}" = *'win'* ]]; then
extra+=' mingw-w64 osslsigncode'
[ -n "${DEPLOY_AGE_PASS:+1}" ] && extra+=' openssh'
# On AppVeyor CI macos-sonoma runner wine stalls for 5 minutes 5 times with
# an error on first invocation (from this script). Then on a next invocation
# it repeats the 5-minute stalls indefinitely. Skip wine as a workaround:
if [[ "${CW_CONFIG:-}" != *'noWINE'* ]] && \
[ -z "${APPVEYOR_ACCOUNT_NAME:-}" ]; then
extra+=' wine-stable'
fi
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then
extra+=' nasm'
fi
elif [[ "${CW_CONFIG:-}" = *'linux'* ]]; then
extra+=' filosottile/musl-cross/musl-cross'
elif [[ "${CW_CONFIG:-}" = *'mac'* ]] && [[ "${CW_CONFIG:-}" = *'gcc'* ]]; then
extra+=' gcc'
fi
[ -n "${COSIGN_AGE_PASS:+1}" ] && extra+=' cosign'
[ -n "${MINISIGN_AGE_PASS:+1}" ] && extra+=' minisign'
[ -n "${SIGN_SSH_AGE_PASS:+1}" ] && extra+=' openssh'
[ -n "${SIGN_CODE_AGE_PASS:+1}${COSIGN_AGE_PASS:+1}${DEPLOY_AGE_PASS:+1}${MINISIGN_AGE_PASS:+1}${SIGN_PKG_AGE_PASS:+1}${SIGN_SSH_AGE_PASS:+1}" ] && extra+=' age'
if [ -n "${extra}" ]; then
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT=1
brew update >/dev/null || true
# shellcheck disable=SC2086
brew install --quiet ${extra}
fi
if [[ "${CW_CONFIG:-}" = *'win'* ]] && command -v wine >/dev/null 2>&1; then
# https://gitlab.winehq.org/wine/wine/-/wikis/FAQ#how-do-i-disable-the-gui-crash-dialog
wine reg add 'HKCU\Software\Wine\WineDbg' -v 'ShowCrashDialog' -t REG_DWORD -d 0 -f
fi
./_build.sh