44 workflow_dispatch :
55 pull_request :
66 push :
7- branches :
7+ branches :
88 - main
99 - nightly
1010 - release/*
1818 steps :
1919 - name : checkout TensorRT-Incubator
2020 uses : actions/checkout@v4
21- - name : python format and clang check
22- run : |
23- set -eou pipefail
24- set -x
25- python3 -m pip install black
26- python3 -m black --check --extend-exclude='.*\.pyi' mlir-tensorrt/compiler/
27- python3 -m black --check --extend-exclude='.*\.pyi' mlir-tensorrt/integrations/python/
28- git clang-format HEAD~1 --diff
29- if [ $? -ne 0 ]; then
30- echo "Python format and clang check failed"
31- exit 1
32- fi
33- echo "Python format and clang check passed"
3421 - name : Generate matrix
3522 id : generate
3623 run : |
@@ -46,12 +33,32 @@ jobs:
4633 matrix :
4734 ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
4835 runs-on : [linux-amd64-gpu-h100-latest-1]
49- container :
36+ container :
5037 image : ${{ matrix.docker_image }}
5138 options : ' --gpus all'
5239 steps :
40+ - name : clean workspace
41+ run : |
42+ set -eou pipefail
43+ set -x
44+ echo "cleaning up ${GITHUB_WORKSPACE}"
45+ rm -rf ${GITHUB_WORKSPACE}
46+ mkdir -p ${GITHUB_WORKSPACE}
5347 - name : checkout TensorRT-Incubator
5448 uses : actions/checkout@v4
49+ - name : python format and clang check
50+ run : |
51+ set -eou pipefail
52+ set -x
53+ python3 -m pip install black
54+ python3 -m black --check --extend-exclude='.*\.pyi' mlir-tensorrt/compiler/
55+ python3 -m black --check --extend-exclude='.*\.pyi' mlir-tensorrt/integrations/python/
56+ git clang-format HEAD~1 --diff
57+ if [ $? -ne 0 ]; then
58+ echo "Python format and clang check failed"
59+ exit 1
60+ fi
61+ echo "Python format and clang check passed"
5562 - name : create cache folder
5663 run : |
5764 set -eou pipefail
@@ -108,4 +115,7 @@ jobs:
108115 cd mlir-tensorrt
109116 python3 -m pip install .private.wheels/mlir_tensorrt-*.whl
110117 # TODO: add smoke test for the wheel
111-
118+
119+ concurrency :
120+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-tensorrt-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
121+ cancel-in-progress : true
0 commit comments