Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Jul 24, 2024
1 parent fe1f38b commit a172951
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/rtpproxy_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ jobs:
LOCAL_REPO: localhost:5000/sippylabs/rtpproxy
PLATFORMS: linux/amd64 #,linux/i386,linux/arm/v7,linux/arm64
BASE_IMAGE: debian:12-slim
CCACHE_ROOT: /tmp/ccache
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -449,7 +450,7 @@ jobs:
- name: Cache the compiler cache
uses: actions/cache@v4
with:
path: ccache
path: ${{ env.CCACHE_ROOT }}
key: dockerhub-ccache-${{ github.run_id }}
restore-keys: |
dockerhub-ccache
Expand All @@ -464,10 +465,11 @@ jobs:
with:
context: .
file: ./docker/Dockerfile
build-args: BASE_IMAGE=${{ env.BASE_IMAGE }}
build-args: |
BASE_IMAGE=${{ env.BASE_IMAGE }}
CCACHE_ROOT=${{ env.CCACHE_ROOT }}
tags: ${{ env.LOCAL_REPO }}:latest
platforms: ${{ env.PLATFORMS }}
outputs: type=tar,dest=/tmp/ccache_export.tar
push: true
cache-from: ${{ env.CACHE_SPEC }}
cache-to: ${{ env.CACHE_SPEC }},mode=max
Expand All @@ -492,6 +494,4 @@ jobs:

- name: Extract ccaches
run: |
rm -rf ccache
tar --strip-components=2 --no-wildcards-match-slash --wildcards -x -f /tmp/ccache_export.tar "*/rtpproxy/ccache"
du -d1 -h ccache
du -d1 -h ${{ env.CCACHE_ROOT }}
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ COPY docker/install_depends.sh /tmp
RUN ./install_depends.sh

COPY --exclude=.git* --link . /rtpproxy/

ARG CCACHE_ROOT
RUN --mount=type=cache,target=${CCACHE_ROOT}

WORKDIR /rtpproxy

RUN /rtpproxy/docker/build.sh
Expand Down
2 changes: 1 addition & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi

cd "${RTPDIR}"

CCACHE_ROOT="${RTPDIR}/ccache"
CCACHE_ROOT="${CCACHE_ROOT:-"${RTPDIR}/ccache"}"
export PATH="/usr/lib/ccache:${PATH}"
export CCACHE_DIR="${CCACHE_ROOT}/${ARCH}"
if [ ! -e "${CCACHE_DIR}" ]
Expand Down

0 comments on commit a172951

Please sign in to comment.