-
Notifications
You must be signed in to change notification settings - Fork 207
/
_ci-linux-alpine.sh
executable file
·41 lines (32 loc) · 1.13 KB
/
_ci-linux-alpine.sh
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
#!/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='17'
extra=''
[[ "${CW_CONFIG:-}" = *'boringssl'* ]] && extra+=' go'
if [[ "${CW_CONFIG:-}" = *'win'* ]]; then
extra+=' mingw-w64-gcc-base wine'
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]]; then
extra+=' nasm'
fi
elif [[ "${CW_CONFIG:-}" = *'linux'* ]]; then
apk add --no-cache checksec-rs --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community/
extra+=' compiler-rt libc++-static' # for llvm
if [[ "${CW_CONFIG:-}" =~ (quictls|openssl) ]]; then
extra+=' linux-headers' # for openssl 'secure-memory' feature
fi
if [[ "${CW_CONFIG:-}" = *'gcc'* ]]; then
extra+=' gcc'
fi
fi
if [[ "${CW_CONFIG:-}" != *'gcc'* ]]; then
extra+=" llvm${LLVM} clang${LLVM} lld"
fi
# https://pkgs.alpinelinux.org/packages
# shellcheck disable=SC2086
apk add --no-cache curl git gpg gpg-agent rsync build-base cmake samurai python3 \
zip tar xz jq openssl sed ${extra}
./_build.sh