diff --git a/.drone.star b/.drone.star index 47e80c86d..3700aaa59 100644 --- a/.drone.star +++ b/.drone.star @@ -1,8 +1,8 @@ PLATFORMS = [ {"os": "linux", "arch": "amd64"}, {"os": "linux", "arch": "arm64"}, - # {"os": "darwin", "arch": "amd64"}, - # {"os": "darwin", "arch": "arm64"}, + {"os": "darwin", "arch": "amd64"}, + {"os": "darwin", "arch": "arm64"}, ] DOCKER_REPOSITORY = "livepeerci/mistserver" @@ -176,6 +176,58 @@ def binaries_pipeline(context, platform): context.build.event == "tag" and context.build.ref ) or context.build.commit + steps = [] + + if platform["os"] == "linux": + steps.append({ + "name": "libraries", + "commands": [ + 'apt -o DPkg::Lock::Timeout=60 install -y libnss3-dev libssl-dev pkg-config', + ], + }) + + if platform["os"] == "darwin": + steps.append({ + "name": "libraries", + "commands": [ + 'brew install nss', + ], + }) + + steps.extend([ + { + "name": "binaries", + "commands": [ + 'export CI_PATH="$(realpath ..)"', + "echo {} | tee BUILD_VERSION".format(version), + "meson setup -DLOAD_BALANCE=true -DNORIST=true -DNORIST=true -Dprefix=$CI_PATH --default-library static build", + "cd build/", + "ninja && ninja install", + ], + }, + { + "name": "compress", + "commands": [ + 'export CI_PATH="$(realpath ..)"', + "cd $CI_PATH/bin/", + "tar -czvf livepeer-mistserver-%s-%s.tar.gz ./*" + % (platform["os"], platform["arch"]), + ], + }, + { + "name": "upload", + "commands": [ + 'scripts/upload_build.sh -d "$(realpath ..)/bin" "livepeer-mistserver-%s-%s.tar.gz"' + % (platform["os"], platform["arch"]), + ], + "environment": get_environment( + "GCLOUD_KEY", + "GCLOUD_SECRET", + "GCLOUD_BUCKET", + ), + }, + ]) + return { "kind": "pipeline", "name": "build-%s-%s" % (platform["os"], platform["arch"]), @@ -191,41 +243,7 @@ def binaries_pipeline(context, platform): }, "workspace": {"path": "drone/mistserver"}, "clone": {"depth": 0}, - "steps": [ - { - "name": "binaries", - "commands": [ - 'apt update', - 'apt install -y libnss3-dev libssl-dev pkg-config', - 'export CI_PATH="$(realpath ..)"', - "echo {} | tee BUILD_VERSION".format(version), - "meson setup -DLOAD_BALANCE=true -DNORIST=true -DNORIST=true -Dprefix=$CI_PATH --default-library static build", - "cd build/", - "ninja && ninja install", - ], - }, - { - "name": "compress", - "commands": [ - 'export CI_PATH="$(realpath ..)"', - "cd $CI_PATH/bin/", - "tar -czvf livepeer-mistserver-%s-%s.tar.gz ./*" - % (platform["os"], platform["arch"]), - ], - }, - { - "name": "upload", - "commands": [ - 'scripts/upload_build.sh -d "$(realpath ..)/bin" "livepeer-mistserver-%s-%s.tar.gz"' - % (platform["os"], platform["arch"]), - ], - "environment": get_environment( - "GCLOUD_KEY", - "GCLOUD_SECRET", - "GCLOUD_BUCKET", - ), - }, - ], + "steps": steps, }