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:
Ilya Churaev
2022-10-21 07:29:19 +04:00
committed by GitHub
parent 0f0a08cde1
commit 85d78a3ef0
7 changed files with 80 additions and 45 deletions

View File

@@ -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
View 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