diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 567c6e9a14c038..c995683dfaba33 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -25,6 +25,7 @@ jobs: outputs: affected_components: "${{ steps.smart_ci.outputs.affected_components }}" skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}" + val_cycle: "${{ steps.val_cycle.outputs.val_cycle }}" steps: - name: checkout action uses: actions/checkout@v4 @@ -43,6 +44,14 @@ jobs: skip_when_only_listed_labels_set: 'docs' skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg' + - name: Get validation cycle to run + id: val_cycle + shell: bash + run: | + val_cycle="${{ (contains(github.event.pull_request.labels.*.name, 'nightly') || + github.event_name == 'schedule') && 'nightly' || 'precommit' }}" + echo "val_cycle=$val_cycle" >> "$GITHUB_OUTPUT" + Build: needs: Smart_CI timeout-minutes: 150 @@ -1275,8 +1284,8 @@ jobs: defaults: run: shell: bash - runs-on: ${{ github.event_name == 'schedule' && 'ubuntu-20.04-16-cores' || 'ubuntu-20.04-8-cores'}} - timeout-minutes: ${{ github.event_name == 'schedule' && 400 || 25 }} + runs-on: ${{ needs.smart_ci.outputs.val_cycle == 'nightly' && 'ubuntu-20.04-16-cores' || 'ubuntu-20.04-8-cores'}} + timeout-minutes: ${{ needs.smart_ci.outputs.val_cycle == 'nightly' && 400 || 25 }} # TODO: Switch back to self-hosted runners # container: # image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 @@ -1343,7 +1352,7 @@ jobs: export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/tf_hub_tests/ -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-tf_hub_tf_fe.html --self-contained-html -v env: - TYPE: ${{ github.event_name == 'schedule' && 'nightly' || 'precommit'}} + TYPE: ${{ needs.smart_ci.outputs.val_cycle }} TEST_DEVICE: CPU - name: Upload Test Results @@ -1361,8 +1370,8 @@ jobs: defaults: run: shell: bash - runs-on: ${{ github.event_name == 'schedule' && 'ubuntu-20.04-16-cores' || 'ubuntu-20.04-8-cores'}} - timeout-minutes: ${{ github.event_name == 'schedule' && 400 || 25 }} + runs-on: ${{ needs.smart_ci.outputs.val_cycle == 'nightly' && 'ubuntu-20.04-16-cores' || 'ubuntu-20.04-8-cores'}} + timeout-minutes: ${{ needs.smart_ci.outputs.val_cycle == 'nightly' && 400 || 25 }} env: OPENVINO_REPO: ${{ github.workspace }}/openvino INSTALL_DIR: ${{ github.workspace }}/install @@ -1428,7 +1437,7 @@ jobs: export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/performance_tests/ -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-tf_hub_performance.html --self-contained-html -v env: - TYPE: ${{ github.event_name == 'schedule' && 'nightly' || 'precommit'}} + TYPE: ${{ needs.smart_ci.outputs.val_cycle }} TEST_DEVICE: CPU - name: Upload Test Results @@ -1443,11 +1452,11 @@ jobs: PyTorch_Models_Tests: name: PyTorch Models tests needs: [Build, Smart_CI] - timeout-minutes: ${{ github.event_name == 'schedule' && 400 || 30 }} + timeout-minutes: ${{ needs.smart_ci.outputs.val_cycle == 'nightly' && 400 || 30 }} defaults: run: shell: bash - runs-on: ${{ github.event_name == 'schedule' && 'ubuntu-20.04-16-cores' || 'ubuntu-20.04-8-cores'}} + runs-on: ${{ needs.smart_ci.outputs.val_cycle == 'nightly' && 'ubuntu-20.04-16-cores' || 'ubuntu-20.04-8-cores'}} # TODO: Switch back to self-hosted runners # container: # image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 @@ -1523,7 +1532,7 @@ jobs: export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/torch_tests -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-torch_model_tests.html --self-contained-html -v env: - TYPE: ${{ github.event_name == 'schedule' && 'nightly' || 'precommit'}} + TYPE: ${{ needs.smart_ci.outputs.val_cycle }} TEST_DEVICE: CPU USE_SYSTEM_CACHE: False