Skip to content

demos: test G-API on GitHub Actions #5

demos: test G-API on GitHub Actions

demos: test G-API on GitHub Actions #5

Workflow file for this run

name: github-actions
on: pull_request
jobs:
cpp_gapi-demos:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.11
cache: pip
- name: Install OMZ tools
run: |
python -m pip install --upgrade pip
python -m pip install --extra-index-url https://download.pytorch.org/whl/cpu openvino==2023.1.0.dev20230728 openvino-dev[]==2023.1.0.dev20230728 tools/model_tools
# Reinstall OMZ tools that could come from openvino-dev because pip doesn't promise the order of installation
python -m pip install --no-cache-dir --no-deps tools/model_tools
# Make sure OpenVINO is used from C++ package, not from PyPi
python -m pip uninstall -y openvino
- name: Download OpenVINO
run: |
mkdir ov
curl https://storage.openvinotoolkit.org/repositories/openvino/packages/master/2023.1.0.dev20230728/l_openvino_toolkit_ubuntu20_2023.1.0.dev20230728_x86_64.tgz | tar --directory ov --strip-components=1 -xz
sudo ov/install_dependencies/install_openvino_dependencies.sh
- uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: "2000M"
# key: ccache
# restore-keys: ccache
# - uses: actions/checkout@v3
# with:
# repository: opencv/opencv
# path: opencv
# - name: Compile OpenCV
# run: |
# mkdir opencv/build
# cd opencv/build
# cmake -DCMAKE_BUILD_TYPE=Release -DWITH_INF_ENGINE=y -DOpenVINO_DIR=$GITHUB_WORKSPACE/ov/runtime/cmake/ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_LINKER_LAUNCHER=ccache ..
# cmake --build . -j $((`nproc`*2+2))
# - name: build_demos.sh
# run: |
# source ov/setupvars.sh
# OpenCV_DIR=$GITHUB_WORKSPACE/opencv/build CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_CXX_LINKER_LAUNCHER=ccache ./demos/build_demos.sh --build_dir=build
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/downloader-cache-dir
key: downloader-cache-dir
- name: run_tests.py
run: |
source ov/setupvars.sh
python demos/tests/run_tests.py --demo-build-dir build/intel64/Release/ --test-data-dir . --device CPU --downloader-cache-dir ${{ github.workspace }}/downloader-cache-dir --demos cpp_gapi