From: Tobias Brunner Date: Wed, 27 Mar 2024 09:48:48 +0000 (+0100) Subject: cirrus: Add build on Alpine Linux with musl C library X-Git-Tag: android-2.5.2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b73a476c1ff8c54d1155decf30b8597f0a200fef;p=thirdparty%2Fstrongswan.git cirrus: Add build on Alpine Linux with musl C library --- diff --git a/.cirrus.yml b/.cirrus.yml index 9df5909c8f..7480e56401 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,4 +1,4 @@ -task: +freebsd_task: matrix: - name: FreeBSD 14.0 freebsd_instance: @@ -16,3 +16,18 @@ task: install_script: ./scripts/test.sh deps script: ./scripts/test.sh + +alpine_task: + container: + image: alpine:latest + + env: + TESTS_REDUCED_KEYLENGTHS: yes + TESTS_NO_IPV6: yes + LEAK_DETECTIVE: no + MONOLITHIC: no + TEST: alpine + OS_NAME: alpine + + install_script: ./scripts/test.sh deps + script: ./scripts/test.sh diff --git a/scripts/test.sh b/scripts/test.sh index 485725f0e1..c4ffa2422f 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -253,7 +253,7 @@ wolfssl) printf-builtin) CONFIG="--with-printf-hooks=builtin" ;; -all|codeql|coverage|sonarcloud|no-dbg) +all|alpine|codeql|coverage|sonarcloud|no-dbg) if [ "$TEST" = "sonarcloud" ]; then if [ -z "$SONAR_PROJECT" -o -z "$SONAR_ORGANIZATION" -o -z "$SONAR_TOKEN" ]; then echo "The SONAR_PROJECT, SONAR_ORGANIZATION and SONAR_TOKEN" \ @@ -293,6 +293,21 @@ all|codeql|coverage|sonarcloud|no-dbg) libldap2-dev libpcsclite-dev libpam0g-dev binutils-dev libnm-dev libgcrypt20-dev libjson-c-dev python3-pip libtspi-dev libsystemd-dev libselinux1-dev libiptc-dev" + if [ "$TEST" = "alpine" ]; then + # override the whole list for alpine + DEPS="git gmp-dev openldap-dev curl-dev ldns-dev unbound-dev libsoup-dev + tpm2-tss-dev mariadb-dev wolfssl-dev libgcrypt-dev botan3-dev + pcsc-lite-dev networkmanager-dev linux-pam-dev iptables-dev + libselinux-dev binutils-dev libunwind-dev ruby py3-setuptools" + # musl does not provide backtrace(), so use libunwind + CONFIG="$CONFIG --enable-unwind-backtraces" + # alpine doesn't have systemd + CONFIG="$CONFIG --disable-systemd --disable-cert-enroll-timer" + # no TrouSerS either + CONFIG="$CONFIG --disable-tss-trousers --disable-aikgen" + # and no Clearsilver + CONFIG="$CONFIG --disable-fast --disable-manager --disable-medsrv" + fi PYDEPS="tox" if test "$1" = "build-deps"; then if [ "$ID" = "ubuntu" -a "$VERSION_ID" != "20.04" ]; then @@ -454,6 +469,10 @@ deps) sudo apt-get update -qq && \ sudo apt-get install -qq bison flex gperf gettext $DEPS ;; + alpine) + apk add --no-cache build-base automake autoconf libtool pkgconfig && \ + apk add --no-cache bison flex gperf gettext-dev tzdata $DEPS + ;; macos) brew update && \ brew install $DEPS @@ -484,7 +503,7 @@ CONFIG="$CONFIG --enable-leak-detective=${LEAK_DETECTIVE-no}" case "$TEST" in - codeql|coverage|freebsd|fuzzing|sonarcloud|win*) + alpine|codeql|coverage|freebsd|fuzzing|sonarcloud|win*) # don't use AddressSanitizer if it's not available or causes conflicts CONFIG="$CONFIG --disable-asan" ;;