Skip to content

Commit 15ffa4f

Browse files
committed
ci(gitlab): disable sccache
We disable sccache in GitLab base venv building to save some extra time. Because we now use cached artifacts and incremental builds, the use of sccache in those jobs has become redundant. By not installing sccache we now save some extra bit of time.
1 parent 2e13f18 commit 15ffa4f

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

scripts/gen_ext_cache_scripts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Get extension information from setup.py
1414
output = subprocess.check_output([sys.executable, ROOT / "setup.py", "ext_hashes", "--inplace"])
15-
cached_files = set()
15+
cached_files: t.Set[t.Tuple[str, str]] = set()
1616
for line in output.decode().splitlines():
1717
if not line.startswith("#EXTHASH:"):
1818
continue
@@ -41,7 +41,7 @@
4141
"\n".join(
4242
[
4343
f" test -f {cached_file} && (cp {cached_file} {dest} && touch {dest} "
44-
f"&& echo 'Restored {cached_file} -> {dest}') || true"
44+
f"&& echo '- restored {Path(cached_file).relative_to(CACHE)} -> {Path(dest).relative_to(ROOT)}')||true"
4545
for cached_file, dest in cached_files
4646
]
4747
)
@@ -52,7 +52,7 @@
5252
"\n".join(
5353
[
5454
f" test -f {cached_file} || mkdir -p {Path(cached_file).parent} && (cp {dest} {cached_file} "
55-
f"&& echo 'Saved {dest} -> {cached_file}' || true)"
55+
f"&& echo '- saved {Path(dest).relative_to(ROOT)} -> {Path(cached_file).relative_to(CACHE)}' || true)"
5656
for cached_file, dest in cached_files
5757
]
5858
)

scripts/gen_gitlab_config.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -268,21 +268,12 @@ def gen_build_base_venvs() -> None:
268268
CMAKE_BUILD_PARALLEL_LEVEL: '12'
269269
PIP_VERBOSE: '0'
270270
DD_PROFILING_NATIVE_TESTS: '1'
271-
DD_USE_SCCACHE: '1'
272271
PIP_CACHE_DIR: '${{CI_PROJECT_DIR}}/.cache/pip'
273-
SCCACHE_DIR: '${{CI_PROJECT_DIR}}/.cache/sccache'
274-
DD_FAST_BUILD: '1'
275272
DD_CMAKE_INCREMENTAL_BUILD: '1'
276273
DD_SETUP_CACHE_DOWNLOADS: '1'
277274
EXT_CACHE_VENV: '${{CI_PROJECT_DIR}}/.cache/ext_cache_venv'
278-
rules:
279-
- if: '$CI_COMMIT_REF_NAME == "main"'
280-
variables:
281-
DD_FAST_BUILD: '0'
282-
- when: always
283275
script: |
284276
set -e -o pipefail
285-
apt update && apt install -y sccache
286277
pip install riot==0.20.1
287278
if [ ! -d $EXT_CACHE_VENV ]; then
288279
python$PYTHON_VERSION -m venv $EXT_CACHE_VENV
@@ -293,16 +284,18 @@ def gen_build_base_venvs() -> None:
293284
fi
294285
python scripts/gen_ext_cache_scripts.py
295286
deactivate
287+
echo "Restoring native extensions"
296288
$SHELL scripts/restore-ext-cache.sh
297289
riot -P -v generate --python=$PYTHON_VERSION
298290
echo "Running smoke tests"
299291
riot -v run -s --python=$PYTHON_VERSION smoke_test
300292
source $EXT_CACHE_VENV/bin/activate
301293
python scripts/gen_ext_cache_scripts.py
302294
deactivate
295+
echo "Saving native extensions"
303296
$SHELL scripts/save-ext-cache.sh
304297
cache:
305-
# Share pip/sccache between jobs of the same Python version
298+
# Share pip between jobs of the same Python version
306299
- key: v1-build_base_venvs-${{PYTHON_VERSION}}-cache-{current_month}
307300
paths:
308301
- .cache

0 commit comments

Comments
 (0)