From 469972354aed86904b84b6b621df791ee8e20b88 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Wed, 4 Oct 2023 23:41:15 +0000 Subject: [PATCH] Run in docker. Run go get outside of docker. --- .github/workflows/go.yml | 10 +++++++++- scripts/travis/test_run.sh | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 98465aa..f3d2b05 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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' diff --git a/scripts/travis/test_run.sh b/scripts/travis/test_run.sh index 2165635..54d4b1a 100755 --- a/scripts/travis/test_run.sh +++ b/scripts/travis/test_run.sh @@ -1,6 +1,7 @@ #!/bin/sh set -e +set -x BASEDIR="${BASEDIR:-$(dirname -- "${0}")/../..}" BASEDIR="$(readlink -f -- ${BASEDIR})" @@ -8,5 +9,6 @@ BASEDIR="$(readlink -f -- ${BASEDIR})" . ${BASEDIR}/scripts/travis/functions.sub cd ${TESTSDIR} +ls -l #init_mr_time RTPPROXY_CMD="${RTPPROXY_BIN}" exec ${SHELL} basic_network