mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-24 01:24:04 +00:00
.github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo, instead of having lots of duplicated pipeline and script in all the individual driver repos. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
4cbd329407
commit
2dba841ff6
69
.github/actions/build-driver/action.yaml
vendored
69
.github/actions/build-driver/action.yaml
vendored
@@ -1,69 +0,0 @@
|
|||||||
name: 'build driver'
|
|
||||||
description: 'build driver against specific Xserver'
|
|
||||||
inputs:
|
|
||||||
xserver-version:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: check out driver repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: prepare build environment
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
MACHINE=`gcc -dumpmachine`
|
|
||||||
echo "MACHINE=$MACHINE" >> "$GITHUB_ENV"
|
|
||||||
echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
|
|
||||||
sudo chown root /bin/tar && sudo chmod u+s /bin/tar
|
|
||||||
|
|
||||||
- name: apt cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: /var/cache/apt
|
|
||||||
key: apt-cache-${{ hashFiles('.github/scripts/ubuntu/install-pkg.sh') }}
|
|
||||||
restore-keys: apt-cache-
|
|
||||||
|
|
||||||
- name: pkg install
|
|
||||||
shell: bash
|
|
||||||
run: sudo .github/scripts/ubuntu/install-pkg.sh
|
|
||||||
|
|
||||||
- name: X11 prereq cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
${{ env.X11_PREFIX }}
|
|
||||||
key: ${{ runner.name }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }}
|
|
||||||
restore-keys: ${{ runner.name }}-x11-deps-
|
|
||||||
|
|
||||||
- name: generic prereq
|
|
||||||
shell: bash
|
|
||||||
run: .github/scripts/install-prereq.sh
|
|
||||||
|
|
||||||
- name: check out xserver repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: X11Libre/xserver
|
|
||||||
path: xserver-sdk
|
|
||||||
ref: ${{ inputs.xserver-version }}
|
|
||||||
|
|
||||||
- name: build xserver sdk
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dnamespace=false -Dxselinux=false -Dxephyr=false -Dwerror=false -Dxcsecurity=false -Dxorg=true -Dxvfb=false -Dxnest=false -Ddocs=false
|
|
||||||
run: |
|
|
||||||
cd xserver-sdk
|
|
||||||
echo -n > .meson_environment
|
|
||||||
echo "export MESON_BUILDDIR=$MESON_BUILDDIR" >> .meson_environment
|
|
||||||
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> .meson_environment
|
|
||||||
.gitlab-ci/meson-build.sh --skip-test
|
|
||||||
sudo meson install --no-rebuild -C "$MESON_BUILDDIR"
|
|
||||||
sudo mkdir -p /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules
|
|
||||||
sudo chown -R runner /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules
|
|
||||||
|
|
||||||
- name: compile driver
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
CFLAGS="-Wall" ./autogen.sh # --prefix=$X11_PREFIX
|
|
||||||
CFLAGS="-Wall" make -j # install
|
|
||||||
13
.github/scripts/conf.sh
vendored
13
.github/scripts/conf.sh
vendored
@@ -1,13 +0,0 @@
|
|||||||
export X11_OS=`uname -s`
|
|
||||||
|
|
||||||
export X11_PREFIX="${X11_PREFIX:-$HOME/x11}"
|
|
||||||
export X11_BUILD_DIR="${X11_BUILD_DIR:-$HOME/build-deps}"
|
|
||||||
export DRV_BUILD_DIR="${DRV_BUILD_DIR:-$HOME/build-drivers}"
|
|
||||||
|
|
||||||
case "$X11_OS" in
|
|
||||||
Darwin) export FDO_CI_CONCURRENT=`sysctl -n hw.logicalcpu` ;;
|
|
||||||
Linux) export FDO_CI_CONCURRENT=`nproc` ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
export PATH="$X11_PREFIX/bin:$PATH"
|
|
||||||
export PKG_CONFIG_PATH="$X11_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$X11_PREFIX/lib/pkgconfig:$X11_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
17
.github/scripts/github/make-release
vendored
17
.github/scripts/github/make-release
vendored
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
err() {
|
|
||||||
echo "$0: $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
[ "$GITHUB_REPOSITORY" ] || err "missing variable GITHUB_REPOSITORY"
|
|
||||||
|
|
||||||
TITLE=$(git tag -l --format='%(contents)' $tag)
|
|
||||||
|
|
||||||
echo "tag=$tag"
|
|
||||||
echo "title=$TITLE"
|
|
||||||
|
|
||||||
gh release create "$tag" \
|
|
||||||
--repo="$GITHUB_REPOSITORY" \
|
|
||||||
--title="$tag" \
|
|
||||||
--generate-notes
|
|
||||||
15
.github/scripts/install-prereq.sh
vendored
15
.github/scripts/install-prereq.sh
vendored
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
. .github/scripts/util.sh
|
|
||||||
|
|
||||||
mkdir -p $X11_BUILD_DIR
|
|
||||||
cd $X11_BUILD_DIR
|
|
||||||
|
|
||||||
if [ "$X11_OS" = "Linux" ]; then
|
|
||||||
build_meson drm https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.121 "" \
|
|
||||||
-Domap=enabled
|
|
||||||
fi
|
|
||||||
build_meson libxcvt https://gitlab.freedesktop.org/xorg/lib/libxcvt libxcvt-0.1.0
|
|
||||||
build_ac xorgproto https://gitlab.freedesktop.org/xorg/proto/xorgproto xorgproto-2024.1
|
|
||||||
94
.github/scripts/ubuntu/install-pkg.sh
vendored
94
.github/scripts/ubuntu/install-pkg.sh
vendored
@@ -1,94 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Packages which are needed by this script, but not for the xserver build
|
|
||||||
EPHEMERAL="
|
|
||||||
libexpat-dev
|
|
||||||
libgles2-mesa-dev
|
|
||||||
libxkbcommon-dev
|
|
||||||
x11-utils
|
|
||||||
x11-xserver-utils
|
|
||||||
xauth
|
|
||||||
xvfb
|
|
||||||
"
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
|
|
||||||
apt-get install -y \
|
|
||||||
$EPHEMERAL \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
build-essential \
|
|
||||||
ca-certificates \
|
|
||||||
libaudit-dev \
|
|
||||||
libbsd-dev \
|
|
||||||
libcairo2-dev \
|
|
||||||
libdbus-1-dev \
|
|
||||||
libdrm-dev \
|
|
||||||
libegl1-mesa-dev \
|
|
||||||
libepoxy-dev \
|
|
||||||
libevdev2 \
|
|
||||||
libexpat1 \
|
|
||||||
libffi-dev \
|
|
||||||
libgbm-dev \
|
|
||||||
libgcrypt-dev \
|
|
||||||
libgl1-mesa-dev \
|
|
||||||
libgles2 \
|
|
||||||
libglx-mesa0 \
|
|
||||||
libinput10 \
|
|
||||||
libinput-dev \
|
|
||||||
libnvidia-egl-wayland-dev \
|
|
||||||
libpciaccess-dev \
|
|
||||||
libpixman-1-dev \
|
|
||||||
libspice-protocol-dev \
|
|
||||||
libsystemd-dev \
|
|
||||||
libudev-dev \
|
|
||||||
libunwind-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libx11-xcb-dev \
|
|
||||||
libxau-dev \
|
|
||||||
libxaw7-dev \
|
|
||||||
libxcb-glx0-dev \
|
|
||||||
libxcb-icccm4-dev \
|
|
||||||
libxcb-image0-dev \
|
|
||||||
libxcb-keysyms1-dev \
|
|
||||||
libxcb-randr0-dev \
|
|
||||||
libxcb-render-util0-dev \
|
|
||||||
libxcb-render0-dev \
|
|
||||||
libxcb-shape0-dev \
|
|
||||||
libxcb-shm0-dev \
|
|
||||||
libxcb-util0-dev \
|
|
||||||
libxcb-xf86dri0-dev \
|
|
||||||
libxcb-xkb-dev \
|
|
||||||
libxcb-xv0-dev \
|
|
||||||
libxcb1-dev \
|
|
||||||
libxdmcp-dev \
|
|
||||||
libxext-dev \
|
|
||||||
libxfixes-dev \
|
|
||||||
libxfont-dev \
|
|
||||||
libxi-dev \
|
|
||||||
libxinerama-dev \
|
|
||||||
libxkbcommon0 \
|
|
||||||
libxkbfile-dev \
|
|
||||||
libxmu-dev \
|
|
||||||
libxmuu-dev \
|
|
||||||
libxpm-dev \
|
|
||||||
libxrender-dev \
|
|
||||||
libxres-dev \
|
|
||||||
libxshmfence-dev \
|
|
||||||
libxt-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
libxv-dev \
|
|
||||||
mesa-common-dev \
|
|
||||||
meson \
|
|
||||||
nettle-dev \
|
|
||||||
libpango1.0-dev \
|
|
||||||
pkg-config \
|
|
||||||
x11-xkb-utils \
|
|
||||||
xfonts-utils \
|
|
||||||
xkb-data \
|
|
||||||
xtrans-dev \
|
|
||||||
xutils-dev \
|
|
||||||
libxaw7-dev \
|
|
||||||
python3-mako
|
|
||||||
85
.github/scripts/util.sh
vendored
85
.github/scripts/util.sh
vendored
@@ -1,85 +0,0 @@
|
|||||||
|
|
||||||
. .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
|
|
||||||
)
|
|
||||||
}
|
|
||||||
42
.github/workflows/build.yml
vendored
42
.github/workflows/build.yml
vendored
@@ -1,43 +1,27 @@
|
|||||||
name: Build driver
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
env:
|
|
||||||
MESON_BUILDDIR: "build"
|
|
||||||
X11_PREFIX: /home/runner/x11
|
|
||||||
X11_BUILD_DIR: /home/runner/build-deps
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
for-xserver-stable-25_0:
|
target-ubuntu:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: X11Libre/action-build-driver/target/ubuntu@v0.0.1
|
||||||
- uses: ./.github/actions/build-driver
|
|
||||||
with:
|
with:
|
||||||
xserver-version: xlibre-xserver-25.0.0.5
|
xserver-version: ${{ matrix.xserver-version }}
|
||||||
|
|
||||||
for-xserver-master:
|
release-notes:
|
||||||
|
name: Release pushed tag
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
|
||||||
|
needs: target-ubuntu
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: X11Libre/action-build-driver/release@v0.0.1
|
||||||
- uses: ./.github/actions/build-driver
|
|
||||||
with:
|
|
||||||
xserver-version: master
|
|
||||||
|
|
||||||
release:
|
|
||||||
name: Release pushed tag
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Create release
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
tag: ${{ github.ref_name }}
|
|
||||||
run: .github/scripts/github/make-release
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# we require at least inputproto >= 2.3.99.1 which has been released in xorgproto 2021.5
|
|
||||||
git clone https://gitlab.freedesktop.org/xorg/proto/xorgproto.git --depth 1 --branch=xorgproto-2021.5
|
|
||||||
pushd xorgproto
|
|
||||||
./autogen.sh
|
|
||||||
make -j${FDO_CI_CONCURRENT:-4} install
|
|
||||||
popd
|
|
||||||
rm -rf xorgproto
|
|
||||||
Reference in New Issue
Block a user