11PLATFORMS = [
22 {"os" : "linux" , "arch" : "amd64" },
33 {"os" : "linux" , "arch" : "arm64" },
4- # {"os": "darwin", "arch": "amd64"},
5- # {"os": "darwin", "arch": "arm64"},
4+ {"os" : "darwin" , "arch" : "amd64" },
5+ {"os" : "darwin" , "arch" : "arm64" },
66]
77
88DOCKER_REPOSITORY = "livepeerci/mistserver"
@@ -176,6 +176,58 @@ def binaries_pipeline(context, platform):
176176 context .build .event == "tag" and context .build .ref
177177 ) or context .build .commit
178178
179+ steps = []
180+
181+ if platform ["os" ] == "linux" :
182+ steps .append ({
183+ "name" : "libraries" ,
184+ "commands" : [
185+ 'apt -o DPkg::Lock::Timeout=60 install -y libnss3-dev libssl-dev pkg-config' ,
186+ ],
187+ })
188+
189+ if platform ["os" ] == "darwin" :
190+ steps .append ({
191+ "name" : "libraries" ,
192+ "commands" : [
193+ 'brew install nss' ,
194+ ],
195+ })
196+
197+ steps .extend ([
198+ {
199+ "name" : "binaries" ,
200+ "commands" : [
201+ 'export CI_PATH="$(realpath ..)"' ,
202+ "echo {} | tee BUILD_VERSION" .format (version ),
203+ "meson setup -DLOAD_BALANCE=true -DNORIST=true -DNORIST=true -Dprefix=$CI_PATH --default-library static build" ,
204+ "cd build/" ,
205+ "ninja && ninja install" ,
206+ ],
207+ },
208+ {
209+ "name" : "compress" ,
210+ "commands" : [
211+ 'export CI_PATH="$(realpath ..)"' ,
212+ "cd $CI_PATH/bin/" ,
213+ "tar -czvf livepeer-mistserver-%s-%s.tar.gz ./*"
214+ % (platform ["os" ], platform ["arch" ]),
215+ ],
216+ },
217+ {
218+ "name" : "upload" ,
219+ "commands" : [
220+ 'scripts/upload_build.sh -d "$(realpath ..)/bin" "livepeer-mistserver-%s-%s.tar.gz"'
221+ % (platform ["os" ], platform ["arch" ]),
222+ ],
223+ "environment" : get_environment (
224+ "GCLOUD_KEY" ,
225+ "GCLOUD_SECRET" ,
226+ "GCLOUD_BUCKET" ,
227+ ),
228+ },
229+ ])
230+
179231 return {
180232 "kind" : "pipeline" ,
181233 "name" : "build-%s-%s" % (platform ["os" ], platform ["arch" ]),
@@ -191,41 +243,7 @@ def binaries_pipeline(context, platform):
191243 },
192244 "workspace" : {"path" : "drone/mistserver" },
193245 "clone" : {"depth" : 0 },
194- "steps" : [
195- {
196- "name" : "binaries" ,
197- "commands" : [
198- 'apt update' ,
199- 'apt install -y libnss3-dev libssl-dev pkg-config' ,
200- 'export CI_PATH="$(realpath ..)"' ,
201- "echo {} | tee BUILD_VERSION" .format (version ),
202- "meson setup -DLOAD_BALANCE=true -DNORIST=true -DNORIST=true -Dprefix=$CI_PATH --default-library static build" ,
203- "cd build/" ,
204- "ninja && ninja install" ,
205- ],
206- },
207- {
208- "name" : "compress" ,
209- "commands" : [
210- 'export CI_PATH="$(realpath ..)"' ,
211- "cd $CI_PATH/bin/" ,
212- "tar -czvf livepeer-mistserver-%s-%s.tar.gz ./*"
213- % (platform ["os" ], platform ["arch" ]),
214- ],
215- },
216- {
217- "name" : "upload" ,
218- "commands" : [
219- 'scripts/upload_build.sh -d "$(realpath ..)/bin" "livepeer-mistserver-%s-%s.tar.gz"'
220- % (platform ["os" ], platform ["arch" ]),
221- ],
222- "environment" : get_environment (
223- "GCLOUD_KEY" ,
224- "GCLOUD_SECRET" ,
225- "GCLOUD_BUCKET" ,
226- ),
227- },
228- ],
246+ "steps" : steps ,
229247 }
230248
231249
0 commit comments