-
Notifications
You must be signed in to change notification settings - Fork 8
159 lines (147 loc) · 6.04 KB
/
test.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: test
on:
push:
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
sudo apt-get update && \
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
zip grep file ca-certificates autotools-dev autoconf automake \
git bc wget rsync cmake make pkg-config yasm libtool \
libasound2-dev libv4l-dev ssh gzip tar \
python3-pip python3-distutils \
ca-certificates \
libconfig-dev \
libopus-dev \
libsodium-dev \
libvpx-dev \
pkg-config \
libavutil-dev \
libavcodec-dev \
libavformat-dev \
libavdevice-dev \
libavfilter-dev \
libswresample-dev \
libswscale-dev \
libx264-dev \
libx11-dev
- name: check for python3
run: |
python3 --version
- name: pwd
run: |
ls -al
pwd
- name: install python deps
run: |
python3 -m pip install evdev
- name: test-python-script
run: |
mkdir -p _test_python_/
cd _test_python_/;ls -al ../toxblinkenwall/ext_keys_scripts/ext_keys_evdev.py;sleep 15;python3 ../toxblinkenwall/ext_keys_scripts/ext_keys_evdev.py > log.txt 2> log.txt &
- name: test-python-script-reader
run: |
cd _test_python_/; mkfifo ../ext_keys.fifo;sleep 10; if [ -s log.txt ]; then ls -al log.txt;echo "python script ERROR"; cat log.txt;exit 1; fi
- name: install deps
run: |
pwd
mkdir -p build_dir/
cd build_dir/
wget -O toxcore_amalgamation.c 'https://raw.githubusercontent.com/zoff99/c-toxcore/zoff99/zoxcore_local_fork/amalgamation/toxcore_amalgamation.c'
wget -O Makefile 'https://raw.githubusercontent.com/zoff99/c-toxcore/zoff99/zoxcore_local_fork/amalgamation/Makefile'
mkdir -p tox/
wget -O tox/tox.h 'https://raw.githubusercontent.com/zoff99/c-toxcore/zoff99/zoxcore_local_fork/toxcore/tox.h'
wget -O tox/toxutil.h 'https://raw.githubusercontent.com/zoff99/c-toxcore/zoff99/zoxcore_local_fork/toxutil/toxutil.h'
wget -O tox/toxav.h 'https://raw.githubusercontent.com/zoff99/c-toxcore/zoff99/zoxcore_local_fork/toxav/toxav.h'
make
ls -al
- name: compile binary for Linux with X11
run: |
mkdir -p build_dir/
cd build_dir/
pwd
cp -av ../toxblinkenwall/toxblinkenwall.c ./
cp -av ../toxblinkenwall/rb.c ./
cp -av ../toxblinkenwall/rb.h ./
cp -av ../toxblinkenwall/stb_image_resize.h ./
ls -al
sed -i -e 's/#define HAVE_OUTPUT_OPENGL /#define HAVE_FRAMEBUFFER /' toxblinkenwall.c
sed -i -e 's/#define HAVE_OUTPUT_OMX /#define HAVE_FRAMEBUFFER /' toxblinkenwall.c
sed -i -e 'sx^// #define HAVE_X11_AS_FB 1x#define HAVE_X11_AS_FB 1x' toxblinkenwall.c
cat toxblinkenwall.c|grep 'define HAVE_OUTPUT_OPENGL'||echo _
cat toxblinkenwall.c|grep 'define HAVE_OUTPUT_OMX'||echo _
cat toxblinkenwall.c|grep 'define HAVE_FRAMEBUFFER'||echo _
cat toxblinkenwall.c|grep 'define HAVE_X11_AS_FB'||echo _
# make certain warnings into errors!
WARNS=' -Werror=implicit-function-declaration -Werror=div-by-zero -Werror=sign-compare -Werror=format=2 -Werror=int-conversion -Werror=implicit-function-declaration '
IGNRS=' -Wno-error=format-truncation= '
gcc \
-O3 -g \
$WARNS $IGNRS \
-fstack-protector-all \
-Wno-unused-variable \
-fPIC -export-dynamic -I./ \
-o toxblinkenwall \
-lm \
toxblinkenwall.c rb.c \
-std=gnu99 \
./libtoxcore.a \
$(pkg-config --cflags --libs x11 libsodium libswresample opus vpx libavcodec libswscale libavformat libavdevice libavutil x264) \
-pthread \
-lrt \
-lasound \
-lm \
-lv4lconvert || exit 1
res2=$?
ldd toxblinkenwall
ls -hal toxblinkenwall
file toxblinkenwall
cp -av toxblinkenwall toxblinkenwall_linux_x11
- name: compile binary for Linux Framebuffer
run: |
mkdir -p build_dir/
cd build_dir/
pwd
cp -av ../toxblinkenwall/toxblinkenwall.c ./
cp -av ../toxblinkenwall/rb.c ./
cp -av ../toxblinkenwall/rb.h ./
cp -av ../toxblinkenwall/stb_image_resize.h ./
ls -al
sed -i -e 's/#define HAVE_OUTPUT_OPENGL /#define HAVE_FRAMEBUFFER /' toxblinkenwall.c
sed -i -e 's/#define HAVE_OUTPUT_OMX /#define HAVE_FRAMEBUFFER /' toxblinkenwall.c
cat toxblinkenwall.c|grep 'define HAVE_OUTPUT_OPENGL'||echo _
cat toxblinkenwall.c|grep 'define HAVE_OUTPUT_OMX'||echo _
cat toxblinkenwall.c|grep 'define HAVE_FRAMEBUFFER'||echo _
cat toxblinkenwall.c|grep 'define HAVE_X11_AS_FB'||echo _
# make certain warnings into errors!
WARNS=' -Werror=implicit-function-declaration -Werror=div-by-zero -Werror=sign-compare -Werror=format=2 -Werror=int-conversion -Werror=implicit-function-declaration '
IGNRS=' -Wno-error=format-truncation= '
gcc \
-O3 -g \
$WARNS $IGNRS \
-fstack-protector-all \
-Wno-unused-variable \
-fPIC -export-dynamic -I./ \
-o toxblinkenwall \
-lm \
toxblinkenwall.c rb.c \
-std=gnu99 \
./libtoxcore.a \
$(pkg-config --cflags --libs x11 libsodium libswresample opus vpx libavcodec libswscale libavformat libavdevice libavutil x264) \
-pthread \
-lrt \
-lasound \
-lm \
-lv4lconvert || exit 1
res2=$?
ldd toxblinkenwall
ls -hal toxblinkenwall
file toxblinkenwall
cp -av toxblinkenwall toxblinkenwall_linux_fb