mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 01:12:56 +00:00
CI(compute-tools): enable sccache
This commit is contained in:
6
.github/workflows/build_and_test.yml
vendored
6
.github/workflows/build_and_test.yml
vendored
@@ -867,6 +867,9 @@ jobs:
|
||||
PG_VERSION=${{ matrix.version }}
|
||||
BUILD_TAG=${{ needs.tag.outputs.build-tag }}
|
||||
TAG=${{ needs.build-build-tools-image.outputs.image-tag }}
|
||||
RUSTC_WRAPPER=sccache
|
||||
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_DEV }}
|
||||
AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY_DEV }}
|
||||
provenance: false
|
||||
push: true
|
||||
pull: true
|
||||
@@ -907,6 +910,9 @@ jobs:
|
||||
GIT_VERSION=${{ github.event.pull_request.head.sha || github.sha }}
|
||||
BUILD_TAG=${{ needs.tag.outputs.build-tag }}
|
||||
TAG=${{ needs.build-build-tools-image.outputs.image-tag }}
|
||||
RUSTC_WRAPPER=sccache
|
||||
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_DEV }}
|
||||
AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY_DEV }}
|
||||
provenance: false
|
||||
push: true
|
||||
pull: true
|
||||
|
||||
@@ -868,10 +868,22 @@ FROM $REPOSITORY/$IMAGE:$TAG AS compute-tools
|
||||
ARG BUILD_TAG
|
||||
ENV BUILD_TAG=$BUILD_TAG
|
||||
|
||||
ARG RUSTC_WRAPPER
|
||||
ARG SCCACHE_BUCKET=neon-github-dev
|
||||
ARG SCCACHE_REGION=eu-central-1
|
||||
ARG SCCACHE_S3_KEY_PREFIX=sccache
|
||||
ARG AWS_ACCESS_KEY_ID
|
||||
ARG AWS_SECRET_ACCESS_KEY
|
||||
|
||||
USER nonroot
|
||||
# Copy entire project to get Cargo.* files with proper dependencies for the whole project
|
||||
COPY --chown=nonroot . .
|
||||
RUN cd compute_tools && mold -run cargo build --locked --profile release-line-debug-size-lto
|
||||
RUN set -e \
|
||||
&& RUSTFLAGS="-Clinker=clang -Clink-arg=-fuse-ld=mold -Clink-arg=-Wl,--no-rosegment" cargo build \
|
||||
--bin compute_ctl \
|
||||
--locked \
|
||||
--profile release-line-debug-size-lto \
|
||||
&& sccache --show-stats
|
||||
|
||||
#########################################################################################
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user