From d0f87961a07bcbb3a87f6e6dddb03fc96f48fbed Mon Sep 17 00:00:00 2001 From: Alina Kladieva Date: Tue, 5 Dec 2023 18:25:14 +0100 Subject: [PATCH 1/2] [GHA] Run nightly scope by label set during PR creation --- .github/workflows/linux.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4e90619162d155..ab21ba24e401f9 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.smart_ci.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 From a25a9e607bc2665041ee4659a303fdc694e15910 Mon Sep 17 00:00:00 2001 From: Alina Kladieva Date: Tue, 5 Dec 2023 19:14:06 +0100 Subject: [PATCH 2/2] Fix step ID --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cc4fe8faf57fce..c995683dfaba33 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -25,7 +25,7 @@ jobs: outputs: affected_components: "${{ steps.smart_ci.outputs.affected_components }}" skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}" - val_cycle: "${{ steps.smart_ci.outputs.val_cycle }}" + val_cycle: "${{ steps.val_cycle.outputs.val_cycle }}" steps: - name: checkout action uses: actions/checkout@v4