Skip to content

Commit

Permalink
Run in docker.
Browse files Browse the repository at this point in the history
Run go get outside of docker.
  • Loading branch information
sobomax committed Oct 5, 2023
1 parent f384aea commit 1b5fe41
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,13 @@ jobs:
with:
go-version: 1.21.1

- name: Pull and run build in Docker container
run: |
docker pull sippylabs/rtpproxy:latest
- name: Build
run: make
run: |
echo ${RUNNER_TOOL_CACHE}
docker run --rm -v ${RUNNER_TOOL_CACHE}:${RUNNER_TOOL_CACHE} -v ${HOME}:${HOME} -e PATH \
-e WORKSPACE=${{ github.workspace }} --entrypoint /bin/sh sippylabs/rtpproxy:latest -c \
'set -e; cd ${WORKSPACE}; apt install -y gcc; go build -buildvcs=false -o rtp_cluster; ${WORKSPACE}/scripts/travis/test_run.sh'
12 changes: 2 additions & 10 deletions scripts/travis/functions.sub
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
BUILDDIR="${BUILDDIR:-${BASEDIR}}"

DISTDIR="${BUILDDIR}/dist"
TESTSDIR="${BASEDIR}/tests"

RTPPDDIR="${DISTDIR}/rtpproxy"
SIPPY_DIR="${BASEDIR}/sippy_lite"

if [ "${RTPP_TEST_VER}" = "production" ]
then
RTPPROXY_BIN="${RTPPDDIR}/src/rtpproxy"
RTPPROXY_BIN="rtpproxy"
else
RTPPROXY_BIN="${RTPPDDIR}/src/rtpproxy_debug"
RTPPROXY_BIN="rtpproxy_debug"
fi
##if [ "${RTPP_BRANCH}" != "master" ]
##then
## RTPPDDIR_m="${RTPPDDIR}.master"
##else
## RTPPDDIR_m="${RTPPDDIR}"
##fi

init_mr_time() {
MR_TIME="`python ${SIPPY_DIR}/sippy/tools/getmonotime.py -S ${SIPPY_DIR} -r`"
Expand Down
4 changes: 4 additions & 0 deletions scripts/travis/test_run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/bin/sh

set -e
set -x

BASEDIR="${BASEDIR:-$(dirname -- "${0}")/../..}"
BASEDIR="$(readlink -f -- ${BASEDIR})"

SHELL="${SHELL:-"/bin/sh"}"

. ${BASEDIR}/scripts/travis/functions.sub

cd ${TESTSDIR}
ls -l
#init_mr_time
RTPPROXY_CMD="${RTPPROXY_BIN}" exec ${SHELL} basic_network

0 comments on commit 1b5fe41

Please sign in to comment.