Skip to content

Commit d09f7b9

Browse files
committed
add step level if condition
1 parent e195329 commit d09f7b9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/build-test-linux-x86_64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ jobs:
208208
L1-dynamo-core-tests:
209209
name: L1 dynamo core tests
210210
needs: [filter-matrix, build, L0-dynamo-core-tests]
211+
if: always()
211212
#needs: [filter-matrix, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests, L0-torchscript-tests]
212213
strategy:
213214
fail-fast: false

.github/workflows/linux-test.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ jobs:
8484
USE_TRT_RTX: ${{ inputs.use-rtx }}
8585
DOWNLOAD_ARTIFACT_NAME: pytorch_tensorrt_${{ matrix.tensorrt.version }}_${{ matrix.python_version }}_${{ matrix.desired_cuda }}_${{ inputs.architecture }}
8686
name: ${{ inputs.job-name }}-${{ matrix.tensorrt.version }}-${{ matrix.python_version }}-${{ matrix.desired_cuda }}
87-
if: ${{ matrix.desired_cuda == inputs.filter-cuda && matrix.python_version == inputs.filter-python }}
8887
runs-on: ${{ matrix.validation_runner }}
8988
container:
9089
image: ${{ matrix.container_image }}
@@ -93,7 +92,19 @@ jobs:
9392
# to have a conversation
9493
timeout-minutes: 120
9594
steps:
95+
- name: Check if should run this variant
96+
id: check_variant
97+
run: |
98+
set -euxo pipefail
99+
echo "lan added .... PYTHON_VERSION=${PYTHON_VERSION} and inputs.filter-python=${inputs.filter-python}"
100+
echo "lan added .... CU_VERSION=${CU_VERSION} and inputs.filter-cuda=${inputs.filter-cuda}"
101+
if [ "${PYTHON_VERSION}" = "${{ inputs.filter-python }}" ] && [ "${CU_VERSION}" = "${{ inputs.filter-cuda }}" ]; then
102+
echo "should_run=true" >> $GITHUB_OUTPUT
103+
else
104+
echo "should_run=false" >> $GITHUB_OUTPUT
105+
fi
96106
- name: Clean workspace
107+
if: steps.check_variant.outputs.should_run == 'true'
97108
run: |
98109
set -euxo pipefail
99110
echo "::group::Cleanup debug output"

0 commit comments

Comments
 (0)