Skip to content

Commit dabfba3

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committed
Fix the sccache startup flake (#28464)
Try to startup sccache 3 times. GitOrigin-RevId: f0c8467747cc1f581106760dba35256ba0f9eccd
1 parent 1e29d44 commit dabfba3

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.github/actions/setup-rust/action.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ runs:
4141
echo "SODIUM_USE_PKG_CONFIG=1" >> $GITHUB_ENV
4242
echo "ROCKSDB_LIB_DIR=/usr/lib" >> $GITHUB_ENV
4343
fi
44-
echo "SCCACHE_ENDPOINT=https://a4aa0fffebef8bc497f64875c40ee6fb.r2.cloudflarestorage.com" >> $GITHUB_ENV
45-
echo "SCCACHE_BUCKET=cvx-actions-cache" >> $GITHUB_ENV
46-
echo "SCCACHE_REGION=auto" >> $GITHUB_ENV
47-
echo "AWS_ACCESS_KEY_ID=${{ inputs.r2-access-key }}" >> $GITHUB_ENV
48-
echo "AWS_SECRET_ACCESS_KEY=${{ inputs.r2-secret-key }}" >> $GITHUB_ENV
4944
echo "CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse" >> $GITHUB_ENV
5045
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV
5146
@@ -54,6 +49,18 @@ runs:
5449
with:
5550
version: "v0.8.0"
5651

52+
- name: Start sccache
53+
shell: bash
54+
env:
55+
SCCACHE_ENDPOINT: https://a4aa0fffebef8bc497f64875c40ee6fb.r2.cloudflarestorage.com
56+
SCCACHE_BUCKET: cvx-actions-cache
57+
SCCACHE_REGION: auto
58+
AWS_ACCESS_KEY_ID: ${{ inputs.r2-access-key }}
59+
AWS_SECRET_ACCESS_KEY: ${{ inputs.r2-secret-key }}
60+
run: |
61+
# Try to start sccache up to 3 times. Sometimes it times out for unknown reasons.
62+
(r=3;while ! sccache --start-server ; do ((--r))||exit;sleep 5;done)
63+
5764
# n.b. this action inspects the environment and variables starting with
5865
# `CARGO_` are used as part of the cache key.
5966
# If users of this composite action add additional `CARGO_*` variables after

.github/workflows/build_local_backend.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
uses: runs-on/cache@v4
3636
env:
3737
AWS_REGION: ${{ vars.AWS_REGION }}
38-
AWS_ACCESS_KEY_ID: ""
39-
AWS_SECRET_ACCESS_KEY: ""
4038
RUNS_ON_S3_BUCKET_CACHE: ${{ vars.RUNS_ON_S3_BUCKET_CACHE }}
4139
with:
4240
path: |

.github/workflows/precompile.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ jobs:
4040
uses: runs-on/cache@v4
4141
env:
4242
AWS_REGION: ${{ vars.AWS_REGION }}
43-
AWS_ACCESS_KEY_ID: ""
44-
AWS_SECRET_ACCESS_KEY: ""
4543
RUNS_ON_S3_BUCKET_CACHE: ${{ vars.RUNS_ON_S3_BUCKET_CACHE }}
4644
with:
4745
path: |

0 commit comments

Comments
 (0)