mirror of
https://github.com/coturn/coturn.git
synced 2025-10-26 20:41:07 +01:00
ubuntu build dependencies extracted to composite actions (#1399)
superseding changes made in pr #1394 on request of @jonesmz extracted ubuntu build dependencies into a composite action for maintainability reasons
This commit is contained in:
parent
2c265c9777
commit
294a2b69a0
61
.github/workflows/actions/ubuntu-build-deps/action.yml
vendored
Normal file
61
.github/workflows/actions/ubuntu-build-deps/action.yml
vendored
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
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
|
||||||
12
.github/workflows/clang-tidy.yml
vendored
12
.github/workflows/clang-tidy.yml
vendored
@ -18,14 +18,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: install dependencies
|
||||||
run: |
|
uses: ./.github/workflows/actions/ubuntu-build-deps
|
||||||
sudo apt-get update
|
with:
|
||||||
sudo apt install -y clang clang-tidy clang-tools ninja-build iwyu
|
SUDO: true
|
||||||
sudo apt install -y wget libevent-dev libssl-dev libpq-dev libmariadb-dev libsqlite3-dev libhiredis-dev libmongoc-dev libmicrohttpd-dev
|
|
||||||
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
|
|
||||||
sudo apt install -y ./libprom-dev-0.1.3-Linux.deb ./libpromhttp-dev-0.1.3-Linux.deb
|
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
12
.github/workflows/compiler-sanitizers.yml
vendored
12
.github/workflows/compiler-sanitizers.yml
vendored
@ -22,14 +22,12 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: install dependencies
|
||||||
|
uses: ./.github/workflows/actions/ubuntu-build-deps
|
||||||
|
with:
|
||||||
|
SUDO: true
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt install -y clang wget libevent-dev libssl-dev libpq-dev libmariadb-dev libsqlite3-dev libhiredis-dev libmongoc-dev libmicrohttpd-dev
|
|
||||||
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
|
|
||||||
sudo apt install -y ./libprom-dev-0.1.3-Linux.deb ./libpromhttp-dev-0.1.3-Linux.deb
|
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
17
.github/workflows/lint.yml
vendored
17
.github/workflows/lint.yml
vendored
@ -11,18 +11,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y clang-format-15
|
|
||||||
sudo apt install -y \
|
|
||||||
libevent-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libpq-dev libmariadb-dev libsqlite3-dev \
|
|
||||||
libhiredis-dev \
|
|
||||||
libmongoc-dev \
|
|
||||||
libmicrohttpd-dev \
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: install dependencies
|
||||||
|
uses: ./.github/workflows/actions/ubuntu-build-deps
|
||||||
|
with:
|
||||||
|
SUDO: true
|
||||||
|
- name: install clang-format-15
|
||||||
|
run: sudo apt install -y clang-format-15
|
||||||
- name: configure
|
- name: configure
|
||||||
run: ./configure
|
run: ./configure
|
||||||
- name: lint
|
- name: lint
|
||||||
|
|||||||
26
.github/workflows/tests.yml
vendored
26
.github/workflows/tests.yml
vendored
@ -2,7 +2,6 @@ name: C/C++ CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ $default-branch ]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, reopened, synchronize ]
|
types: [ opened, reopened, synchronize ]
|
||||||
|
|
||||||
@ -11,33 +10,16 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ 'ubuntu:16.04', 'ubuntu:20.04', 'ubuntu:22.04' ]
|
os: [ 'ubuntu:16.04', 'ubuntu:18.04', 'ubuntu:20.04', 'ubuntu:22.04' ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ${{ matrix.os }}
|
container: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
# Set env variable or otherwise tzdata package requires interaction
|
# Set env variable or otherwise tzdata package requires interaction
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
run: |
|
uses: ./.github/workflows/actions/ubuntu-build-deps
|
||||||
apt-get update
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential pkgconf
|
|
||||||
apt-get install -y \
|
|
||||||
wget \
|
|
||||||
libevent-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libpq-dev libsqlite3-dev \
|
|
||||||
libhiredis-dev \
|
|
||||||
libmongoc-dev \
|
|
||||||
libmicrohttpd-dev
|
|
||||||
if [ ${{ matrix.os }} = 'ubuntu:16.04' ]; then apt-get install -y libmariadb-client-lgpl-dev; fi
|
|
||||||
if [ ${{ matrix.os }} != 'ubuntu:16.04' ]; then apt-get install -y libmariadb-dev; fi
|
|
||||||
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 && \
|
|
||||||
apt install ./libprom-dev-0.1.3-Linux.deb ./libpromhttp-dev-0.1.3-Linux.deb && \
|
|
||||||
rm ./libprom-dev-0.1.3-Linux.deb ./libpromhttp-dev-0.1.3-Linux.deb
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: configure
|
- name: configure
|
||||||
run: ./configure
|
run: ./configure
|
||||||
- name: make
|
- name: make
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user