mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
fix(macos): ccache: re-enable, show stats, set CCACHE_DIR, limit CCACHE_MAXSIZE
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
.build_template:
|
.build_template:
|
||||||
stage: build
|
stage: build
|
||||||
extends:
|
extends:
|
||||||
- .after_script:build:ccache:upload-when-fail
|
- .after_script:build:ccache-show-stats:upload-failed-job-logs
|
||||||
image: $ESP_ENV_IMAGE
|
image: $ESP_ENV_IMAGE
|
||||||
tags:
|
tags:
|
||||||
- build
|
- build
|
||||||
@ -16,7 +16,7 @@
|
|||||||
extends:
|
extends:
|
||||||
- .build_template
|
- .build_template
|
||||||
- .before_script:build
|
- .before_script:build
|
||||||
- .after_script:build:ccache
|
- .after_script:build:ccache-show-stats
|
||||||
dependencies: # set dependencies to null to avoid missing artifacts issue
|
dependencies: # set dependencies to null to avoid missing artifacts issue
|
||||||
needs:
|
needs:
|
||||||
- job: fast_template_app
|
- job: fast_template_app
|
||||||
@ -42,9 +42,9 @@
|
|||||||
--parallel-count ${CI_NODE_TOTAL:-1}
|
--parallel-count ${CI_NODE_TOTAL:-1}
|
||||||
--parallel-index ${CI_NODE_INDEX:-1}
|
--parallel-index ${CI_NODE_INDEX:-1}
|
||||||
--extra-preserve-dirs
|
--extra-preserve-dirs
|
||||||
examples/bluetooth/esp_ble_mesh/ble_mesh_console
|
examples/bluetooth/esp_ble_mesh/ble_mesh_console
|
||||||
examples/bluetooth/hci/controller_hci_uart_esp32
|
examples/bluetooth/hci/controller_hci_uart_esp32
|
||||||
examples/wifi/iperf
|
examples/wifi/iperf
|
||||||
--modified-components ${MR_MODIFIED_COMPONENTS}
|
--modified-components ${MR_MODIFIED_COMPONENTS}
|
||||||
--modified-files ${MR_MODIFIED_FILES}
|
--modified-files ${MR_MODIFIED_FILES}
|
||||||
# for detailed documents, please refer to .gitlab/ci/README.md#uploaddownload-artifacts-to-internal-minio-server
|
# for detailed documents, please refer to .gitlab/ci/README.md#uploaddownload-artifacts-to-internal-minio-server
|
||||||
@ -210,15 +210,16 @@ pytest_build_system_macos:
|
|||||||
extends:
|
extends:
|
||||||
- .test_build_system_template
|
- .test_build_system_template
|
||||||
- .before_script:build:macos
|
- .before_script:build:macos
|
||||||
- .after_script:build:macos:upload-when-fail
|
- .after_script:build:macos:upload-failed-job-logs:ccache-show-stats
|
||||||
- .rules:build:macos
|
- .rules:build:macos
|
||||||
tags:
|
tags:
|
||||||
- macos_shell
|
- macos_shell
|
||||||
parallel: 3
|
parallel: 3
|
||||||
variables:
|
variables:
|
||||||
PYENV_VERSION: "3.8"
|
PYENV_VERSION: "3.8"
|
||||||
CI_CCACHE_DISABLE: "1" # ccache: error: Read-only file system
|
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
|
||||||
|
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
|
||||||
|
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
|
||||||
build_docker:
|
build_docker:
|
||||||
extends:
|
extends:
|
||||||
- .before_script:minimal
|
- .before_script:minimal
|
||||||
|
@ -14,12 +14,12 @@ stages:
|
|||||||
- post_deploy
|
- post_deploy
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
# System environment
|
# System environment
|
||||||
|
|
||||||
# Common parameters for the 'make' during CI tests
|
# Common parameters for the 'make' during CI tests
|
||||||
MAKEFLAGS: "-j5 --no-keep-going"
|
MAKEFLAGS: "-j5 --no-keep-going"
|
||||||
|
|
||||||
# GitLab-CI environment
|
# GitLab-CI environment
|
||||||
# Thanks to pack-objects cache, clone strategy should behave faster than fetch
|
# Thanks to pack-objects cache, clone strategy should behave faster than fetch
|
||||||
# so we pick "clone" as default git strategy
|
# so we pick "clone" as default git strategy
|
||||||
# Shiny runners by default remove the CI_PROJECT_DIR every time at the beginning of one job
|
# Shiny runners by default remove the CI_PROJECT_DIR every time at the beginning of one job
|
||||||
@ -219,13 +219,14 @@ variables:
|
|||||||
- *setup_tools_and_idf_python_venv
|
- *setup_tools_and_idf_python_venv
|
||||||
- fetch_submodules
|
- fetch_submodules
|
||||||
|
|
||||||
.after_script:build:macos:upload-when-fail:
|
.after_script:build:macos:upload-failed-job-logs:ccache-show-stats:
|
||||||
after_script:
|
after_script:
|
||||||
# macos is running shell executor, which means it would use
|
# macos is running shell executor, which means it would use
|
||||||
# the system installed /usr/local/bin/python3 by default.
|
# the system installed /usr/local/bin/python3 by default.
|
||||||
# Ensure pyenv and PYENV_VERSION installed
|
# Ensure pyenv and PYENV_VERSION installed
|
||||||
- eval "$(pyenv init -)"
|
- eval "$(pyenv init -)"
|
||||||
- *upload_failed_job_log_artifacts
|
- *upload_failed_job_log_artifacts
|
||||||
|
- *show_ccache_statistics
|
||||||
|
|
||||||
.before_script:build:
|
.before_script:build:
|
||||||
before_script:
|
before_script:
|
||||||
@ -236,11 +237,11 @@ variables:
|
|||||||
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
|
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
|
||||||
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
|
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
|
||||||
|
|
||||||
.after_script:build:ccache:
|
.after_script:build:ccache-show-stats:
|
||||||
after_script:
|
after_script:
|
||||||
- *show_ccache_statistics
|
- *show_ccache_statistics
|
||||||
|
|
||||||
.after_script:build:ccache:upload-when-fail:
|
.after_script:build:ccache-show-stats:upload-failed-job-logs:
|
||||||
after_script:
|
after_script:
|
||||||
- *show_ccache_statistics
|
- *show_ccache_statistics
|
||||||
- *upload_failed_job_log_artifacts
|
- *upload_failed_job_log_artifacts
|
||||||
@ -363,12 +364,12 @@ default:
|
|||||||
- *setup_tools_and_idf_python_venv
|
- *setup_tools_and_idf_python_venv
|
||||||
- add_gitlab_ssh_keys
|
- add_gitlab_ssh_keys
|
||||||
- fetch_submodules
|
- fetch_submodules
|
||||||
# gitlab bug, setting them here doesn't work
|
# gitlab bug, setting them here doesn't work
|
||||||
# - expire_in: https://gitlab.com/gitlab-org/gitlab/-/issues/404563
|
# - expire_in: https://gitlab.com/gitlab-org/gitlab/-/issues/404563
|
||||||
# - when: https://gitlab.com/gitlab-org/gitlab/-/issues/440672
|
# - when: https://gitlab.com/gitlab-org/gitlab/-/issues/440672
|
||||||
# artifacts:
|
# artifacts:
|
||||||
# expire_in: 1 week
|
# expire_in: 1 week
|
||||||
# when: always
|
# when: always
|
||||||
retry:
|
retry:
|
||||||
max: 2
|
max: 2
|
||||||
when:
|
when:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
.dynamic_build_template:
|
.dynamic_build_template:
|
||||||
extends:
|
extends:
|
||||||
- .before_script:build
|
- .before_script:build
|
||||||
- .after_script:build:ccache:upload-when-fail
|
- .after_script:build:ccache-show-stats:upload-failed-job-logs
|
||||||
image: $ESP_ENV_IMAGE
|
image: $ESP_ENV_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
@ -61,10 +61,10 @@
|
|||||||
paths:
|
paths:
|
||||||
- XUNIT_RESULT*.xml
|
- XUNIT_RESULT*.xml
|
||||||
- pytest-embedded/
|
- pytest-embedded/
|
||||||
# Child pipeline reports won't be collected in the main one
|
# Child pipeline reports won't be collected in the main one
|
||||||
# https://gitlab.com/groups/gitlab-org/-/epics/8205
|
# https://gitlab.com/groups/gitlab-org/-/epics/8205
|
||||||
# reports:
|
# reports:
|
||||||
# junit: XUNIT_RESULT.xml
|
# junit: XUNIT_RESULT.xml
|
||||||
when: always
|
when: always
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
script:
|
script:
|
||||||
|
Reference in New Issue
Block a user