Build code snippets together with doc (#13541)
* Build code snippets together with doc * Added separate step for code snippets * Try to enable CI step * Disabe myriad * Try to fix Windows * Detect number of cores * Reduced build time of code snippets
This commit is contained in:
4
.github/workflows/build_doc.yml
vendored
4
.github/workflows/build_doc.yml
vendored
@@ -44,10 +44,10 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DENABLE_DOCS=ON -DENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
|
||||
- name: Build doc
|
||||
run: |
|
||||
cmake --build . --target sphinx_docs -j8
|
||||
cmake --build . --target sphinx_docs -j`nproc`
|
||||
working-directory: build
|
||||
|
||||
- name: Archive HTML
|
||||
|
||||
44
.github/workflows/code_snippets.yml
vendored
Normal file
44
.github/workflows/code_snippets.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Code snippets
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/code_snippets.yml'
|
||||
- 'docs/snippets/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/code_snippets.yml'
|
||||
- 'docs/snippets/**'
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ['ubuntu-22.04', 'macos-latest', 'windows-latest']
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Clone OpenVINO
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
lfs: true
|
||||
|
||||
- name: Check cmake
|
||||
run: |
|
||||
which cmake
|
||||
cmake --version
|
||||
|
||||
- name: CMake
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -DCMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: Get number of CPU cores
|
||||
uses: SimenB/github-actions-cpu-cores@v1
|
||||
id: cpu-cores
|
||||
|
||||
- name: Build snippets
|
||||
run: |
|
||||
cmake --build . --target ie_docs_snippets -j${{ steps.cpu-cores.outputs.count }}
|
||||
working-directory: build
|
||||
Reference in New Issue
Block a user