-
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy path_ci-linux-alpine.sh
More file actions
executable file
·54 lines (42 loc) · 1.88 KB
/
_ci-linux-alpine.sh
File metadata and controls
executable file
·54 lines (42 loc) · 1.88 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
cat /etc/*-release
LLVM=''
extra=''
[[ "${CW_CONFIG:-}" = *'boringssl'* ]] && extra+=' go'
if [[ "${CW_CONFIG:-}" = *'win'* ]]; then
extra+=' mingw-w64-gcc-base'
[[ "${CW_CONFIG:-}" != *'noWINE'* ]] && extra+=' wine'
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then
extra+=' nasm'
fi
extra+=' py3-pefile'
[ -n "${DEPLOY_AGE_PASS:+1}" ] && extra+=' openssh-client-default'
elif [[ "${CW_CONFIG:-}" = *'linux'* ]]; then
apk add --no-cache checksec-rs --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community/
extra+=' compiler-rt' # for llvm
extra+=' linux-headers' # for curl 'linux/tcp.h' and openssl 'secure-memory' feature
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then
extra+=' libc++-static' # for llvm
fi
if [[ "${CW_CONFIG:-}" = *'gcc'* ]]; then
extra+=' gcc'
fi
fi
[[ ! "${CW_CONFIG}" =~ (zero|bldtst|nocookie) ]] && extra+=' python3' # for libpsl
if [[ "${CW_CONFIG:-}" != *'gcc'* ]]; then
extra+=" llvm${LLVM} clang${LLVM} lld"
fi
[ -n "${COSIGN_AGE_PASS:+1}" ] && extra+=' cosign'
[ -n "${MINISIGN_AGE_PASS:+1}" ] && extra+=' minisign'
[ -n "${SIGN_SSH_AGE_PASS:+1}" ] && extra+=' openssh-client-default'
[ -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'
# https://pkgs.alpinelinux.org/packages
# coreutils to override the busybox sha256sum implementation for `--tag` option support.
# shellcheck disable=SC2086
apk add --no-cache curl git gpg gpg-agent rsync build-base cmake samurai \
zip tar xz jq coreutils sed perl ${extra}
./_build.sh