Skip to content

Commit

Permalink
Pull latest ccache from ghcr.io/sobomax/ccache.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Aug 24, 2024
1 parent eb12562 commit fca795c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/rtpproxy_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,14 @@ jobs:
BASE_IMAGE: ${{ matrix.base_image }}
CCACHE_ROOT: ccache
DOCKER_RW: ${{ ( github.repository == 'sippy/rtpproxy' && github.event_name != 'pull_request' ) && 'true' || 'false' }}
CCACHE_BIN_IMAGE: ghcr.io/sobomax/ccache:${{ matrix.ccache_bin_image }}
strategy:
matrix:
base_image: ['debian:12-slim', 'ubuntu:latest']
include:
- base_image: 'debian:12-slim'
ccache_bin_image: 'latest-debian-12'
- base_image: 'ubuntu:latest'
ccache_bin_image: 'latest-ubuntu-24.04'
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -471,16 +476,11 @@ jobs:
CCACHE_IMAGE="${{ env.GHCR_REPO }}:${GIT_BRANCH}-${OS_TAG}-cccache"
if ! docker pull ${CCACHE_IMAGE} 2>&1 >/dev/null
then
_CCACHE_IMAGE="${{ env.DOCKER_REPO }}:${GIT_BRANCH}-${OS_TAG}-cccache"
if ! docker pull ${_CCACHE_IMAGE} 2>&1 >/dev/null
then
CCACHE_BIMAGE="scratch"
else
CCACHE_BIMAGE="${_CCACHE_IMAGE}"
fi
CCACHE_BIMAGE="scratch"
else
CCACHE_BIMAGE="${CCACHE_IMAGE}"
fi
docker pull ${CCACHE_BIN_IMAGE}
echo "CCACHE_IMAGE=${CCACHE_IMAGE}" >> $GITHUB_ENV
echo "CCACHE_BIMAGE=${CCACHE_BIMAGE}" >> $GITHUB_ENV
echo "BUILD_IMAGE=${{ env.LOCAL_REPO }}:latest-${OS_TAG}" >> $GITHUB_ENV
Expand Down Expand Up @@ -539,6 +539,7 @@ jobs:
BASE_IMAGE=${{ env.BASE_IMAGE }}
LIBG722_IMAGE=${{ env.LIBG722_IMAGE }}
CCACHE_IMAGE=${{ env.CCACHE_BIMAGE }}
CCACHE_BIN_IMAGE=${{ env.CCACHE_BIN_IMAGE }}
CCACHE_ROOT=${{ env.CCACHE_ROOT }}
LIBSSL_APKG=${{ env.LIBSSL_APKG }}
tags: ${{ env.BUILD_IMAGE }}
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
ARG BASE_IMAGE=debian:sid-slim
ARG LIBG722_IMAGE=sippylabs/libg722:latest-debian_sid-slim
ARG CCACHE_IMAGE=scratch
ARG CCACHE_BIN_IMAGE=ghcr.io/sobomax/ccache:latest-debian-12
FROM ${LIBG722_IMAGE} AS libg722
FROM ${CCACHE_BIN_IMAGE} AS ccache_bin
FROM ${BASE_IMAGE} AS build
LABEL maintainer="Maksym Sobolyev <[email protected]>"

Expand Down Expand Up @@ -36,14 +38,14 @@ RUN --mount=type=bind,source=docker/install_depends.sh,target=install_depends.sh

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

ARG CCACHE_ROOT

RUN mkdir -p /rtpproxy/ccache

FROM ${CCACHE_IMAGE} AS ccache
COPY --from=build /rtpproxy/ccache/ /rtpproxy/ccache/
FROM build
COPY --from=ccache /rtpproxy/ccache /rtpproxy/ccache
WORKDIR /rtpproxy
COPY --from=ccache_bin /usr/bin/ccache /usr/bin/ccache
RUN /rtpproxy/docker/build.sh
RUN ls -l /usr/local/bin/rtpproxy*
RUN ls -l /usr/local/bin/makeann*
Expand Down

0 comments on commit fca795c

Please sign in to comment.