1
+ name : WebOS build
2
+ on :
3
+ push :
4
+ pull_request :
5
+ workflow_dispatch :
6
+
7
+ env :
8
+ TOOLCHAIN_URL : https://api.cirrus-ci.com/v1/artifact/task/6155872014434304/sdk/output/images/arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
9
+ TOOLCHAIN_DIR : /opt/arm-webos-linux-gnueabi_sdk-buildroot
10
+ TOOLCHAIN_FILE : /opt/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake
11
+ BUILD_DIR_NATIVE : build-x86x64
12
+ BUILD_DIR_CROSS : build-cross
13
+ CCACHE_COMPRESS : true
14
+ CCACHE_COMPRESSLEVEL : 6
15
+ CCACHE_MAXSIZE : 600M
16
+
17
+ jobs :
18
+ build_hyperion_ng :
19
+ runs-on : ubuntu-latest
20
+ defaults :
21
+ run :
22
+ working-directory : ./hyperion.ng
23
+
24
+ steps :
25
+ - uses : actions/checkout@v3
26
+ with :
27
+ repository : tuxuser/hyperion.ng
28
+ ref : tmp/webos/lil_patches
29
+ path : hyperion.ng
30
+ submodules : recursive
31
+
32
+ - name : Restore/Cache build directories
33
+ uses : actions/cache@v2
34
+ with :
35
+ path : |
36
+ ${{ github.workspace }}/ccache_basedir
37
+ key : ${{ runner.os }}-hyperion.ng-ccache
38
+
39
+ - name : Create build directories
40
+ run : |
41
+ mkdir -p ${{ github.workspace }}/ccache_basedir
42
+ mkdir -p ./${BUILD_DIR_NATIVE}
43
+ mkdir -p ./${BUILD_DIR_CROSS}
44
+
45
+ - name : Download and unpack toolchain
46
+ working-directory : /opt
47
+ run : |
48
+ wget -q -O toolchain.tar.gz ${TOOLCHAIN_URL}
49
+ tar xf toolchain.tar.gz
50
+
51
+ - name : Relocate toolchain
52
+ run : |
53
+ pushd ${TOOLCHAIN_DIR}
54
+ ./relocate-sdk.sh
55
+ popd
56
+
57
+ - name : Install native dependencies
58
+ env :
59
+ apt_deps : ccache git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev python3-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libturbojpeg0-dev libssl-dev libmbedtls-dev
60
+ run : |
61
+ sudo apt update
62
+ sudo apt install -y ${{ env.apt_deps }}
63
+
64
+ - name : Build native
65
+ env :
66
+ CCACHE_BASEDIR : ${{ github.workspace }}/ccache_basedir
67
+ CCACHE_DIR : ${{ github.workspace }}/ccache_basedir/.ccache-native
68
+ run : |
69
+ pushd ./${BUILD_DIR_NATIVE}
70
+ cmake .. \
71
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
72
+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
73
+ -DCMAKE_BUILD_TYPE=Release \
74
+ -DENABLE_FLATBUF_SERVER=OFF \
75
+ -DENABLE_DISPMANX=OFF \
76
+ -DENABLE_FB=OFF \
77
+ -DENABLE_V4L2=OFF \
78
+ -DENABLE_X11=OFF \
79
+ -DENABLE_XCB=OFF \
80
+ -DENABLE_BOBLIGHT_SERVER=OFF \
81
+ -DENABLE_CEC=OFF \
82
+ -DENABLE_DEV_NETWORK=OFF \
83
+ -DENABLE_DEV_SERIAL=OFF \
84
+ -DENABLE_DEV_TINKERFORGE=OFF \
85
+ -DENABLE_DEV_USB_HID=OFF \
86
+ -DENABLE_AVAHI=OFF \
87
+ -DENABLE_EFFECTENGINE=OFF \
88
+ -DENABLE_REMOTE_CTL=OFF \
89
+ -Wno-dev
90
+ make
91
+ popd
92
+
93
+ - name : Build cross (webos arm)
94
+ env :
95
+ CCACHE_BASEDIR : ${{ github.workspace }}/ccache_basedir
96
+ CCACHE_DIR : ${{ github.workspace }}/ccache_basedir/.ccache-cross
97
+ run : |
98
+ pushd ./${BUILD_DIR_CROSS}
99
+ cmake .. \
100
+ -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
101
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
102
+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
103
+ -DCMAKE_BUILD_TYPE=Release \
104
+ -DPLATFORM=rpi \
105
+ -DHYPERION_LIGHT=ON \
106
+ -DENABLE_QT=OFF \
107
+ -DENABLE_EFFECTENGINE=OFF \
108
+ -DENABLE_JSONCHECKS=OFF \
109
+ -DENABLE_DEV_SERIAL=ON \
110
+ -DENABLE_DEV_USB_HID=ON \
111
+ -DENABLE_DEV_WS281XPWM=OFF \
112
+ -DENABLE_DEV_TINKERFORGE=ON \
113
+ -DENABLE_AVAHI=OFF \
114
+ -DENABLE_DEPLOY_DEPENDENCIES=OFF \
115
+ -DENABLE_BOBLIGHT_SERVER=ON \
116
+ -DENABLE_FLATBUF_SERVER=ON \
117
+ -DENABLE_PROTOBUF_SERVER=OFF \
118
+ -DENABLE_FORWARDER=ON \
119
+ -DENABLE_FLATBUF_CONNECT=ON \
120
+ -DIMPORT_FLATC=${GITHUB_WORKSPACE}/hyperion.ng/${BUILD_DIR_NATIVE}/flatc_export.cmake
121
+ make
122
+ popd
123
+
124
+ - name : Copy built binaries to release/
125
+ run : |
126
+ mkdir ./release
127
+ cp -r ./${BUILD_DIR_CROSS}/bin/* ./release/
128
+ find ./release
129
+
130
+ - name : Copy dependencies to release/
131
+ env :
132
+ dependency_libs : libpng16.so.16 libjpeg.so.8 libcrypto.so.1.1 libz.so.1 libssl.so.1.1 libQt5Sql.so.5.15.2 libpcre2-16.so.0 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libk5crypto.so.3 libatomic.so.1 libQt5Core.so.5 libkrb5support.so.0 libcom_err.so.3 libstdc++.so.6 libkrb5.so.3 libQt5Sql.so.5 libgssapi_krb5.so.2 libQt5SerialPort.so.5 libQt5Sql.so.5.15 libusb-1.0.so.0
133
+ run : |
134
+ for i in ${{ env.dependency_libs }}; do find ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/ -name $i -exec cp {} ./release/ \;; done
135
+ mkdir -p ./release/sqldrivers
136
+ mkdir -p ./release/imageformats
137
+ cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/sqldrivers/libqsqlite.so ./release/sqldrivers/
138
+ cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqico.so ./release/imageformats/
139
+ cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqjpeg.so ./release/imageformats/
140
+ find ./release
141
+
142
+ - name : Upload artifacts
143
+ uses : actions/upload-artifact@v3
144
+ with :
145
+ name : hyperion.ng-build
146
+ path : ${{ github.workspace }}/hyperion.ng/release/*
147
+ if-no-files-found : error
148
+
149
+ build_ipk :
150
+ runs-on : ubuntu-latest
151
+ needs : build_hyperion_ng
152
+
153
+ steps :
154
+ - uses : actions/checkout@v1
155
+ with :
156
+ submodules : recursive
157
+
158
+ - uses : actions/download-artifact@v3
159
+ with :
160
+ name : hyperion.ng-build
161
+ path : hyperion.ng-build
162
+
163
+ - name : Display structure of downloaded files
164
+ run : ls -R
165
+
166
+ - name : Setup Node.js
167
+ uses : actions/setup-node@v1
168
+ with :
169
+ node-version : 14.x
170
+
171
+ - name : Reconfigure git to use HTTP authentication
172
+ run : >
173
+ git config --global url."https://github.com/".insteadOf
174
+
175
+
176
+ - run : npm ci
177
+ - run : npm run lint
178
+ - run : npm run build -- --production
179
+ - run : npm run build-service -- --env production
180
+
181
+ - name : Copy hyperion.ng into dist/service/
182
+ run : |
183
+ ls -R
184
+ cp -r ./hyperion.ng-build/* ./dist/service/
185
+ ls -R
186
+
187
+ - name : Ensure executables +x
188
+ run : |
189
+ chmod +x ./dist/service/hyperiond
190
+ chmod +x ./dist/service/hyperion-remote
191
+ chmod +x ./dist/service/flatc
192
+ chmod +x ./dist/service/flathash
193
+
194
+ chmod +x ./dist/assets/autostart.sh
195
+
196
+ - run : npm run package
197
+
198
+ - name : Upload artifact
199
+ uses : actions/upload-artifact@v3
200
+ with :
201
+ name : hyperion.ng-ipk
202
+ path : |
203
+ ${{github.workspace}}/*.ipk
204
+
205
+ - uses : marvinpinto/action-automatic-releases@latest
206
+ if : " github.ref == 'refs/heads/master'"
207
+ with :
208
+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
209
+ automatic_release_tag : latest
210
+ prerelease : true
211
+ title : " Development Build"
212
+ files : |
213
+ ${{github.workspace}}/*.ipk
0 commit comments