[GHA][CPU]Test filter for precommit fixed #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CPU functional tests | ||
on: | ||
workflow_call: | ||
inputs: | ||
runner: | ||
description: 'Machine on which the tests would run' | ||
type: string | ||
required: true | ||
image: | ||
description: 'Docker image in which the tests would run' | ||
type: string | ||
required: false | ||
default: null | ||
python-version: | ||
description: 'Python version to setup. E.g., "3.11"' | ||
type: string | ||
required: true | ||
permissions: read-all | ||
jobs: | ||
CPU_Functional_Tests: | ||
name: CPU functional tests | ||
timeout-minutes: 30 | ||
runs-on: ${{ inputs.runner }} | ||
container: | ||
image: ${{ inputs.image }} | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input | ||
INSTALL_DIR: ${{ github.workspace }}/install | ||
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests | ||
PARALLEL_TEST_SCRIPT: ${{ github.workspace }}/install/tests/functional_test_utils/layer_tests_summary/run_parallel.py | ||
PARALLEL_TEST_CACHE: ${{ github.workspace }}/install/tests/test_cache.lst | ||
<<<<<<< HEAD | ||
======= | ||
GTEST_FILTER: ${{ inputs.scope == 'nightly' && '' || '--gtest_filter=*smoke*' }} | ||
>>>>>>> 75e674c023 (smoke filter removed) | ||
steps: | ||
- name: Download OpenVINO package | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: openvino_package | ||
path: ${{ env.INSTALL_DIR }} | ||
- name: Download OpenVINO tests package | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: openvino_tests | ||
path: ${{ env.INSTALL_TEST_DIR }} | ||
# Needed as ${{ github.workspace }} is not working correctly when using Docker | ||
- name: Setup Variables | ||
run: | | ||
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV" | ||
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV" | ||
echo "PARALLEL_TEST_SCRIPT=$GITHUB_WORKSPACE/install/tests/functional_test_utils/layer_tests_summary/run_parallel.py" >> "$GITHUB_ENV" | ||
echo "PARALLEL_TEST_CACHE=$GITHUB_WORKSPACE/install/tests/test_cache.lst" >> "$GITHUB_ENV" | ||
- name: Install OpenVINO dependencies (mac) | ||
if: runner.os == 'macOS' | ||
run: brew install pigz | ||
- name: Extract OpenVINO packages | ||
run: | | ||
pushd $INSTALL_DIR | ||
pigz -dc openvino_package.tar.gz | tar -xf - -C ${INSTALL_DIR} | ||
popd | ||
pushd $INSTALL_TEST_DIR | ||
pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_DIR} | ||
popd | ||
- name: Fetch setup_python action | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
timeout-minutes: 15 | ||
with: | ||
sparse-checkout: | | ||
.github/actions/setup_python/action.yml | ||
sparse-checkout-cone-mode: false | ||
path: 'openvino' | ||
- name: Setup Python ${{ inputs.python-version }} | ||
uses: ./openvino/.github/actions/setup_python | ||
with: | ||
version: ${{ inputs.python-version }} | ||
should-setup-pip-paths: 'false' | ||
self-hosted-runner: ${{ runner.os == 'Linux' }} | ||
- name: Install python dependencies for run_parallel.py | ||
run: python3 -m pip install -r ${INSTALL_TEST_DIR}/functional_test_utils/layer_tests_summary/requirements.txt | ||
- name: Restore tests execution time | ||
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 | ||
with: | ||
path: ${{ env.PARALLEL_TEST_CACHE }} | ||
key: ${{ runner.os }}-${{ runner.arch }}-tests-functional-cpu-stamp-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ runner.arch }}-tests-functional-cpu-stamp | ||
- name: Intel CPU plugin func tests (parallel) | ||
run: | | ||
# Needed as the Linux CC does not require setupvars to work | ||
if [[ -f "${INSTALL_DIR}/setupvars.sh" ]]; then | ||
source ${INSTALL_DIR}/setupvars.sh | ||
fi | ||
# Needed as ze_loader.so is under INSTALL_TEST_DIR | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${INSTALL_TEST_DIR} | ||
python3 ${PARALLEL_TEST_SCRIPT} -e ${INSTALL_TEST_DIR}/ov_cpu_func_tests -c ${PARALLEL_TEST_CACHE} -w ${INSTALL_TEST_DIR} -s suite -rf 0 -- --gtest_print_time=1 --gtest_filter=*smoke* | ||
timeout-minutes: 25 | ||
- name: Save tests execution time | ||
uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 | ||
if: github.ref_name == 'master' | ||
with: | ||
path: ${{ env.PARALLEL_TEST_CACHE }} | ||
key: ${{ runner.os }}-${{ runner.arch }}-tests-functional-cpu-stamp-${{ github.sha }} | ||
- name: Upload Test Results | ||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | ||
if: always() | ||
with: | ||
name: test-results-functional-cpu | ||
path: | | ||
${{ env.INSTALL_TEST_DIR }}/temp/*.log | ||
${{ env.INSTALL_TEST_DIR }}/logs/*.log | ||
${{ env.INSTALL_TEST_DIR }}/logs/failed/*.log | ||
${{ env.INSTALL_TEST_DIR }}/logs/crashed/*.log | ||
${{ env.INSTALL_TEST_DIR }}/logs/hanged/*.log | ||
${{ env.INSTALL_TEST_DIR }}/logs/interapted/*.log | ||
${{ env.INSTALL_TEST_DIR }}/logs/hash_table.csv | ||
${{ env.PARALLEL_TEST_CACHE }} | ||
if-no-files-found: 'error' |