forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.56 KB
/
code_snippets.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Code snippets
on:
push:
paths:
- '.github/workflows/code_snippets.yml'
- 'docs/snippets/**'
branches:
- 'master'
- 'releases/**'
pull_request:
paths:
- '.github/workflows/code_snippets.yml'
- 'docs/snippets/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
Build:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04', 'macos-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
if: ${{ github.repository_owner == 'openvinotoolkit' }}
steps:
- name: Clone OpenVINO
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: 'true'
- name: Install OpenCL
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
if: runner.os == 'Linux'
with:
packages: ocl-icd-opencl-dev opencl-headers
version: 3.0
- name: Install scons
if: runner.os == 'macOS'
run: brew install scons
- name: CMake configure
run: cmake -DCMAKE_BUILD_TYPE=Release -DTHREADING=SEQ -B build
- name: Build snippets
if: ${{ runner.os == 'Linux' || runner.os == 'macOS'}}
run: cmake --build build --target openvino_docs_snippets --parallel $(nproc)
- name: Build snippets Windows
if: ${{ runner.os == 'Windows'}}
shell: pwsh
run: cmake --build build --target openvino_docs_snippets --parallel $ENV:NUMBER_OF_PROCESSORS