Debian Codegraph @

.builds/alpine.yml

raw
1 image: alpine/latest
2 packages:
3 - astyle
4 - dbus-x11
5 - linux-lts-dev
6 - py3-autopep8
7 - py3-daemonize
8 - py3-dbus
9 - py3-gobject3
10 - py3-numpy
11 - py3-pylint
12 - py3-setproctitle
13 - py3-setuptools
14 - py3-udev
15 - sed
16 - vermin
17 sources:
18 - https://github.com/openrazer/openrazer
19 tasks:
20 - check-formatting: |
21 cd openrazer
22
23 # Check the formatting of the driver and the python code
24 ./scripts/ci/check-astyle-formatting.sh
25 ./scripts/ci/check-autopep8-formatting.sh
26
27 - check-misc: |
28 cd openrazer
29
30 # Check with pylint for errors
31 ./scripts/ci/check-pylint.sh
32 # Check for auto-generated files
33 ./scripts/ci/test-auto-generate.sh
34 # Check for hex casing issues
35 ./scripts/ci/test-hex-casing.sh
36 # Check for Python version compatibility
37 ./scripts/ci/test-vermin.sh
38
39 - compile-driver: |
40 cd openrazer
41
42 kerneldirs=(/lib/modules/*/build)
43 kerneldir="${kerneldirs[0]}"
44
45 # Work around the following error by disabling gcc plugins
46 # cc1: error: incompatible gcc/plugin versions
47 # cc1: error: failed to initialize plugin ./scripts/gcc-plugins/stackleak_plugin.so
48 sudo truncate -s 0 "$kerneldir"/scripts/Makefile.gcc-plugins
49
50 # Compile the kernel driver
51 echo "ccflags-y := -Wall -Werror" >> driver/Makefile
52 make KERNELDIR="$kerneldir"
53
54 - functional-test-setup: |
55 # The daemon wants the user to be in the plugdev group
56 sudo addgroup -S plugdev
57 sudo addgroup -S $USER plugdev
58
59 - functional-test: |
60 cd openrazer
61
62 # Clean up background processes on exit
63 trap "pkill -f openrazer-daemon;
64 pkill -f create_fake_dev;
65 pkill -f dbus-daemon" EXIT
66
67 # Launch dbus
68 eval $(dbus-launch --sh-syntax)
69
70 # Setup the fake driver
71 ./scripts/ci/setup-fakedriver.sh
72
73 # Launch the daemon
74 ./scripts/ci/launch-daemon.sh
75
76 # Wait for the daemon to be ready
77 sleep 5
78
79 # Run a simple check to see if the daemon is alive
80 ./scripts/ci/test-daemon.sh