Skip to content

Commit

Permalink
bump sccache to v0.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Jul 10, 2023
1 parent a7b7963 commit dd8df17
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 59 deletions.
31 changes: 15 additions & 16 deletions features/src/utils/opt/devcontainer/bin/vault/s3/creds/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,21 @@ test_aws_creds() {

if ! sccache --show-stats 2>&1 | grep -qE 'Cache location \s+ s3'; then

# # Disabled until sccache v0.5.4 is released (see https://github.com/mozilla/sccache/issues/1799)
# export SCCACHE_S3_NO_CREDENTIALS="1";

# export AWS_ACCESS_KEY_ID=;
# export AWS_SESSION_TOKEN=;
# export AWS_SECRET_ACCESS_KEY=;
# export -n AWS_ACCESS_KEY_ID;
# export -n AWS_SESSION_TOKEN;
# export -n AWS_SECRET_ACCESS_KEY;
# unset AWS_ACCESS_KEY_ID;
# unset AWS_SESSION_TOKEN;
# unset AWS_SECRET_ACCESS_KEY;

# if sccache --show-stats 2>&1 | grep -qE 'Cache location \s+ s3'; then
# exit 2;
# fi
export SCCACHE_S3_NO_CREDENTIALS="1";

export AWS_ACCESS_KEY_ID=;
export AWS_SESSION_TOKEN=;
export AWS_SECRET_ACCESS_KEY=;
export -n AWS_ACCESS_KEY_ID;
export -n AWS_SESSION_TOKEN;
export -n AWS_SECRET_ACCESS_KEY;
unset AWS_ACCESS_KEY_ID;
unset AWS_SESSION_TOKEN;
unset AWS_SECRET_ACCESS_KEY;

if sccache --show-stats 2>&1 | grep -qE 'Cache location \s+ s3'; then
exit 2;
fi

exit 1;
fi
Expand Down
6 changes: 3 additions & 3 deletions features/test/utils/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"cmake": {},
"ninja": {},
"sccache": {
"version": "0.5.3"
"version": "0.5.4"
},
"utils": {}
},
Expand Down Expand Up @@ -73,7 +73,7 @@
"cmake": {},
"ninja": {},
"sccache": {
"version": "0.5.3"
"version": "0.5.4"
},
"utils": {}
},
Expand Down Expand Up @@ -118,7 +118,7 @@
"cmake": {},
"ninja": {},
"sccache": {
"version": "0.5.3"
"version": "0.5.4"
},
"utils": {}
},
Expand Down
25 changes: 12 additions & 13 deletions features/test/utils/ubuntu18.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,18 @@ if test -n "${rw_sccache_bucket:-}"; then
check "bad creds with SCCACHE_BUCKET and no VAULT_HOST uses local disk cache" bad_creds_with_sccache_bucket_and_no_vault_host_uses_local_disk_cache;
fi

# Disabled until sccache v0.5.4 is released (see https://github.com/mozilla/sccache/issues/1799)
# if test -n "${ro_sccache_bucket:-}"; then

# readonly_sccache_bucket_uses_s3_cache() {
# reset_state;
# SCCACHE_BUCKET="${ro_sccache_bucket}" \
# SCCACHE_REGION="${ro_sccache_region}" \
# devcontainer-utils-post-attach-command;
# expect_s3_cache_is_used;
# }

# check "Readonly SCCACHE_BUCKET uses S3 cache" readonly_sccache_bucket_uses_s3_cache;
# fi
if test -n "${ro_sccache_bucket:-}"; then

readonly_sccache_bucket_uses_s3_cache() {
reset_state;
SCCACHE_BUCKET="${ro_sccache_bucket}" \
SCCACHE_REGION="${ro_sccache_region}" \
devcontainer-utils-post-attach-command;
expect_s3_cache_is_used;
}

check "Readonly SCCACHE_BUCKET uses S3 cache" readonly_sccache_bucket_uses_s3_cache;
fi

if test -n "${gh_token:-}" \
&& test -n "${vault_host:-}" \
Expand Down
25 changes: 12 additions & 13 deletions features/test/utils/ubuntu20.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,18 @@ if test -n "${rw_sccache_bucket:-}"; then
check "bad creds with SCCACHE_BUCKET and no VAULT_HOST uses local disk cache" bad_creds_with_sccache_bucket_and_no_vault_host_uses_local_disk_cache;
fi

# Disabled until sccache v0.5.4 is released (see https://github.com/mozilla/sccache/issues/1799)
# if test -n "${ro_sccache_bucket:-}"; then

# readonly_sccache_bucket_uses_s3_cache() {
# reset_state;
# SCCACHE_BUCKET="${ro_sccache_bucket}" \
# SCCACHE_REGION="${ro_sccache_region}" \
# devcontainer-utils-post-attach-command;
# expect_s3_cache_is_used;
# }

# check "Readonly SCCACHE_BUCKET uses S3 cache" readonly_sccache_bucket_uses_s3_cache;
# fi
if test -n "${ro_sccache_bucket:-}"; then

readonly_sccache_bucket_uses_s3_cache() {
reset_state;
SCCACHE_BUCKET="${ro_sccache_bucket}" \
SCCACHE_REGION="${ro_sccache_region}" \
devcontainer-utils-post-attach-command;
expect_s3_cache_is_used;
}

check "Readonly SCCACHE_BUCKET uses S3 cache" readonly_sccache_bucket_uses_s3_cache;
fi

if test -n "${gh_token:-}" \
&& test -n "${vault_host:-}" \
Expand Down
25 changes: 12 additions & 13 deletions features/test/utils/ubuntu22.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,18 @@ if test -n "${rw_sccache_bucket:-}"; then
check "bad creds with SCCACHE_BUCKET and no VAULT_HOST uses local disk cache" bad_creds_with_sccache_bucket_and_no_vault_host_uses_local_disk_cache;
fi

# Disabled until sccache v0.5.4 is released (see https://github.com/mozilla/sccache/issues/1799)
# if test -n "${ro_sccache_bucket:-}"; then

# readonly_sccache_bucket_uses_s3_cache() {
# reset_state;
# SCCACHE_BUCKET="${ro_sccache_bucket}" \
# SCCACHE_REGION="${ro_sccache_region}" \
# devcontainer-utils-post-attach-command;
# expect_s3_cache_is_used;
# }

# check "Readonly SCCACHE_BUCKET uses S3 cache" readonly_sccache_bucket_uses_s3_cache;
# fi
if test -n "${ro_sccache_bucket:-}"; then

readonly_sccache_bucket_uses_s3_cache() {
reset_state;
SCCACHE_BUCKET="${ro_sccache_bucket}" \
SCCACHE_REGION="${ro_sccache_region}" \
devcontainer-utils-post-attach-command;
expect_s3_cache_is_used;
}

check "Readonly SCCACHE_BUCKET uses S3 cache" readonly_sccache_bucket_uses_s3_cache;
fi

if test -n "${gh_token:-}" \
&& test -n "${vault_host:-}" \
Expand Down
2 changes: 1 addition & 1 deletion image/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"./features/cmake": {},
"./features/ninja": {},
"./features/sccache": {
"version": "0.5.3"
"version": "0.5.4"
},
"./features/utils": {}
},
Expand Down

0 comments on commit dd8df17

Please sign in to comment.