Skip to content

Commit

Permalink
Merge branch 'feat/update_tools_in_tools_json_v5.3' into 'release/v5.3'
Browse files Browse the repository at this point in the history
feat(tools): Update tools: cmake, ninja, ccache (v5.3)

See merge request espressif/esp-idf!33530
  • Loading branch information
dobairoland committed Oct 16, 2024
2 parents dbbdb0d + 2bfcfda commit 5955059
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 59 deletions.
22 changes: 16 additions & 6 deletions tools/test_build_system/test_rebuild.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
# These tests check whether the build system rebuilds some files or not
# depending on the changes to the project.
import logging
import os
from pathlib import Path
from typing import List, Union
from typing import List
from typing import Union

import pytest
from test_build_system_helpers import (ALL_ARTIFACTS, APP_BINS, BOOTLOADER_BINS, PARTITION_BIN, IdfPyFunc,
get_snapshot, replace_in_file)
from test_build_system_helpers import ALL_ARTIFACTS
from test_build_system_helpers import APP_BINS
from test_build_system_helpers import BOOTLOADER_BINS
from test_build_system_helpers import get_snapshot
from test_build_system_helpers import IdfPyFunc
from test_build_system_helpers import PARTITION_BIN
from test_build_system_helpers import replace_in_file


@pytest.mark.usefixtures('test_app_copy')
Expand All @@ -18,7 +24,9 @@ def test_rebuild_no_changes(idf_py: IdfPyFunc) -> None:
idf_py('build')
logging.info('get the first snapshot')
# excluding the 'log' subdirectory here since it changes after every build
all_build_files = get_snapshot('build/**/*', exclude_patterns='build/log/*')
all_build_files = get_snapshot('build/**/*', exclude_patterns=['build/log/*',
'build/CMakeFiles/bootloader-complete',
'build/bootloader-prefix/src/bootloader-stamp/bootloader-done'])

logging.info('check that all build artifacts were generated')
for artifact in ALL_ARTIFACTS:
Expand All @@ -27,7 +35,9 @@ def test_rebuild_no_changes(idf_py: IdfPyFunc) -> None:
logging.info('build again with no changes')
idf_py('build')
# if there are no changes, nothing gets rebuilt
all_build_files_after_rebuild = get_snapshot('build/**/*', exclude_patterns='build/log/*')
all_build_files_after_rebuild = get_snapshot('build/**/*', exclude_patterns=['build/log/*',
'build/CMakeFiles/bootloader-complete',
'build/bootloader-prefix/src/bootloader-stamp/bootloader-done'])
all_build_files_after_rebuild.assert_same(all_build_files)


Expand Down
12 changes: 6 additions & 6 deletions tools/test_idf_tools/test_idf_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def test_usage_basic_win(self):
self.temp_tools_dir, 'tools', IDF_EXE, IDF_EXE_VERSION
), output)
self.assertIn(os.path.join(
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.8-windows-x86_64'
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.10.2-windows-x86_64'
), output)
self.assertIn(os.path.join(
self.temp_tools_dir, 'tools', DFU_UTIL, DFU_UTIL_VERSION, 'dfu-util-0.11-win64'
Expand Down Expand Up @@ -736,7 +736,7 @@ def test_tools_for_esp32_win(self):
self.temp_tools_dir, 'tools', IDF_EXE, IDF_EXE_VERSION
), output)
self.assertIn(os.path.join(
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.8-windows-x86_64'
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.10.2-windows-x86_64'
), output)
self.assertNotIn(os.path.join(
self.temp_tools_dir, 'tools', DFU_UTIL, DFU_UTIL_VERSION, 'dfu-util-0.11-win64'
Expand Down Expand Up @@ -795,7 +795,7 @@ def test_tools_for_esp32c3_win(self):
self.temp_tools_dir, 'tools', IDF_EXE, IDF_EXE_VERSION
), output)
self.assertIn(os.path.join(
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.8-windows-x86_64'
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.10.2-windows-x86_64'
), output)
self.assertNotIn(os.path.join(
self.temp_tools_dir, 'tools', DFU_UTIL, DFU_UTIL_VERSION, 'dfu-util-0.11-win64'
Expand Down Expand Up @@ -856,7 +856,7 @@ def test_tools_for_esp32s2_win(self):
self.temp_tools_dir, 'tools', IDF_EXE, IDF_EXE_VERSION
), output)
self.assertIn(os.path.join(
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.8-windows-x86_64'
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.10.2-windows-x86_64'
), output)
self.assertIn(os.path.join(
self.temp_tools_dir, 'tools', DFU_UTIL, DFU_UTIL_VERSION, 'dfu-util-0.11-win64'
Expand Down Expand Up @@ -919,7 +919,7 @@ def test_tools_for_esp32s3_win(self):
self.temp_tools_dir, 'tools', IDF_EXE, IDF_EXE_VERSION
), output)
self.assertIn(os.path.join(
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.8-windows-x86_64'
self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.10.2-windows-x86_64'
), output)
self.assertIn(os.path.join(
self.temp_tools_dir, 'tools', DFU_UTIL, DFU_UTIL_VERSION, 'dfu-util-0.11-win64'
Expand Down Expand Up @@ -955,7 +955,7 @@ def test_tools_for_esp32p4_win(self):
self.assertIn(os.path.join(self.temp_tools_dir, 'tools', CMAKE, CMAKE_VERSION, 'bin'), output)
self.assertIn(os.path.join(self.temp_tools_dir, 'tools', NINJA, NINJA_VERSION), output)
self.assertIn(os.path.join(self.temp_tools_dir, 'tools', IDF_EXE, IDF_EXE_VERSION), output)
self.assertIn(os.path.join(self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.8-windows-x86_64'), output)
self.assertIn(os.path.join(self.temp_tools_dir, 'tools', CCACHE, CCACHE_VERSION, 'ccache-4.10.2-windows-x86_64'), output)
self.assertNotIn(os.path.join(self.temp_tools_dir, 'tools', XTENSA_ELF, XTENSA_ELF_VERSION, XTENSA_ELF, 'bin'), output)
self.assertNotIn(os.path.join(self.temp_tools_dir, 'tools', ESP32ULP, ESP32ULP_VERSION, ESP32ULP, 'bin'), output)
self.assertNotIn(os.path.join(self.temp_tools_dir, 'tools', XTENSA_ESP_GDB, XTENSA_ESP_GDB_VERSION, XTENSA_ESP_GDB, 'bin'), output)
Expand Down
94 changes: 47 additions & 47 deletions tools/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,46 +498,46 @@
"versions": [
{
"linux-amd64": {
"sha256": "726f88e6598523911e4bce9b059dc20b851aa77f97e4cc5573f4e42775a5c16f",
"size": 47042675,
"url": "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-x86_64.tar.gz"
"sha256": "cdd7fb352605cee3ae53b0e18b5929b642900e33d6b0173e19f6d4f2067ebf16",
"size": 53635506,
"url": "https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-linux-x86_64.tar.gz"
},
"linux-arm64": {
"sha256": "50c3b8e9d3a3cde850dd1ea143df9d1ae546cbc5e74dc6d223eefc1979189651",
"size": 48478082,
"url": "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-aarch64.tar.gz"
"sha256": "d18f50f01b001303d21f53c6c16ff12ee3aa45df5da1899c2fe95be7426aa026",
"size": 54889935,
"url": "https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-linux-aarch64.tar.gz"
},
"linux-armel": {
"sha256": "7dc787ef968dfef92491a4f191b8739ff70f8a649608b811c7a737b52481beb0",
"size": 19811327,
"url": "https://dl.espressif.com/dl/cmake/cmake-3.24.0-Linux-armv7l.tar.gz"
"sha256": "446650c69ea74817a770f96446c162bb7ad24ffecaacb35fcd4845ec7d3c9099",
"size": 17035042,
"url": "https://dl.espressif.com/dl/cmake/cmake-3.30.2-Linux-armv7l.tar.gz"
},
"linux-armhf": {
"sha256": "7dc787ef968dfef92491a4f191b8739ff70f8a649608b811c7a737b52481beb0",
"size": 19811327,
"url": "https://dl.espressif.com/dl/cmake/cmake-3.24.0-Linux-armv7l.tar.gz"
"sha256": "446650c69ea74817a770f96446c162bb7ad24ffecaacb35fcd4845ec7d3c9099",
"size": 17035042,
"url": "https://dl.espressif.com/dl/cmake/cmake-3.30.2-Linux-armv7l.tar.gz"
},
"macos": {
"sha256": "3e0cca74a56d9027dabb845a5a26e42ef8e8b33beb1655d6a724187a345145e4",
"size": 72801419,
"url": "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-macos-universal.tar.gz"
"sha256": "c6fdda745f9ce69bca048e91955c7d043ba905d6388a62e0ff52b681ac17183c",
"size": 79199037,
"url": "https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-macos-universal.tar.gz"
},
"macos-arm64": {
"sha256": "3e0cca74a56d9027dabb845a5a26e42ef8e8b33beb1655d6a724187a345145e4",
"size": 72801419,
"url": "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-macos-universal.tar.gz"
"sha256": "c6fdda745f9ce69bca048e91955c7d043ba905d6388a62e0ff52b681ac17183c",
"size": 79199037,
"url": "https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-macos-universal.tar.gz"
},
"name": "3.24.0",
"name": "3.30.2",
"status": "recommended",
"win32": {
"sha256": "b1ad8c2dbf0778e3efcc9fd61cd4a962e5c1af40aabdebee3d5074bcff2e103c",
"size": 40212531,
"url": "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-windows-x86_64.zip"
"sha256": "48bf4b3dc2d668c578e0884cac7878e146b036ca6b5ce4f8b5572f861b004c25",
"size": 45404613,
"url": "https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-windows-x86_64.zip"
},
"win64": {
"sha256": "b1ad8c2dbf0778e3efcc9fd61cd4a962e5c1af40aabdebee3d5074bcff2e103c",
"size": 40212531,
"url": "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-windows-x86_64.zip"
"sha256": "48bf4b3dc2d668c578e0884cac7878e146b036ca6b5ce4f8b5572f861b004c25",
"size": 45404613,
"url": "https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-windows-x86_64.zip"
}
},
{
Expand Down Expand Up @@ -681,30 +681,30 @@
"versions": [
{
"linux-amd64": {
"rename_dist": "ninja-linux-v1.11.1.zip",
"sha256": "b901ba96e486dce377f9a070ed4ef3f79deb45f4ffe2938f8e7ddc69cfb3df77",
"size": 119463,
"url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip"
"rename_dist": "ninja-linux-v1.12.1.zip",
"sha256": "6f98805688d19672bd699fbbfa2c2cf0fc054ac3df1f0e6a47664d963d530255",
"size": 123084,
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip"
},
"macos": {
"rename_dist": "ninja-mac-v1.11.1.zip",
"sha256": "482ecb23c59ae3d4f158029112de172dd96bb0e97549c4b1ca32d8fad11f873e",
"size": 277306,
"url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip"
"rename_dist": "ninja-mac-v1.12.1.zip",
"sha256": "89a287444b5b3e98f88a945afa50ce937b8ffd1dcc59c555ad9b1baf855298c9",
"size": 281130,
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-mac.zip"
},
"macos-arm64": {
"rename_dist": "ninja-mac-v1.11.1.zip",
"sha256": "482ecb23c59ae3d4f158029112de172dd96bb0e97549c4b1ca32d8fad11f873e",
"size": 277306,
"url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip"
"rename_dist": "ninja-mac-v1.12.1.zip",
"sha256": "89a287444b5b3e98f88a945afa50ce937b8ffd1dcc59c555ad9b1baf855298c9",
"size": 281130,
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-mac.zip"
},
"name": "1.11.1",
"name": "1.12.1",
"status": "recommended",
"win64": {
"rename_dist": "ninja-win-v1.11.1.zip",
"sha256": "524b344a1a9a55005eaf868d991e090ab8ce07fa109f1820d40e74642e289abc",
"size": 285922,
"url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip"
"rename_dist": "ninja-win-v1.12.1.zip",
"sha256": "f550fec705b6d6ff58f2db3c374c2277a37691678d6aba463adcbb129108467a",
"size": 275425,
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip"
}
}
]
Expand Down Expand Up @@ -759,7 +759,7 @@
"description": "Ccache (compiler cache)",
"export_paths": [
[
"ccache-4.8-windows-x86_64"
"ccache-4.10.2-windows-x86_64"
]
],
"export_vars": {
Expand Down Expand Up @@ -787,12 +787,12 @@
"version_regex": "ccache version ([0-9.]+)",
"versions": [
{
"name": "4.8",
"name": "4.10.2",
"status": "recommended",
"win64": {
"sha256": "a2b3bab4bb8318ffc5b3e4074dc25636258bc7e4b51261f7d9bef8127fda8309",
"size": 2005781,
"url": "https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-windows-x86_64.zip"
"sha256": "6252f081876a9a9f700fae13a5aec5d0d486b28261d7f1f72ac11c7ad9df4da9",
"size": 1610890,
"url": "https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-windows-x86_64.zip"
}
}
]
Expand Down

0 comments on commit 5955059

Please sign in to comment.