Skip to content

Commit

Permalink
[CI] [GHA] Add retries for APT, update deadsnakes action (#22515)
Browse files Browse the repository at this point in the history
* update setup_python version, add retries for apt in Linux workflows

* account for sudo

* use sudo via sh
  • Loading branch information
akashchi authored Jan 30, 2024
1 parent 53672ec commit dab68a8
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup_python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ runs:

- if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }}
name: Setup Python ${{ inputs.version }}
uses: akashchi/deadsnakes-action@f01521a69eee61eaca3a34440bea3ce838317846
uses: akashchi/deadsnakes-action@92417281055a5878a0450f240a5b95883eb2d7e2
with:
python-version: ${{ inputs.version }}

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/job_cpu_functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
PARALLEL_TEST_CACHE: ${{ github.workspace }}/install/tests/test_cache.lst
if: ${{ github.event_name != 'merge_group' }}
steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/job_cxx_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
if: ${{ github.event_name != 'merge_group' }}
steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/job_debian_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
DEBIAN_PACKAGES_DIR: ${{ github.workspace }}/packages
steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Download OpenVINO debian packages
uses: actions/download-artifact@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/job_onnx_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
ONNX_MODEL_ZOO_SHA: "d58213534f2a4d1c4b19ba62b3bb5f544353256e"
if: ${{ github.event_name != 'merge_group' }}
steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/job_onnx_runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
ONNX_RUNTIME_UTILS: ${{ github.workspace }}/install/onnxruntime
ONNX_RUNTIME_BUILD_DIR: ${{ github.workspace }}/onnxruntime/build
steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/job_python_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
LAYER_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/layer_tests
steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/job_pytorch_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,18 @@ jobs:
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests
steps:

- name: Check sudo
if: ${{ runner.os == 'Linux' }}
run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi

- name: Set apt retries
run: |
if [ "$(id -u)" -eq 0 ]; then
echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries
else
sudo sh -c "echo 'Acquire::Retries \"10\";' >> /etc/apt/apt.conf.d/80-retries"
fi
- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/job_samples_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/job_tensorflow_hub_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,18 @@ jobs:
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests
steps:

- name: Check sudo
if: ${{ runner.os == 'Linux' }}
run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi

- name: Set apt retries
run: |
if [ "$(id -u)" -eq 0 ]; then
echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries
else
sudo sh -c "echo 'Acquire::Retries \"10\";' >> /etc/apt/apt.conf.d/80-retries"
fi
- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ jobs:
if: "!needs.smart_ci.outputs.skip_workflow"

steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Install git
run: |
apt-get update
Expand Down Expand Up @@ -529,6 +532,9 @@ jobs:
if: fromJSON(needs.smart_ci.outputs.affected_components).NVIDIA

steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Fetch install_build_dependencies.sh
uses: actions/checkout@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ jobs:
if: "!needs.smart_ci.outputs.skip_workflow"

steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linux_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
if: ${{ !needs.smart_ci.outputs.skip_workflow && github.event_name != 'merge_group' }}

steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Install git
run: |
apt-get update
Expand Down Expand Up @@ -273,6 +276,9 @@ jobs:
SCCACHE_AZURE_KEY_PREFIX: ubuntu22_x86_64_cc_Release

steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates git-lfs

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linux_riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ jobs:
CCACHE_MAXSIZE: 50G
if: ${{ !needs.smart_ci.outputs.skip_workflow && github.event_name != 'merge_group' }}
steps:
- name: Set apt retries
run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries

- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates

Expand Down

0 comments on commit dab68a8

Please sign in to comment.