mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
The SVGs must not be part of any stable API, there is too much behavior implied that we cannot/do not specify. So it's perfectly likely that a future change in the SVGs or rendering libraries breaks things in some detail. But then we cannot update the SVGs without risking breaking other clients that rely on the current behavior. Besides: we only have one theme, called "gnome" because a push towards having SVGs for other themes never happened. And that theme isn't gnome-specific, it merely looks GNOMEy. The theme is very much piper-specific in that it requires certain elements that piper cares about. Currently anyway, if we make this part of our API, piper cannot change that behavior ever without breaking others. So let's drop SVG handling completely and rely on the clients to sort it out for themselves. For now the SVGs are left in the tree to make it easier to copy to Piper. Once that's done, we will remove those too. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
225 lines
6.0 KiB
YAML
225 lines
6.0 KiB
YAML
# vim: set expandtab shiftwidth=2 tabstop=8:
|
|
libratbag_references:
|
|
default_settings: &default_settings
|
|
working_directory: ~/libratbag
|
|
environment:
|
|
LANG: C.UTF-8
|
|
build_default: &build_default
|
|
name: Build
|
|
command: |
|
|
rm -rf build
|
|
meson build ${MESON_PARAMS}
|
|
meson configure build
|
|
ninja -v -C build ${NINJA_ARGS}
|
|
environment:
|
|
MESON_PARAMS: --prefix=/usr
|
|
build_and_test: &build_and_test
|
|
run:
|
|
<<: *build_default
|
|
name: Build and test
|
|
environment:
|
|
NINJA_ARGS: test
|
|
build_with_docs: &build_with_docs
|
|
run:
|
|
<<: *build_default
|
|
name: Build with documentation
|
|
environment:
|
|
MESON_PARAMS: -Ddocumentation=true
|
|
install: &install
|
|
run:
|
|
name: Installing
|
|
command: ninja -C build install
|
|
check_install: &check_install
|
|
run:
|
|
name: Checking installation
|
|
command: |
|
|
PREFIX=/usr/local/
|
|
diff -u <(cd data/devices; ls *.device) <(cd $PREFIX/share/libratbag/devices; ls *.device)
|
|
check_uninstall: &check_uninstall
|
|
run:
|
|
name: Checking if any files are left after uninstall
|
|
command: |
|
|
PREFIX=/root/test_install
|
|
# workaround until https://github.com/mesonbuild/meson/pull/2033 is merged
|
|
# and a new release appears
|
|
git clone https://github.com/whot/meson -b wip/remove-directories-on-uninstall
|
|
./meson/meson.py build_install --prefix=$PREFIX
|
|
ninja -C build_install install
|
|
ninja -C build_install uninstall
|
|
if [ -d $PREFIX ]
|
|
then
|
|
tree $PREFIX
|
|
exit 1
|
|
fi
|
|
export_logs: &export_logs
|
|
store_artifacts:
|
|
path: ~/libratbag/build/meson-logs
|
|
start_dbus: &start_dbus
|
|
run:
|
|
name: Start dbus daemon
|
|
command: |
|
|
mkdir /run/dbus
|
|
/usr/bin/dbus-daemon --system --fork
|
|
|
|
fedora_prep_cache: &fedora_prep_cache
|
|
<<: *default_settings
|
|
steps:
|
|
- run:
|
|
name: Initializing Fedora dnf cache
|
|
command: dnf install -y --downloadonly libsolv tree git gcc gcc-c++ meson check-devel libudev-devel libevdev-devel valgrind python3-gobject python3-evdev glib2-devel python3-lxml
|
|
- persist_to_workspace:
|
|
root: /var/cache/
|
|
paths:
|
|
- dnf/*
|
|
|
|
fedora_fetch_cache: &fedora_fetch_cache
|
|
attach_workspace:
|
|
at: /var/cache/
|
|
|
|
fedora_install: &fedora_install
|
|
run:
|
|
name: Install prerequisites
|
|
command: |
|
|
echo keepcache=1 >> /etc/dnf/dnf.conf
|
|
dnf upgrade -y libsolv
|
|
dnf install -y tree git gcc gcc-c++ meson check-devel libudev-devel libevdev-devel valgrind python3-gobject python3-evdev glib2-devel python3-lxml python3-devel swig
|
|
|
|
|
|
fedora_settings: &fedora_settings
|
|
<<: *default_settings
|
|
steps:
|
|
- *fedora_fetch_cache
|
|
- *fedora_install
|
|
- checkout
|
|
- *start_dbus
|
|
- *build_and_test
|
|
- *install
|
|
- *check_install
|
|
- *check_uninstall
|
|
- *export_logs
|
|
|
|
|
|
ubuntu_settings: &ubuntu_settings
|
|
<<: *default_settings
|
|
steps:
|
|
- run:
|
|
name: Install prerequisites
|
|
command: |
|
|
apt-get update
|
|
apt-get install -y software-properties-common
|
|
add-apt-repository universe
|
|
apt-get update
|
|
apt-get install -y tree git gcc g++ pkg-config meson check libudev-dev libevdev-dev libsystemd-dev valgrind python3-gi python3-evdev libglib2.0-dev python3-lxml python3-dev swig systemd
|
|
- checkout
|
|
- *start_dbus
|
|
- *build_and_test
|
|
- *install
|
|
- *check_install
|
|
- *check_uninstall
|
|
- *export_logs
|
|
|
|
doc_build: &doc_build
|
|
<<: *default_settings
|
|
steps:
|
|
- *fedora_fetch_cache
|
|
- *fedora_install
|
|
- run:
|
|
name: Install documentation build-deps
|
|
command: dnf install -y python3-sphinx python3-sphinx_rtd_theme doxygen libxslt
|
|
- checkout
|
|
- *build_with_docs
|
|
- *export_logs
|
|
- store_artifacts:
|
|
path: ~/libratbag/build/doc/html
|
|
- persist_to_workspace:
|
|
root: build
|
|
paths:
|
|
- doc/html/*
|
|
|
|
docs_deploy: &docs_deploy
|
|
<<: *default_settings
|
|
steps:
|
|
- *fedora_fetch_cache
|
|
- run:
|
|
name: Install prerequisites
|
|
command: dnf install -y git tree
|
|
- checkout
|
|
- attach_workspace:
|
|
at: build
|
|
- run:
|
|
name: Setup the deploy SSH key
|
|
command: |
|
|
ssh-add -L | tail -n1 > ~/.ssh/deploy.pub
|
|
cat <<EOF > ~/.ssh/config
|
|
Host github.com
|
|
IdentityFile /root/.ssh/deploy.pub
|
|
IdentitiesOnly yes
|
|
EOF
|
|
- run:
|
|
name: Clone doc repository
|
|
command: |
|
|
cd ~
|
|
git clone ssh://git@github.com/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_REPONAME}.github.io
|
|
- run:
|
|
name: Copy the doc, commit and push
|
|
command: |
|
|
set +e
|
|
cd ~/${CIRCLE_PROJECT_REPONAME}.github.io
|
|
\cp -r ~/${CIRCLE_PROJECT_REPONAME}/build/doc/html/* .
|
|
if ! git diff-index --quiet HEAD --; then
|
|
git config --global user.email "libratbag@librabtag.github.io"
|
|
git config --global user.name "The libratbag crew"
|
|
git add .
|
|
git commit -m "update docs from ${CIRCLE_SHA1}"
|
|
git push
|
|
fi
|
|
|
|
version: 2
|
|
jobs:
|
|
fedora_rawhide:
|
|
<<: *fedora_settings
|
|
docker:
|
|
- image: fedora:rawhide
|
|
fedora_cache:
|
|
<<: *fedora_prep_cache
|
|
docker:
|
|
- image: fedora:28
|
|
fedora_latest:
|
|
<<: *fedora_settings
|
|
docker:
|
|
- image: fedora:28
|
|
ubuntu_17_10:
|
|
<<: *ubuntu_settings
|
|
docker:
|
|
- image: ubuntu:artful
|
|
doc_build:
|
|
<<: *doc_build
|
|
docker:
|
|
- image: fedora:28
|
|
doc_deploy:
|
|
<<: *docs_deploy
|
|
docker:
|
|
- image: fedora:28
|
|
|
|
|
|
workflows:
|
|
version: 2
|
|
compile_and_test:
|
|
jobs:
|
|
# - fedora_rawhide
|
|
- fedora_cache
|
|
- ubuntu_17_10
|
|
- fedora_latest:
|
|
requires:
|
|
- fedora_cache
|
|
- doc_build:
|
|
requires:
|
|
- fedora_cache
|
|
- doc_deploy:
|
|
requires:
|
|
- fedora_cache
|
|
- doc_build
|
|
filters:
|
|
branches:
|
|
only: master
|