0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
obs-studio/CI/include/build_support_linux.sh
PatTheMav c993b6059a
CI: Update build scripts and Github actions workflow
Also updates main CMakeLists.txt and CMakeLists.txt for unit tests,
also adds additional build directories to .gitignore file
2022-03-16 23:13:26 +01:00

45 lines
1.2 KiB
Bash

#!/bin/bash
##############################################################################
# Linux support functions
##############################################################################
#
# This script file can be included in build scripts for Linux.
#
##############################################################################
# Setup build environment
CI_LINUX_CEF_VERSION=$(cat "${CI_WORKFLOW}" | sed -En "s/[ ]+CEF_BUILD_VERSION_LINUX: '([0-9]+)'/\1/p")
if [ "${TERM-}" -a -z "${CI}" ]; then
COLOR_RED=$(tput setaf 1)
COLOR_GREEN=$(tput setaf 2)
COLOR_BLUE=$(tput setaf 4)
COLOR_ORANGE=$(tput setaf 3)
COLOR_RESET=$(tput sgr0)
else
COLOR_RED=""
COLOR_GREEN=""
COLOR_BLUE=""
COLOR_ORANGE=""
COLOR_RESET=""
fi
if [ "${CI}" -o "${QUIET}" ]; then
export CURLCMD="curl --silent --show-error --location -O"
else
export CURLCMD="curl --progress-bar --location --continue-at - -O"
fi
_add_ccache_to_path() {
if [ "${CMAKE_CCACHE_OPTIONS}" ]; then
PATH="/usr/local/opt/ccache/libexec:${PATH}"
status "Compiler Info:"
local IFS=$'\n'
for COMPILER_INFO in $(type cc c++ gcc g++ clang clang++ || true); do
info "${COMPILER_INFO}"
done
fi
}