Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson_options: default to nss #7

Open
wants to merge 4 commits into
base: catalyst
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 50 additions & 33 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,55 @@ def binaries_pipeline(context, platform):
context.build.event == "tag" and context.build.ref
) or context.build.commit

steps = []
crypto_library = ""

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":
# difficult to get the other options compiling on darwin at the moment
crypto_library = " -D SRTP_CRYPTO_LIBRARY=mbedtls "

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 " + crypto_library,
"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"]),
Expand All @@ -191,39 +240,7 @@ def binaries_pipeline(context, platform):
},
"workspace": {"path": "drone/mistserver"},
"clone": {"depth": 0},
"steps": [
{
"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",
),
},
],
"steps": steps,
}


Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /src

RUN apt update -yq \
&& apt install -yqq build-essential cmake git python3-pip \
&& apt install -yqq build-essential cmake git python3-pip libnss3-dev libssl-dev pkg-config \
&& pip3 install -U meson ninja

COPY . .
Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ option('WITH_JPG', description: 'Build JPG thumbnailer output support (WIP)', ty
option('WITH_SANITY', description: 'Enable MistOutSanityCheck output for testing purposes', type: 'boolean', value: false)
option('LSP_MINIFY', description: 'Try to minify LSP JS via java closure-compiler, generally not needed unless changing JS code as a minified version is part of the repository already', type: 'boolean', value: false)
option('LOCAL_GENERATORS', description: 'Attempts to find a locally-installed version of sourcery and make_html, instead of compiling it', type: 'boolean', value: false)
option('SRTP_CRYPTO_LIBRARY', type: 'combo', choices : ['none', 'openssl', 'nss', 'mbedtls'], value : 'mbedtls', description : 'What external crypto library to leverage for libsrtp2, if any (OpenSSL, NSS, or mbedtls)')
option('SRTP_CRYPTO_LIBRARY', type: 'combo', choices : ['none', 'openssl', 'nss', 'mbedtls'], value : 'nss', description : 'What external crypto library to leverage for libsrtp2, if any (OpenSSL, NSS, or mbedtls)')