@@ -176,6 +176,55 @@ def binaries_pipeline(context, platform):
176176 context .build .event == "tag" and context .build .ref
177177 ) or context .build .commit
178178
179+ steps = []
180+ crypto_library = ""
181+
182+ if platform ["os" ] == "linux" :
183+ steps .append ({
184+ "name" : "libraries" ,
185+ "commands" : [
186+ 'apt -o DPkg::Lock::Timeout=60 install -y libnss3-dev libssl-dev pkg-config' ,
187+ ],
188+ })
189+
190+ if platform ["os" ] == "darwin" :
191+ # difficult to get the other options compiling on darwin at the moment
192+ crypto_library = " -D SRTP_CRYPTO_LIBRARY=mbedtls "
193+
194+ steps .extend ([
195+ {
196+ "name" : "binaries" ,
197+ "commands" : [
198+ 'export CI_PATH="$(realpath ..)"' ,
199+ "echo {} | tee BUILD_VERSION" .format (version ),
200+ "meson setup -DLOAD_BALANCE=true -DNORIST=true -DNORIST=true -Dprefix=$CI_PATH --default-library static build " + crypto_library ,
201+ "cd build/" ,
202+ "ninja && ninja install" ,
203+ ],
204+ },
205+ {
206+ "name" : "compress" ,
207+ "commands" : [
208+ 'export CI_PATH="$(realpath ..)"' ,
209+ "cd $CI_PATH/bin/" ,
210+ "tar -czvf livepeer-mistserver-%s-%s.tar.gz ./*"
211+ % (platform ["os" ], platform ["arch" ]),
212+ ],
213+ },
214+ {
215+ "name" : "upload" ,
216+ "commands" : [
217+ 'scripts/upload_build.sh -d "$(realpath ..)/bin" "livepeer-mistserver-%s-%s.tar.gz"'
218+ % (platform ["os" ], platform ["arch" ]),
219+ ],
220+ "environment" : get_environment (
221+ "GCLOUD_KEY" ,
222+ "GCLOUD_SECRET" ,
223+ "GCLOUD_BUCKET" ,
224+ ),
225+ },
226+ ])
227+
179228 return {
180229 "kind" : "pipeline" ,
181230 "name" : "build-%s-%s" % (platform ["os" ], platform ["arch" ]),
@@ -191,39 +240,7 @@ def binaries_pipeline(context, platform):
191240 },
192241 "workspace" : {"path" : "drone/mistserver" },
193242 "clone" : {"depth" : 0 },
194- "steps" : [
195- {
196- "name" : "binaries" ,
197- "commands" : [
198- 'export CI_PATH="$(realpath ..)"' ,
199- "echo {} | tee BUILD_VERSION" .format (version ),
200- "meson setup -DLOAD_BALANCE=true -DNORIST=true -DNORIST=true -Dprefix=$CI_PATH --default-library static build" ,
201- "cd build/" ,
202- "ninja && ninja install" ,
203- ],
204- },
205- {
206- "name" : "compress" ,
207- "commands" : [
208- 'export CI_PATH="$(realpath ..)"' ,
209- "cd $CI_PATH/bin/" ,
210- "tar -czvf livepeer-mistserver-%s-%s.tar.gz ./*"
211- % (platform ["os" ], platform ["arch" ]),
212- ],
213- },
214- {
215- "name" : "upload" ,
216- "commands" : [
217- 'scripts/upload_build.sh -d "$(realpath ..)/bin" "livepeer-mistserver-%s-%s.tar.gz"'
218- % (platform ["os" ], platform ["arch" ]),
219- ],
220- "environment" : get_environment (
221- "GCLOUD_KEY" ,
222- "GCLOUD_SECRET" ,
223- "GCLOUD_BUCKET" ,
224- ),
225- },
226- ],
243+ "steps" : steps ,
227244 }
228245
229246
0 commit comments