-
Notifications
You must be signed in to change notification settings - Fork 0
319 lines (277 loc) · 9.82 KB
/
dep_evlua.yml
File metadata and controls
319 lines (277 loc) · 9.82 KB
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
name: EVLUA_DEPRECTAED_SCRIPT
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
build:
name: build evlua
runs-on: ubuntu-22.04
environment: production
steps:
- name: configure environment
run: |
echo "Building release: ${{ vars.RELEASE_VERSION }}"
echo "INSTALLATION_PATH=$(pwd)/installation" >> "$GITHUB_ENV"
echo "LUA_INSTALLATION_DIR=$(pwd)/lua" >> "$GITHUB_ENV"
echo "LUAROCKS_INSTALLATION_DIR=$(pwd)/luarocks" >> "$GITHUB_ENV"
echo "LUAROCKS_ROOT_INSTALLATION_DIR=$(pwd)/luarocks-root" >> "$GITHUB_ENV"
echo "THIRD_PARTY_INSTALLABLES=$(pwd)/third-party" >> "$GITHUB_ENV"
echo "POSTGRES_INSTALL_DIRECTORY=$(pwd)/postgres" >> "$GITHUB_ENV"
echo "EXCECUTABLE_PATH=$(pwd)/executable" >> "$GITHUB_ENV"
- name: create installation directory
run: |
echo "All installables will be installed in $INSTALLATION_PATH"
mkdir -p $INSTALLATION_PATH
echo "Installation directory created; creating other required directory"
mkdir -p $LUA_INSTALLATION_DIR
mkdir -p $LUAROCKS_INSTALLATION_DIR
mkdir -p $THIRD_PARTY_INSTALLABLES
mkdir -p $EXCECUTABLE_PATH
- name: install apt dependencies
run: |
sudo apt-get update
sudo apt install -y zlib1g
sudo apt-get install -y zlib1g-dev cmake g++ build-essential clang liblzma-dev libssl-dev libreadline-dev autoconf libtool libsqlite3-dev wget zip pkg-config
- name: checkout efio
uses : actions/checkout@v3
with :
repository: Tekenlight/efio
path: efio
- name: build and install efio
run: |
cd efio
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
cmake --build .
make install DESTDIR=$INSTALLATION_PATH
- name: checkout hiredis
uses : actions/checkout@v3
with :
repository: Tekenlight/hiredis
path: hiredis
- name: build and install hiredis
run: |
cd hiredis
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
cmake --build .
make install DESTDIR=$INSTALLATION_PATH
- name: checkout http-parser
uses : actions/checkout@v3
with :
repository: Tekenlight/http-parser
path: http-parser
- name: build and install http-parser
run: |
cd http-parser
make install PREFIX=/usr DESTDIR=$INSTALLATION_PATH
- name: checkout libev
uses : actions/checkout@v3
with :
repository: Tekenlight/libev
path: libev
- name: build and install libev
run: |
cd libev
autoreconf -i
./configure --prefix=$INSTALLATION_PATH/usr --exec-prefix=$INSTALLATION_PATH/usr
make
make install
- name: checkout libxml2
uses : actions/checkout@v3
with :
repository: Tekenlight/libev
path: libxml2
- name: build and install libxml2
run: |
cd libxml2
autoreconf -i
./configure --without-python --prefix=$INSTALLATION_PATH/usr --exec-prefix=$INSTALLATION_PATH/usr
make
make install
- name: checkout lua
uses : actions/checkout@v3
with :
repository: Tekenlight/lua
path: lua
- name: checkout lua-5-3-5-build
uses : actions/checkout@v3
with :
repository: Tekenlight/lua-5-3-5-build
path: lua-5-3-5-build
- name: install lua
run: |
cd lua-5-3-5-build
mkdir src
cp -r ../lua/* ./src/
make linux
make install INSTALL_TOP=$LUA_INSTALLATION_DIR
ls -l $LUA_INSTALLATION_DIR
- name: dowload and install luarocks
run: |
cd $THIRD_PARTY_INSTALLABLES
wget https://luarocks.org/releases/luarocks-3.8.0.tar.gz
tar xvzf luarocks-3.8.0.tar.gz
cd luarocks-3.8.0
./configure --prefix=$LUAROCKS_INSTALLATION_DIR --rocks-tree=$LUAROCKS_ROOT_INSTALLATION_DIR --with-lua=$LUA_INSTALLATION_DIR
make
make install
- name: dowload and install postgresql
run: |
cd $THIRD_PARTY_INSTALLABLES
POSTGRES_DIRECTORY=$THIRD_PARTY_INSTALLABLES"/postgresql-15.3"
wget https://ftp.postgresql.org/pub/source/v15.3/postgresql-15.3.tar.gz
tar xvzf postgresql-15.3.tar.gz
cd $POSTGRES_DIRECTORY
CFLAGS=-fPIC ./configure
cd $POSTGRES_DIRECTORY/src/interfaces/libpq/
make
make install DESTDIR=$POSTGRES_INSTALL_DIRECTORY
cd $POSTGRES_DIRECTORY/src/bin/pg_config
make install DESTDIR=$POSTGRES_INSTALL_DIRECTORY
cd $POSTGRES_DIRECTORY/src/backend
make generated-headers
cd $POSTGRES_DIRECTORY/src/include
make install DESTDIR=$POSTGRES_INSTALL_DIRECTORY
cd $POSTGRES_DIRECTORY/src/common
make install DESTDIR=$POSTGRES_INSTALL_DIRECTORY
cd $POSTGRES_DIRECTORY/src/port
make install DESTDIR=$POSTGRES_INSTALL_DIRECTORY
- name: checkout evpoco
uses : actions/checkout@v3
with :
repository: Tekenlight/evpoco
# ref: lualib_cmake_changes
path: evpoco
- name: build and install evpoco
run: |
cd evpoco
mkdir cmake-build
cd cmake-build
cmake -DPG_BUILD_PATH=$POSTGRES_INSTALL_DIRECTORY -DCMAKE_INSTALL_PREFIX:PATH=$INSTALLATION_PATH/usr -DLUA_INSTALL_DIR=$LUA_INSTALLATION_DIR ..
cmake --build .
make install
- name: checkout lua-cjson
uses : actions/checkout@v3
with :
repository: Tekenlight/lua-cjson
path: lua-cjson
- name: build and install lua-cjson
run: |
cd lua-cjson
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: checkout date
uses : actions/checkout@v3
with :
repository: Tekenlight/date
path: date
- name: build and install date
run: |
cd date
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: checkout lua_schema
uses : actions/checkout@v3
with :
repository: Tekenlight/lua_schema
path: lua_schema
- name: build and install lua_schema
run: |
cd lua_schema
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: checkout luaffifb
uses : actions/checkout@v3
with :
repository: Tekenlight/luaffifb
path: luaffifb
- name: build and install luaffifb
run: |
cd luaffifb
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: checkout lbc-101
uses : actions/checkout@v3
with :
repository: Tekenlight/lbc-101
path: lbc-101
- name: build and install lbc-101
run: |
cd lbc-101
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: checkout luaposix
uses : actions/checkout@v3
with :
repository: Tekenlight/luaposix
path: luaposix
- name: build and install luaposix
run: |
cd luaposix
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: checkout Penlight
uses : actions/checkout@v3
with :
repository: Tekenlight/Penlight
path: Penlight
- name: build and install Penlight
run: |
cd Penlight
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: checkout lua-uri
uses : actions/checkout@v3
with :
repository: Tekenlight/lua-uri
path: lua-uri
- name: build and install lua-uri
run: |
cd lua-uri
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: checkout service_utils
uses : actions/checkout@v3
with :
repository: Tekenlight/service_utils
ref: gtbl_changes
path: service_utils
- name: build and install service_utils
run: |
cd service_utils
$LUAROCKS_INSTALLATION_DIR/bin/luarocks make
- name: copy rocksfile
run: |
cp -r $LUAROCKS_ROOT_INSTALLATION_DIR/* $INSTALLATION_PATH/usr
- name: checkout evlua_build
uses : actions/checkout@v3
with :
repository: Tekenlight/evlua_build
path: evlua_build
- name: create installable
run: |
mkdir -p $INSTALLATION_PATH/DEBIAN
cd evlua_build
cp controlfile $INSTALLATION_PATH/DEBIAN/control
chmod -R 755 $INSTALLATION_PATH/DEBIAN
chmod -R 755 $INSTALLATION_PATH/usr
dpkg-deb --build $INSTALLATION_PATH $EXCECUTABLE_PATH/evlua-${{ vars.RELEASE_VERSION }}.deb
ls -l $EXCECUTABLE_PATH
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ vars.RELEASE_VERSION }}
release_name: Release v${{ vars.RELEASE_VERSION }}
body: |
Release Notes for v${{ vars.RELEASE_VERSION }}:
- Some notes
- name: Upload .deb File
id: upload_deb
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: $EXCECUTABLE_PATH/executables/evlua-${{ vars.RELEASE_VERSION }}.deb
asset_name: evlua-${{ vars.RELEASE_VERSION }}.deb
asset_content_type: application/x-deb