btrfs-progs/ci/ci-build-musl-i386
David Sterba ec841d1451 btrfs-progs: ci: add 32bit build test on alpine/musl
Add new CI image target based on 32bit Alpine with musl. It's a copy of
musl and requires docker's buildx extension to properly select the
platform.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-24 19:58:50 +02:00

35 lines
909 B
Bash
Executable file

#!/bin/sh
# Usage: $0 [branch] [configure options]
# Create source tarball from HEAD or given branch and build it in musl CI
# environment. Configure options follow branch name that can be empty.
HERE=`pwd`
if [ -f "configure.ac" ]; then
SOURCEDIR=`pwd`
elif [ -f "../configure.ac" ]; then
cd ..
SOURCEDIR=`pwd`
else
echo "ERROR: cannot determine source directory from `pwd`"
exit 1
fi
CIIMAGEDIR=ci/images/ci-musl-i386
BRANCH=${1:-HEAD}
if [ "$#" -ge 1 ]; then
shift
fi
HASH=$(git log -1 --format='%h %s' "$BRANCH")
echo "CI: Generate archive from $BRANCH ($HASH)"
git archive --prefix=btrfs-progs-devel/ -o devel.tar "$BRANCH"
echo "$BRANCH $HASH" > GITCOMMIT
tar uvf devel.tar GITCOMMIT
#rm GITCOMMIT
gzip --force --best devel.tar
cd "$CIIMAGEDIR"
cp "$SOURCEDIR/devel.tar.gz" .
./docker-build
./docker-run -- ./test-build devel --disable-documentation --disable-backtrace --disable-libudev "$@"