Skip to content

Commit

Permalink
build: remove random port
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Nov 8, 2024
1 parent 9ca6ffd commit 698a8a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions .github/actions/docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ runs:
id: yarn-cache
with:
path: ../yarn-unplugged-cache
# TODO: We should use platform input
key: ${{ runner.os }}-yarn-unplugged-amd64-${{ hashFiles('yarn.lock') }}
restore-keys: |
- ${{ runner.os }}-yarn-unplugged-amd64-
Expand Down
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
# 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. Github Actions have shared networking configured, so we need to set a random
# SCCACHE_SERVER_PORT port to avoid conflicts in case of parallel compilation

ARG ALPINE_VERSION=3.18
ARG PROTOC_VERSION=27.3
Expand Down Expand Up @@ -163,7 +162,6 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM
--mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \
export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \
source $HOME/.cargo/env && \
if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \
RUSTFLAGS="-C target-feature=-crt-static" \
Expand Down Expand Up @@ -207,7 +205,6 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \
source $HOME/.cargo/env && \
export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \
if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \
cargo chef cook \
--recipe-path recipe.json \
Expand All @@ -226,7 +223,6 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \
source $HOME/.cargo/env && \
export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \
if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \
mv .cargo/config-release.toml .cargo/config.toml && \
export OUT_DIRECTORY=release ; \
Expand Down Expand Up @@ -261,7 +257,6 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \
source $HOME/.cargo/env && \
export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \
if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \
cargo chef cook \
--recipe-path recipe.json \
Expand All @@ -282,7 +277,6 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM
cp -R /tmp/unplugged /platform/.yarn/ && \
yarn install --inline-builds && \
cp -R /platform/.yarn/unplugged /tmp/ && \
export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \
if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \
export SKIP_GRPC_PROTO_BUILD=1 && \
yarn build && \
Expand Down

0 comments on commit 698a8a8

Please sign in to comment.