Skip to content

Commit c9dbcdf

Browse files
committed
Add smoke test exit(0)
1 parent 12c71d6 commit c9dbcdf

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/workflows/build-test.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
pre-script: packaging/pre_build_script.sh
3636
env-var-script: packaging/env_vars.txt
3737
post-script: ""
38-
smoke-test-script: ""
38+
smoke-test-script: "packaging/smoke_test.py"
3939
package-name: torch_tensorrt
4040
name: Build torch-tensorrt whl package
4141
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.2
@@ -74,7 +74,7 @@ jobs:
7474
test-infra-repository: pytorch/test-infra
7575
test-infra-ref: release/2.2
7676
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
77-
pre-script: ${{ matrix.pre-script }}
77+
pre-script: packaging/pre_build_script_exit.sh
7878
script: |
7979
export USE_HOST_DEPS=1
8080
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
@@ -110,7 +110,7 @@ jobs:
110110
test-infra-repository: pytorch/test-infra
111111
test-infra-ref: release/2.2
112112
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
113-
pre-script: ${{ matrix.pre-script }}
113+
pre-script: packaging/pre_build_script_exit.sh
114114
script: |
115115
export USE_HOST_DEPS=1
116116
pushd .
@@ -138,7 +138,7 @@ jobs:
138138
test-infra-repository: pytorch/test-infra
139139
test-infra-ref: release/2.2
140140
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
141-
pre-script: ${{ matrix.pre-script }}
141+
pre-script: packaging/pre_build_script_exit.sh
142142
script: |
143143
export USE_HOST_DEPS=1
144144
pushd .
@@ -168,7 +168,7 @@ jobs:
168168
test-infra-repository: pytorch/test-infra
169169
test-infra-ref: release/2.2
170170
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
171-
pre-script: ${{ matrix.pre-script }}
171+
pre-script: packaging/pre_build_script_exit.sh
172172
script: |
173173
export USE_HOST_DEPS=1
174174
pushd .
@@ -197,7 +197,7 @@ jobs:
197197
test-infra-repository: pytorch/test-infra
198198
test-infra-ref: release/2.2
199199
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
200-
pre-script: ${{ matrix.pre-script }}
200+
pre-script: packaging/pre_build_script_exit.sh
201201
script: |
202202
export USE_HOST_DEPS=1
203203
pushd .

packaging/pre_build_script.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
if python -V | grep 3.12; then exit 0; fi
4+
35
# Install dependencies
46
python3 -m pip install pyyaml
57
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")

packaging/pre_build_script_exit.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
if python -V | grep 3.12; then exit 0; fi

packaging/smoke_test.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import sys
2+
3+
if sys.version.startswith("3.12"):
4+
exit(0)

0 commit comments

Comments
 (0)