1#!/bin/bash 2 3set -eux 4 5# ensure the prove testing tool is available 6echo "::group::ensure build/test prerequisites" 7if ! command -v prove; then 8 if grep -m 1 alpine /etc/os-release; then 9 apk add perl-utils 10 else 11 echo "prove (perl) testing tool unavailable" 12 exit 1 13 fi 14fi 15echo "::endgroup::" 16 17# build the requested version of libyaml locally 18echo "::group::fetch libyaml ${LIBYAML_REF}" 19git config --global advice.detachedHead false 20git clone --branch "$LIBYAML_REF" "$LIBYAML_REPO" libyaml 21pushd libyaml 22git reset --hard "$LIBYAML_REF" 23echo "::endgroup::" 24 25echo "::group::autoconf libyaml w/ static only" 26./bootstrap 27# build only a static library- reduces our reliance on auditwheel/delocate magic 28./configure --disable-dependency-tracking --with-pic --enable-shared=no 29echo "::endgroup::" 30 31echo "::group::build libyaml" 32make 33echo "::endgroup::" 34 35echo "::group::test built libyaml" 36make test-all 37echo "::endgroup::" 38popd 39