docs/dev/ci/github_actions/overview.md
Welcome to the OpenVINO Developer guide on the GitHub Actions infrastructure. This document will give you an overview of the setup used in OpenVINO and point you at more detailed instructions where necessary.
GitHub Actions workflows are configurable and automated processes that run one or multiple consecutive jobs (for more details, refer to the official GitHub Actions documentation). They include:
You can find all workflows for this repository in the workflows folder. The three main ones, providing most coverage for different operating systems, are:
Additionally, several supporting workflows build and test OpenVINO for other operating systems and processor architectures:
The OpenVINO workflows use both official and community-built actions, such as actions/checkout
and actions/upload-artifact. Additionally, jobs featured in several workflows are extracted
into reusable workflows. You can learn more about using and writing them,
check how to reuse workflows,
and see what and how to obtain additional actions.
Workflows run whenever they are triggered by predefined events. These triggers are not mutually exclusive and multiple can be used by one workflow. The OpenVINO repository has three, and as you may see in the example below, they are all included in the Linux workflow. They are:
on: schedule - schedule trigger
'0 0 * * 3,6' - learn more on cron syntaxon: pull_request - pre-commit trigger
master or release
branch and every time the PR is updated with new commits.paths key.on: push - post-commit trigger.
master or release branch
(e.g., when a PR is merged).paths key.The triggers for each workflow can be found at the beginning of a workflow file, in the on
key. You should also learn how to use
paths.
on:
schedule:
# at 00:00 on Wednesday and Saturday
- cron: '0 0 * * 3,6'
pull_request:
paths:
- '**'
- '!**/docs/**'
- '!docs/**'
- 'docs/snippets/**'
- '!**/**.md'
- '!**.md'
push:
paths:
- '**'
- '!docs/**'
- '!**/docs/**'
- 'docs/snippets/**'
- '!**/**.md'
- '!**.md'
branches:
- master
- 'releases/**'
NOTE
The workflows listed above are required for OpenVINO contributions. If they fail the PR cannot be merged. It is always a good idea to check their results while working within the OpenVINO repository.
The workflow structures for Linux, Windows, and macOS are mostly the same:
NOTE: some workflows may use the same structure, while others may lack the last 3 steps,
with tests coming right after the Build step.
Overview of the Linux workflow. There are several jobs present:
jobs:
Build: ...
Debian_Packages: ...
Samples: ...
Conformance: ...
ONNX_Runtime: ...
CXX_Unit_Tests: ...
Python_Unit_Tests: ...
CPU_Functional_Tests: ...
TensorFlow_Hub_Models_Tests: ...
PyTorch_Models_Tests: ...
NVIDIA_Plugin: ...
The Build job executes the first 4 steps:
cmakeactions/upload-artifactThe other jobs are responsible for running different tests using the built artifacts. They:
actions/download-artifactEach job has several keys that describe its environment. Consider checking a comprehensive syntax overview.
This section describes the specifics of the OpenVINO CI environment.
Overview of the Linux workflow's Python_Unit_Tests job:
Python_Unit_Tests:
name: Python unit tests
needs: Build
timeout-minutes: 40
defaults:
run:
shell: bash
runs-on: aks-linux-4-cores-16gb
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount/caches:/mount/caches
env:
OPENVINO_REPO: /__w/openvino/openvino/openvino
INSTALL_DIR: /__w/openvino/openvino/install
INSTALL_TEST_DIR: /__w/openvino/openvino/install/tests
LAYER_TESTS_INSTALL_DIR: /__w/openvino/openvino/install/tests/layer_tests
steps: ...
needs: Build which means that they wait for the Build job to
finish as they require artifacts from it.runs-on key.
aks-linux-4-cores-16gb is used. Read more on what machines are
available and how to choose one for a job.image
key under the container key.
openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 is used.
Read more on what images are available and when to use one.cmake build artifacts.
steps - a series of commands to execute in the predefined environment.
shell key under defaults: run:
unless a shell is specified directly in a step.Please consult workflow security guidelines before submitting a PR with GitHub Actions workflows changes.
To understand which jobs have successfully passed, which are running and which have failed, check the following:
For Pull Requests:
Open a Pull Request and scroll to the bottom of the page. You will see a list of jobs, both finished and still running for the most recent commit:
For scheduled runs:
Event and selecting schedule
Artifacts, that is files produced by the workflow, are available only for the completed pipelines, both successful or failed. To find artifacts for a pipeline, follow these steps:
Open a Pull Request and scroll to the list of jobs, as described above.
Click Details, to the right of the selected job, to see more information about it.
Click Summary, above the list of jobs on the left side of the window:
Scroll to the bottom of the page
You will find the artifacts produced by all the jobs in this pipeline:
Click on the artifact name to download it.
To find logs for a pipeline:
Details, to the right of the selected job, to see more information about it.Several actions are written specifically for the needs of the OpenVINO workflows. Read more about the available custom actions and what they do in the custom actions document.
Check the Reusing GitHub Actions section for more information.
The machines that execute the commands from the workflows are called runners in GitHub Actions. Two types of runners are available for the OpenVINO organization:
Workflows utilize appropriate runners based on their jobs' needs. Learn more about the available runners and how to choose one in the OpenVINO Runner Overview.
You can run jobs in Docker containers. Refer to the documentation for syntax overview.
Workflows utilize appropriate Docker images based on their jobs' needs. Learn more about the available images and how to choose one in the OpenVINO Docker Image Overview.
Three types of caches are available:
workflows utilize appropriate caches based on their jobs' needs. Learn more about the available caches and how to use one in the OpenVINO Cache Overview.
If you would like to add new tests, refer to the How to add Tests document.
To optimize pre-commit workflow by running only the jobs that are actually required to validate changes in a pull request, you can use the Smart CI feature - learn more about it.
The OpenVINO GitHub organisation utilises Merge Queue to automate the Pull Requests' merging process. Learn more about MQ and available settings in the official documentation.
Merge Queue has several settings that are configured on a per-repository basis. The OpenVINO repository uses the following settings:
If you would like to enable Merge Queue for another repository in the OpenVINO GitHub organisation, use these settings as the default ones and adjust if needed.