Merge pull request #4733 from gudnimg/upgrade-ninja
Upgrade ninja from 1.10.2 to 1.12.1
This commit is contained in:
commit
ebbd58c6e2
|
|
@ -3,7 +3,7 @@
|
|||
"name": "avr-gcc",
|
||||
"toolchainFile": "${workspaceFolder}/cmake/AvrGcc.cmake",
|
||||
"cmakeSettings": {
|
||||
"CMAKE_MAKE_PROGRAM": "${workspaceFolder}/.dependencies/ninja-1.10.2/ninja",
|
||||
"CMAKE_MAKE_PROGRAM": "${workspaceFolder}/.dependencies/ninja-1.12.1/ninja",
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ The workflow should be pretty straightforward for anyone with development experi
|
|||
Building with cmake requires:
|
||||
|
||||
- cmake >= 3.22.5
|
||||
- ninja >= 1.10.2 (optional, but recommended)
|
||||
- ninja >= 1.12.1 (optional, but recommended)
|
||||
|
||||
Python >= 3.8 is also required with the following modules:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import tarfile
|
|||
import zipfile
|
||||
from argparse import ArgumentParser
|
||||
from pathlib import Path
|
||||
from tarfile import TarFile
|
||||
from urllib.request import urlretrieve
|
||||
|
||||
project_root_dir = Path(__file__).resolve().parent.parent
|
||||
|
|
@ -29,11 +30,11 @@ dependencies_dir = project_root_dir / '.dependencies'
|
|||
# yapf: disable
|
||||
dependencies = {
|
||||
'ninja': {
|
||||
'version': '1.10.2',
|
||||
'version': '1.12.1',
|
||||
'url': {
|
||||
'Linux': 'https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip',
|
||||
'Windows': 'https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip',
|
||||
'Darwin': 'https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-mac.zip',
|
||||
'Linux': 'https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip',
|
||||
'Windows': 'https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip',
|
||||
'Darwin': 'https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-mac.zip',
|
||||
},
|
||||
},
|
||||
'cmake': {
|
||||
|
|
@ -92,6 +93,10 @@ def download_and_unzip(url: str, directory: Path):
|
|||
obj = tarfile.open(f)
|
||||
else:
|
||||
obj = zipfile.ZipFile(f, 'r')
|
||||
|
||||
if isinstance(obj, TarFile):
|
||||
obj.extractall(path=str(extract_dir), filter='data')
|
||||
else: # Zip file
|
||||
obj.extractall(path=str(extract_dir))
|
||||
|
||||
subdir = find_single_subdir(extract_dir)
|
||||
|
|
|
|||
Loading…
Reference in New Issue