Merge pull request #324 from gudnimg/upgrade-ninja-mmu
Upgrade ninja from 1.10.2 to 1.12.1pull/328/head
commit
3c8663d900
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "avr-gcc",
|
"name": "avr-gcc",
|
||||||
"toolchainFile": "${workspaceFolder}/cmake/AvrGcc.cmake",
|
"toolchainFile": "${workspaceFolder}/cmake/AvrGcc.cmake",
|
||||||
"cmakeSettings": {
|
"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"
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ Run `./utils/bootstrap.py`
|
||||||
`bootstrap.py` will now download all the "missing" dependencies into the `.dependencies` folder:
|
`bootstrap.py` will now download all the "missing" dependencies into the `.dependencies` folder:
|
||||||
- clang-format-9.0.0-noext
|
- clang-format-9.0.0-noext
|
||||||
- cmake-3.22.5
|
- cmake-3.22.5
|
||||||
- ninja-1.10.2
|
- ninja-1.12.1
|
||||||
- avr-gcc-7.3.0
|
- avr-gcc-7.3.0
|
||||||
|
|
||||||
### How to build the preliminary project so far:
|
### How to build the preliminary project so far:
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import tarfile
|
||||||
import zipfile
|
import zipfile
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from tarfile import TarFile
|
||||||
from urllib.request import urlretrieve
|
from urllib.request import urlretrieve
|
||||||
project_root_dir = Path(__file__).resolve().parent.parent
|
project_root_dir = Path(__file__).resolve().parent.parent
|
||||||
dependencies_dir = project_root_dir / '.dependencies'
|
dependencies_dir = project_root_dir / '.dependencies'
|
||||||
|
|
@ -28,11 +29,11 @@ dependencies_dir = project_root_dir / '.dependencies'
|
||||||
# yapf: disable
|
# yapf: disable
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'ninja': {
|
'ninja': {
|
||||||
'version': '1.10.2',
|
'version': '1.12.1',
|
||||||
'url': {
|
'url': {
|
||||||
'Linux': 'https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.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.10.2/ninja-win.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.10.2/ninja-mac.zip',
|
'Darwin': 'https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-mac.zip',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'cmake': {
|
'cmake': {
|
||||||
|
|
@ -99,7 +100,11 @@ def download_and_unzip(url: str, directory: Path):
|
||||||
obj = tarfile.open(f)
|
obj = tarfile.open(f)
|
||||||
else:
|
else:
|
||||||
obj = zipfile.ZipFile(f, 'r')
|
obj = zipfile.ZipFile(f, 'r')
|
||||||
obj.extractall(path=str(extract_dir))
|
|
||||||
|
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)
|
subdir = find_single_subdir(extract_dir)
|
||||||
shutil.move(str(subdir), str(directory))
|
shutil.move(str(subdir), str(directory))
|
||||||
|
|
|
||||||
|
|
@ -93,11 +93,11 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
sh """
|
sh """
|
||||||
python3 utils/bootstrap.py
|
python3 utils/bootstrap.py
|
||||||
export PATH=\$PWD/.dependencies/cmake-3.22.5/bin:\$PWD/.dependencies/ninja-1.10.2:\$PATH
|
export PATH=\$PWD/.dependencies/cmake-3.22.5/bin:\$PWD/.dependencies/ninja-1.12.1:\$PATH
|
||||||
export CTEST_OUTPUT_ON_FAILURE=1
|
export CTEST_OUTPUT_ON_FAILURE=1
|
||||||
mkdir -p build-test
|
mkdir -p build-test
|
||||||
LD_LIBRARY_PATH=/usr/local/lib32 \$PWD/.dependencies/cmake-3.22.5/bin/ctest --build-and-test . build-test \
|
LD_LIBRARY_PATH=/usr/local/lib32 \$PWD/.dependencies/cmake-3.22.5/bin/ctest --build-and-test . build-test \
|
||||||
-DCMAKE_MAKE_PROGRAM=\$PWD/.dependencies/ninja-1.10.2/ninja \
|
-DCMAKE_MAKE_PROGRAM=\$PWD/.dependencies/ninja-1.12.1/ninja \
|
||||||
--build-generator Ninja \
|
--build-generator Ninja \
|
||||||
--build-target tests \
|
--build-target tests \
|
||||||
--test-command ctest
|
--test-command ctest
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue