From 9d63c1f74ac4f210835e3ff36c229b1872b21aab Mon Sep 17 00:00:00 2001 From: jc01rho Date: Mon, 11 Sep 2023 04:57:50 +0900 Subject: [PATCH] fixed for valgrind test --- .github/workflows/buildable-test.yml | 3 +- .../workflows/setup-with-retry/action.yaml | 46 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/setup-with-retry/action.yaml diff --git a/.github/workflows/buildable-test.yml b/.github/workflows/buildable-test.yml index ee1c66f29e639c..f0b3bf16564ea9 100644 --- a/.github/workflows/buildable-test.yml +++ b/.github/workflows/buildable-test.yml @@ -308,10 +308,11 @@ jobs: - uses: actions/checkout@v3 with: submodules: true - - uses: ./.github/workflows/setup + - uses: ./.github/workflows/setup-with-retry - name: Build openpilot run: ${{ env.RUN }} "scons -j$(nproc)" - name: Run valgrind + timeout-minutes: 1 run: | ${{ env.RUN }} "python selfdrive/test/test_valgrind_replay.py" - name: Print logs diff --git a/.github/workflows/setup-with-retry/action.yaml b/.github/workflows/setup-with-retry/action.yaml new file mode 100644 index 00000000000000..42f98f0d9db919 --- /dev/null +++ b/.github/workflows/setup-with-retry/action.yaml @@ -0,0 +1,46 @@ +name: 'openpilot env setup, with retry on failure' + +inputs: + git_lfs: + description: 'Whether or not to pull the git lfs' + required: false + default: 'true' + cache_key_prefix: + description: 'Prefix for caching key' + required: false + default: 'scons_x86_64' + +env: + SLEEP_TIME: 30 # Time to sleep between retries + +runs: + using: "composite" + steps: + - id: setup1 + uses: ./.github/workflows/setup + continue-on-error: true + with: + git_lfs: ${{ inputs.git_lfs }} + cache_key_prefix: ${{ inputs.cache_key_prefix }} + is_retried: true + - if: steps.setup1.outcome == 'failure' + shell: bash + run: sleep ${{ env.SLEEP_TIME }} + - id: setup2 + if: steps.setup1.outcome == 'failure' + uses: ./.github/workflows/setup + continue-on-error: true + with: + git_lfs: ${{ inputs.git_lfs }} + cache_key_prefix: ${{ inputs.cache_key_prefix }} + is_retried: true + - if: steps.setup2.outcome == 'failure' + shell: bash + run: sleep ${{ env.SLEEP_TIME }} + - id: setup3 + if: steps.setup2.outcome == 'failure' + uses: ./.github/workflows/setup + with: + git_lfs: ${{ inputs.git_lfs }} + cache_key_prefix: ${{ inputs.cache_key_prefix }} + is_retried: true \ No newline at end of file