diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 23d03fab..54aff681 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,9 +22,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.3 - - name: Set up QEMU uses: docker/setup-qemu-action@master with: @@ -51,9 +48,6 @@ jobs: file: ./Dockerfile-${{ matrix.os }} build-args: | REVISION=${{ github.ref }} - SCCACHE_GHA_ENABLED=true - ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} - ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} platforms: ${{ env.build_platforms }} push: false cache-from: | diff --git a/Dockerfile-alpine b/Dockerfile-alpine index c05b353a..c2bdbec7 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -11,7 +11,6 @@ RUN apk add --no-cache \ libc6-compat \ perl \ unzip \ - sccache \ bash SHELL ["/bin/bash", "-c"] @@ -29,13 +28,6 @@ RUN if [[ "$BUILDPLATFORM" == "linux/arm64" ]] ; then export PROTOC_ARCH=aarch_6 rm /tmp/protoc.zip && \ ln -s /opt/protoc/bin/protoc /usr/bin/ -# Set RUSTC_WRAPPER=/usr/bin/sccache to enable `sccache` caching. -ARG RUSTC_WRAPPER=/usr/bin/sccache -# These should be set for Github Actions caching -ARG SCCACHE_GHA_ENABLED -ARG ACTIONS_CACHE_URL -ARG ACTIONS_RUNTIME_TOKEN - # Create a dummy package RUN cargo init /usr/src/abci-app WORKDIR /usr/src/abci-app @@ -54,15 +46,11 @@ ARG REVISION="refs/heads/master" # 2. We add `--config net.git-fetch-with-cli=true` to address ARM build issue, # see https://github.com/rust-lang/cargo/issues/10781#issuecomment-1441071052 # 3. To preserve space on github cache, we call `cargo clean`. -# 4. We set SCCACHE_SERVER_PORT to avoid conflicts during parallel builds -RUN --mount=type=cache,sharing=shared,target=/root/.cache/sccache \ - --mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/index \ +RUN --mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,target=${CARGO_HOME}/git/db \ - SCCACHE_SERVER_PORT=$((RANDOM+1025)) cargo add --config net.git-fetch-with-cli=true \ + cargo add --config net.git-fetch-with-cli=true \ --git https://github.com/dashpay/rs-tenderdash-abci --rev "${REVISION}" tenderdash-abci && \ cargo build --config net.git-fetch-with-cli=true && \ cargo run --config net.git-fetch-with-cli=true && \ - cargo clean && \ - sccache --show-stats - + cargo clean diff --git a/Dockerfile-debian b/Dockerfile-debian index d758fd19..319fbfa5 100644 --- a/Dockerfile-debian +++ b/Dockerfile-debian @@ -13,25 +13,6 @@ RUN --mount=type=cache,sharing=locked,target=/var/lib/apt/lists \ wget \ bash - -# -# Install sccache - build cache for Rust. -# This is optional, but it will speed up the build process -# -ARG SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v0.4.0/sccache-v0.4.0-x86_64-unknown-linux-musl.tar.gz" -RUN wget -q -O /tmp/sccache.tar.gz ${SCCACHE_URL} \ - && mkdir -p /tmp/sccache \ - && tar -z -C /tmp/sccache -xf /tmp/sccache.tar.gz \ - && mv /tmp/sccache/sccache*/sccache /usr/bin/sccache \ - && rm -r /tmp/sccache.tar.gz /tmp/sccache - -# Set RUSTC_WRAPPER=/usr/bin/sccache to enable `sccache` caching. -ARG RUSTC_WRAPPER=/usr/bin/sccache -# These should be set for Github Actions caching -ARG SCCACHE_GHA_ENABLED -ARG ACTIONS_CACHE_URL -ARG ACTIONS_RUNTIME_TOKEN - # Create a dummy package RUN cargo init /usr/src/abci-app WORKDIR /usr/src/abci-app @@ -50,13 +31,10 @@ SHELL ["/bin/bash", "-c"] # 2. We add `--config net.git-fetch-with-cli=true` to address ARM build issue, # see https://github.com/rust-lang/cargo/issues/10781#issuecomment-1441071052 # 3. To preserve space on github cache, we call `cargo clean`. -# 4. We set SCCACHE_SERVER_PORT to avoid conflicts during parallel builds -RUN --mount=type=cache,sharing=shared,target=/root/.cache/sccache \ - --mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/index \ +RUN --mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,target=${CARGO_HOME}/git/db \ - SCCACHE_SERVER_PORT=$((RANDOM+1025)) cargo add --config net.git-fetch-with-cli=true \ + cargo add --config net.git-fetch-with-cli=true \ --git https://github.com/dashpay/rs-tenderdash-abci --rev "${REVISION}" tenderdash-abci && \ cargo build --config net.git-fetch-with-cli=true && \ - cargo clean && \ - sccache --show-stats + cargo clean