Skip to content

Commit

Permalink
Build scripts and Readme: limit cmake --parallel to 8
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-luxonis committed Apr 1, 2021
1 parent 2ee3b2e commit 79d09be
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Configure project
run: cmake -S . -B build -DDEPTHAI_PYTHON_FORCE_DOCSTRINGS=ON -DDEPTHAI_PYTHON_DOCSTRINGS_OUTPUT="$PWD/docstrings/depthai_python_docstring.hpp"
- name: Build target 'pybind11_mkdoc'
run: cmake --build build --target pybind11_mkdoc --parallel
run: cmake --build build --target pybind11_mkdoc --parallel 8
- name: Upload docstring artifacts
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
- name: Build and install depthai-core
run: |
cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
cmake --build build_core --target install --parallel
cmake --build build_core --target install --parallel 8
echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV
- name: Append build hash if not a tagged commit
Expand Down Expand Up @@ -309,7 +309,7 @@ jobs:
- name: Build and install depthai-core
run: |
cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
cmake --build build_core --target install --parallel
cmake --build build_core --target install --parallel 8
echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV
- name: Append build hash if not a tagged commit
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Documentation is available over at [Luxonis DepthAI API](https://docs.luxonis.co
python3 -m pip install -U pip
python3 -m pip install -r docs/requirements.txt
cmake -S . -B build -D DEPTHAI_BUILD_DOCS=ON -D DEPTHAI_PYTHON_BUILD_DOCS=ON
cmake --build build --target sphinx --parallel
cmake --build build --target sphinx --parallel 8
python3 -m http.server --bind 0.0.0.0 8000 --directory build/docs/sphinx
```
Expand All @@ -44,7 +44,7 @@ Documentation is available over at [Luxonis DepthAI API](https://docs.luxonis.co
in a new terminal window to update the website source
```
cmake --build build --target sphinx --parallel
cmake --build build --target sphinx --parallel 8
```
Then refresh your page - it should load the updated website that was just built
Expand Down Expand Up @@ -75,7 +75,7 @@ To build a shared library from source perform the following:
```
mkdir build && cd build
cmake .. [-D PYTHON_EXECUTABLE=/full/path/to/python]
cmake --build . --parallel
cmake --build . --parallel 8
```
Where `-D PYTHON_EXECUTABLE` option can optionally specify an exact Python executable to use for building.
Expand All @@ -96,7 +96,7 @@ To run the tests build the library with the following options
```
mkdir build_tests && cd build_tests
cmake .. -D DEPTHAI_PYTHON_ENABLE_TESTS=ON -D DEPTHAI_PYTHON_ENABLE_EXAMPLES=ON -D DEPTHAI_PYTHON_TEST_EXAMPLES=ON
cmake --build . --parallel
cmake --build . --parallel 8
ctest
```
Expand Down Expand Up @@ -183,5 +183,5 @@ Another option is to use **clang** compiler:
sudo apt install clang-10
mkdir build && cd build
CC=clang-10 CXX=clang++-10 cmake ..
cmake --build . --parallel
cmake --build . --parallel 8
```
2 changes: 1 addition & 1 deletion docs/ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set(project_root "${CMAKE_CURRENT_LIST_DIR}/..")
execute_process(COMMAND "git" "rev-parse" "HEAD" WORKING_DIRECTORY ${project_root} OUTPUT_VARIABLE buildCommitHash OUTPUT_STRIP_TRAILING_WHITESPACE)

execute_process(COMMAND ${CMAKE_COMMAND} -D DEPTHAI_PYTHON_COMMIT_HASH:STRING=${buildCommitHash} -D DEPTHAI_PYTHON_BUILD_DOCS:BOOL=YES -D DEPTHAI_BUILD_DOCS:BOOL=YES -S . -B build WORKING_DIRECTORY ${project_root} COMMAND_ECHO STDOUT)
execute_process(COMMAND ${CMAKE_COMMAND} --build build --parallel WORKING_DIRECTORY ${project_root} COMMAND_ECHO STDOUT)
execute_process(COMMAND ${CMAKE_COMMAND} --build build --parallel 8 WORKING_DIRECTORY ${project_root} COMMAND_ECHO STDOUT)
2 changes: 1 addition & 1 deletion docs/docker/update_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

cmake --build build --target sphinx --parallel
cmake --build build --target sphinx --parallel 8

# fix missing index.css file
cp /app/docs/source/_static/css/* /app/build/docs/sphinx/_static/css
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Navigate to root of repository and build Python module with DEPTHAI_PYTHON_TEST_
```
mkdir -p build && cd build
cmake .. -DDEPTHAI_PYTHON_ENABLE_EXAMPLES=ON
cmake --build . --parallel
cmake --build . --parallel 8
```

If you'd like to use a different Python interpreter, set `PYTHON_EXECUTABLE` to your interpreter location
Expand Down

0 comments on commit 79d09be

Please sign in to comment.