Skip to content

Commit

Permalink
Add build_test_rtp_io_dock.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Oct 7, 2024
1 parent 001e4e7 commit 3f0a6c5
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/rtp.io.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,52 @@ jobs:
python -m pip install -r requirements.txt
DEBIAN_FRONTEND=noninteractive apt-get install -y gpp
sh -x ./test_run.sh
build_test_rtp_io_dock:
runs-on: ubuntu-latest
env:
BASE_IMAGE: ghcr.io/sippy/rtpproxy:latest
COMPILER: clang-18
BUILD_OS: ubuntu-latest
PYTHON_VERSION: 3.12

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Checkout VoIPTests repo
uses: actions/checkout@v4
with:
repository: 'sippy/voiptests'
path: dist/voiptests

- name: Checkout RTPProxy repo
uses: actions/checkout@v4
with:
repository: 'sippy/rtpproxy'
path: dist/rtpproxy

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set dynamic environment
run: |
PLATFORMS="`docker manifest inspect ${{ env.BASE_IMAGE }} | \
jq -r '.manifests[] | "\(.platform.os)/\(.platform.architecture)\(if .platform.variant != null then "/\(.platform.variant)" else "" end)"' | \
sort -u | grep -v unknown | paste -sd ','`"
echo "Platforms: ${PLATFORMS}"
echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_ENV
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/Dockerfile.rtp.io
build-args: |
BASE_IMAGE=${{ env.BASE_IMAGE }}
platforms: ${{ env.PLATFORMS }}
29 changes: 29 additions & 0 deletions docker/Dockerfile.rtp.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1.7-labs

ARG BASE_IMAGE="sippylabs/rtpproxy:latest"
FROM --platform=$TARGETPLATFORM $BASE_IMAGE AS build
LABEL maintainer="Maksym Sobolyev <sobomax@sippysoft.com>"

USER root

# Set Environment Variables
ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /tmp

ARG COMPILER=clang-18
ARG BUILD_OS=ubuntu-latest
RUN --mount=type=bind,source=scripts/build,target=scripts/build \
sh -x scripts/build/install_depends.sh

COPY --exclude=.git --exclude=.github . .

RUN pwd
RUN ls -l

ARG KEEP_MODULES="dialog sipmsgops sl tm rr maxfwd rtp.io rtpproxy textops"
ARG SKIP_MODULES="usrloc event_routing clusterer rtp_relay"
RUN mkdir tmp && cd modules mv ${KEEP_MODULES} ${SKIP_MODULES} ../tmp && \
rm -rf * && cd ../tmp && mv ${KEEP_MODULES} ${SKIP_MODULES} ../modules && \
cd .. && rmdir tmp
RUN EXCLUDE_MODULES_ADD="${SKIP_MODULES}" sh -x scripts/build/do_build.sh

0 comments on commit 3f0a6c5

Please sign in to comment.