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