mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-24 09:34:04 +00:00
.github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable release as well as current master. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
2e1f7a9b3a
commit
13559018bd
85
.github/scripts/util.sh
vendored
Normal file
85
.github/scripts/util.sh
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
|
||||
. .github/scripts/conf.sh
|
||||
|
||||
clone_source() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
|
||||
if [ ! -f $pkgname/.git/config ]; then
|
||||
echo "need to clone $pkgname"
|
||||
if [ "$commit" ]; then
|
||||
git clone $url $pkgname --branch=$ref
|
||||
else
|
||||
git clone $url $pkgname --branch=$ref --depth 1
|
||||
fi
|
||||
else
|
||||
echo "already cloned $pkgname"
|
||||
fi
|
||||
|
||||
if [ "$commit" ]; then
|
||||
( cd $pkgname && git checkout -f "$commit" )
|
||||
fi
|
||||
}
|
||||
|
||||
build_meson() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||
echo "package $pkgname already built"
|
||||
else
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
meson "$@" build -Dprefix=$X11_PREFIX
|
||||
ninja -j${FDO_CI_CONCURRENT:-4} -C build install
|
||||
)
|
||||
touch $X11_PREFIX/$pkgname.DONE
|
||||
fi
|
||||
}
|
||||
|
||||
build_ac() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||
echo "package $pkgname already built"
|
||||
else
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
./autogen.sh --prefix=$X11_PREFIX
|
||||
make -j${FDO_CI_CONCURRENT:-4} install
|
||||
)
|
||||
touch $X11_PREFIX/$pkgname.DONE
|
||||
fi
|
||||
}
|
||||
|
||||
build_drv_ac() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
./autogen.sh # --prefix=$X11_PREFIX
|
||||
make -j${FDO_CI_CONCURRENT:-4} # install
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user