Skip to content

Commit 2118688

Browse files
authored
Bump sccache to 0.10.0 and sccache-action to 0.0.9 (#586)
1 parent c3e91f3 commit 2118688

File tree

7 files changed

+34
-31
lines changed

7 files changed

+34
-31
lines changed

.github/workflows/build.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
uses: actions/github-script@v6
7272
with:
7373
script: |
74-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
74+
core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
7575
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
7676
7777
- name: Inject slug/short variables
@@ -134,7 +134,7 @@ jobs:
134134
DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
135135
${{matrix.extraBuildArgs}}
136136
secrets: |
137-
actions_cache_url=${{ env.ACTIONS_CACHE_URL }}
137+
actions_results_url=${{ env.ACTIONS_RESULTS_URL }}
138138
actions_runtime_token=${{ env.ACTIONS_RUNTIME_TOKEN }}
139139
tags: ${{ steps.meta.outputs.tags }}
140140
labels: ${{ steps.meta.outputs.labels }}
@@ -176,7 +176,7 @@ jobs:
176176
DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
177177
${{matrix.extraBuildArgs}}
178178
secrets: |
179-
actions_cache_url=${{ env.ACTIONS_CACHE_URL }}
179+
actions_results_url=${{ env.ACTIONS_RESULTS_URL }}
180180
actions_runtime_token=${{ env.ACTIONS_RUNTIME_TOKEN }}
181181
tags: ${{ steps.meta-grpc.outputs.tags }}
182182
labels: ${{ steps.meta-grpc.outputs.labels }}

.github/workflows/liniting.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
env:
1515
SCCACHE_GHA_ENABLED: "on"
1616
RUSTC_WRAPPER: /usr/local/bin/sccache
17-
SCCACHE: 0.3.3
17+
SCCACHE: 0.10.0
1818

1919
steps:
2020
- uses: actions/checkout@v2
@@ -41,7 +41,7 @@ jobs:
4141
uses: actions/github-script@v6
4242
with:
4343
script: |
44-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
44+
core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
4545
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
4646
core.exportVariable('SCCACHE_GHA_CACHE_TO', 'sccache-${{runner.os}}-${{github.ref_name}}');
4747
core.exportVariable('SCCACHE_GHA_CACHE_FROM', 'sccache-${{runner.os}}-main,sccache-${{runner.os}}-');

.github/workflows/test.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ jobs:
3131
uses: actions/checkout@v4
3232
- uses: actions-rust-lang/setup-rust-toolchain@v1
3333
- name: Run sccache-cache
34-
uses: mozilla-actions/[email protected]
34+
uses: mozilla-actions/[email protected]
35+
with:
36+
version: "v0.10.0"
3537
- name: Compile project
3638
env:
3739
SCCACHE_GHA_ENABLED: "true"

Dockerfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM lukemathwalker/cargo-chef:latest-rust-1.85-bookworm AS chef
22
WORKDIR /usr/src
33

4-
ENV SCCACHE=0.5.4
4+
ENV SCCACHE=0.10.0
55
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
66

77
# Donwload, configure sccache
@@ -27,9 +27,9 @@ ARG DOCKER_LABEL
2727
ARG SCCACHE_GHA_ENABLED
2828

2929
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
30-
| gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
31-
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \
32-
tee /etc/apt/sources.list.d/oneAPI.list
30+
| gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
31+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \
32+
tee /etc/apt/sources.list.d/oneAPI.list
3333

3434
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
3535
intel-oneapi-mkl-devel=2024.0.0-49656 \
@@ -41,9 +41,9 @@ RUN echo "int mkl_serv_intel_cpu_true() {return 1;}" > fakeintel.c && \
4141

4242
COPY --from=planner /usr/src/recipe.json recipe.json
4343

44-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
44+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
4545
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
46-
cargo chef cook --release --features ort,candle,mkl --no-default-features --recipe-path recipe.json && sccache -s
46+
cargo chef cook --release --features ort,candle,mkl --no-default-features --recipe-path recipe.json && sccache -s
4747

4848
COPY backends backends
4949
COPY core core
@@ -53,7 +53,7 @@ COPY Cargo.lock ./
5353

5454
FROM builder AS http-builder
5555

56-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
56+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
5757
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
5858
cargo build --release --bin text-embeddings-router --features ort,candle,mkl,http --no-default-features && sccache -s
5959

@@ -67,7 +67,7 @@ RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \
6767

6868
COPY proto proto
6969

70-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
70+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
7171
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
7272
cargo build --release --bin text-embeddings-router --features ort,candle,mkl,grpc --no-default-features && sccache -s
7373

Dockerfile-cuda

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder
22

3-
ENV SCCACHE=0.5.4
3+
ENV SCCACHE=0.10.0
44
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
55
ENV PATH="/root/.cargo/bin:${PATH}"
66
# aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.85-bookworm`
@@ -47,7 +47,7 @@ ARG SCCACHE_GHA_ENABLED
4747

4848
WORKDIR /usr/src
4949

50-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
50+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
5151
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
5252
if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
5353
then \
@@ -64,7 +64,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
6464

6565
COPY --from=planner /usr/src/recipe.json recipe.json
6666

67-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
67+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
6868
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
6969
if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
7070
then \
@@ -81,7 +81,7 @@ COPY Cargo.lock ./
8181

8282
FROM builder AS http-builder
8383

84-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
84+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
8585
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
8686
if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
8787
then \
@@ -104,7 +104,7 @@ RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \
104104

105105
COPY proto proto
106106

107-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
107+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
108108
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
109109
if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \
110110
then \

Dockerfile-cuda-all

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder
22

3-
ENV SCCACHE=0.5.4
3+
ENV SCCACHE=0.10.0
44
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
55
ENV PATH="/root/.cargo/bin:${PATH}"
66
# aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.85-bookworm`
@@ -49,7 +49,7 @@ WORKDIR /usr/src
4949

5050
COPY --from=planner /usr/src/recipe.json recipe.json
5151

52-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
52+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
5353
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
5454
if [ $VERTEX = "true" ]; \
5555
then \
@@ -58,7 +58,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
5858
cargo chef cook --release --recipe-path recipe.json && sccache -s; \
5959
fi;
6060

61-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
61+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
6262
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
6363
if [ $VERTEX = "true" ]; \
6464
then \
@@ -67,7 +67,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
6767
CUDA_COMPUTE_CAP=75 cargo chef cook --release --features candle-cuda-turing --recipe-path recipe.json && sccache -s; \
6868
fi;
6969

70-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
70+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
7171
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
7272
if [ $VERTEX = "true" ]; \
7373
then \
@@ -76,7 +76,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
7676
CUDA_COMPUTE_CAP=80 cargo chef cook --release --features candle-cuda --recipe-path recipe.json && sccache -s; \
7777
fi;
7878

79-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
79+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
8080
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
8181
if [ $VERTEX = "true" ]; \
8282
then \
@@ -91,7 +91,7 @@ COPY router router
9191
COPY Cargo.toml ./
9292
COPY Cargo.lock ./
9393

94-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
94+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
9595
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
9696
if [ $VERTEX = "true" ]; \
9797
then \
@@ -102,7 +102,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
102102

103103
RUN mv /usr/src/target/release/text-embeddings-router /usr/src/target/release/text-embeddings-router-75
104104

105-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
105+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
106106
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
107107
if [ $VERTEX = "true" ]; \
108108
then \
@@ -113,7 +113,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
113113

114114
RUN mv /usr/src/target/release/text-embeddings-router /usr/src/target/release/text-embeddings-router-80
115115

116-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
116+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
117117
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
118118
if [ $VERTEX = "true" ]; \
119119
then \

Dockerfile-intel

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ARG PLATFORM=cpu
22
FROM lukemathwalker/cargo-chef:latest-rust-1.85-bookworm AS chef
33
WORKDIR /usr/src
4-
ENV SCCACHE=0.5.4
4+
5+
ENV SCCACHE=0.10.0
56
ENV RUSTC_WRAPPER=/usr/local/bin/sccache
67

78
# Download and configure sccache
@@ -28,7 +29,7 @@ ARG SCCACHE_GHA_ENABLED
2829

2930
COPY --from=planner /usr/src/recipe.json recipe.json
3031

31-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
32+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
3233
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
3334
cargo chef cook --release --features python --no-default-features --recipe-path recipe.json && sccache -s
3435

@@ -46,15 +47,15 @@ RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \
4647

4748
FROM builder AS http-builder
4849

49-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
50+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
5051
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
5152
cargo build --release --bin text-embeddings-router -F python -F http --no-default-features && sccache -s
5253

5354
FROM builder AS grpc-builder
5455

5556
COPY proto proto
5657

57-
RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \
58+
RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
5859
--mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \
5960
cargo build --release --bin text-embeddings-router -F grpc -F python --no-default-features && sccache -s
6061

0 commit comments

Comments
 (0)