Use the include-what-you-use program to (partially) clean up header includes, so that only includes which are needed, and no includes that are not needed (or at least closer to that ideal) are done. For a c-language project, the build-time improvements from this change is minimal. This would have a much bigger impact on a C++ project than a C-project for build times. So for coturn, this change is mostly intended to just provide consistency and make it easier to locate weird issues like strange dependencies, and unnecessary connections between code.
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: 'ubuntu build dependencies'
|
|
description: 'install required build dependencies for ubuntu'
|
|
inputs:
|
|
SUDO:
|
|
description: "set to true to run apt as root"
|
|
required: false
|
|
default: false
|
|
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
|
|
- name: check if sudo is set
|
|
shell: bash
|
|
run: |
|
|
if [ ${{inputs.SUDO}} = true ]
|
|
then
|
|
AS_ROOT="sudo"
|
|
else
|
|
AS_ROOT=""
|
|
fi
|
|
echo "AS_ROOT=$AS_ROOT" >> $GITHUB_ENV
|
|
|
|
- name: apt update
|
|
shell: bash
|
|
run: ${{env.AS_ROOT}} apt update
|
|
|
|
- name: install build tools
|
|
shell: bash
|
|
run: |
|
|
${{env.AS_ROOT}} apt install -y \
|
|
build-essential \
|
|
clang \
|
|
clang-tidy \
|
|
ninja-build \
|
|
iwyu \
|
|
pkgconf \
|
|
wget
|
|
if [ "$(lsb_release -s -r)x" == "16.04x" ]; then apt install -y clang-tools; fi
|
|
|
|
- name: install coturn dependencies
|
|
shell: bash
|
|
run: |
|
|
${{env.AS_ROOT}} apt install -y \
|
|
libevent-dev \
|
|
libssl-dev \
|
|
libpq-dev \
|
|
libsqlite3-dev \
|
|
libhiredis-dev \
|
|
libmongoc-dev \
|
|
libmicrohttpd-dev
|
|
if [ "$(lsb_release -s -r)x" == "16.04x" ]; then apt-get install -y libmariadb-client-lgpl-dev; fi
|
|
if [ "$(lsb_release -s -r)x" == "16.04x" ]; then apt-get install -y libmariadb-dev; fi
|
|
|
|
- name: Prometheus Support
|
|
shell: bash
|
|
run: |
|
|
wget https://github.com/digitalocean/prometheus-client-c/releases/download/v0.1.3/libprom-dev-0.1.3-Linux.deb
|
|
wget https://github.com/digitalocean/prometheus-client-c/releases/download/v0.1.3/libpromhttp-dev-0.1.3-Linux.deb
|
|
${{env.AS_ROOT}} apt install -y ./libprom-dev-0.1.3-Linux.deb ./libpromhttp-dev-0.1.3-Linux.deb
|