Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GHA] Run nightly scope by label set during PR creation #21485

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it expected that we will have a single nightly or per test suite tf-nightly / pytorch-nightly, which can will be converted by smart-ci to needs.smart_ci.outputs.pytorch_val_cycle, etc ?

CC @mvafin what is your expectation? do you expect per-test suite configuration of nightly scopes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to be able to run pytorch separate from tf if that is possible.


Build:
needs: Smart_CI
timeout-minutes: 150
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
Loading