Skip to content

Commit 34375ad

Browse files
committed
btrfs-progs: ci: add AlmaLinux 10
Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 8211df4 commit 34375ad

File tree

6 files changed

+109
-0
lines changed

6 files changed

+109
-0
lines changed

ci/ci-build-almalinux10

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
# Usage: $0 [branch] [configure options]
3+
# Create source tarball from HEAD or given branch and build it in AlmaLinux 10 CI
4+
# environment. Configure options follow branch name that can be empty.
5+
6+
HERE=`pwd`
7+
if [ -f "configure.ac" ]; then
8+
SOURCEDIR=`pwd`
9+
elif [ -f "../configure.ac" ]; then
10+
cd ..
11+
SOURCEDIR=`pwd`
12+
else
13+
echo "ERROR: cannot determine source directory from `pwd`"
14+
exit 1
15+
fi
16+
17+
CIIMAGEDIR=ci/images/ci-almalinux-10-x86_64
18+
BRANCH=${1:-HEAD}
19+
if [ "$#" -ge 1 ]; then
20+
shift
21+
fi
22+
HASH=$(git log -1 --format='%h %s' "$BRANCH")
23+
24+
echo "CI: Generate archive from $BRANCH ($HASH)"
25+
git archive --prefix=btrfs-progs-devel/ -o devel.tar "$BRANCH"
26+
echo "$BRANCH $HASH" > GITCOMMIT
27+
tar uvf devel.tar GITCOMMIT
28+
#rm GITCOMMIT
29+
gzip --force --best devel.tar
30+
31+
cd "$CIIMAGEDIR"
32+
cp "$SOURCEDIR/devel.tar.gz" .
33+
./docker-build
34+
./docker-run -- ./test-build devel --disable-documentation "$@"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM almalinux:10
2+
3+
WORKDIR /tmp
4+
5+
#RUN rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
6+
#RUN yum -y install https://www.elrepo.org/elrepo-release-10.el10.elrepo.noarch.rpm
7+
#RUN yum -y install epel-release
8+
9+
RUN yum -y install autoconf automake pkg-config
10+
RUN yum -y install libattr-devel libblkid-devel libuuid-devel
11+
RUN yum -y install e2fsprogs-libs e2fsprogs-devel
12+
RUN yum -y install zlib-devel lzo-devel libzstd-devel zstd
13+
RUN yum -y install make gcc tar gzip clang
14+
RUN yum -y install python3 python3-devel python3-setuptools
15+
16+
# For downloading fresh sources
17+
RUN yum -y install wget
18+
19+
# For running tests
20+
RUN yum -y install util-linux e2fsprogs findutils grep
21+
RUN yum -y install udev systemd-devel device-mapper acl attr xz
22+
23+
RUN yum -y install libsodium-devel
24+
25+
# For debugging
26+
RUN yum -y install less vim
27+
28+
COPY ./test-build .
29+
COPY ./run-tests .
30+
COPY ./devel.tar.gz .
31+
32+
CMD ["./test-build", "devel", "--disable-documentation"]
33+
34+
# Continue with:
35+
# cd /tmp
36+
# (see CMD above)
37+
# ./run-tests /tmp/btrfs-progs-devel
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../docker-build
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../docker-run
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh -x
2+
3+
where="$1"
4+
5+
cd "$where" || { echo "ERROR: $1 not found"; exit 1; }
6+
7+
make TEST_LOG=dump test-cli
8+
make TEST_LOG=dump test-mkfs
9+
make TEST_LOG=dump test-check
10+
make TEST_LOG=dump test-check-lowmem
11+
make TEST_LOG=dump test-misc
12+
make TEST_LOG=dump test-convert
13+
make TEST_LOG=dump test-fuzz
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
# usage: $0 [branch name] [configure parameters]
3+
4+
urlbase="https://github.com/kdave/btrfs-progs/archive"
5+
branch=${1:-devel}
6+
fnbase="${branch/\//-}"
7+
fname="${fnbase}.tar.gz"
8+
url="${urlbase}/${branch}.tar.gz"
9+
10+
shift
11+
12+
echo "btrfs-progs build test of branch ${branch}"
13+
cd /tmp
14+
if [ -f "$fname" -a -s "$fname" ]; then
15+
echo "Found local file $fname, not downloading"
16+
else
17+
echo "Missing or empty tar, downloading branch $branch from git"
18+
rm -- "$fname"
19+
wget "$url" -O "$fname"
20+
fi
21+
tar xf "$fname"
22+
cd "btrfs-progs-$fnbase"
23+
ci/build-default "$@"

0 commit comments

Comments
 (0)