@@ -112,10 +112,10 @@ jobs:
112112 mkdir -p ${{ github.workspace }}/ccache
113113 mkdir -p ${{ github.workspace }}/.cache.cpm
114114
115- # Create cache action
116- - name : Create cache action
117- id : core-build -cache
118- uses : actions/cache@v4
115+ # Restore cache, if exists.
116+ - name : Restore cache
117+ id : restore -cache
118+ uses : actions/cache/restore @v4
119119 with :
120120 key : ${{ runner.os }}-mlir-tensorrt-cache-${{ hashFiles('mlir-tensorrt/**/*.cpp', 'mlir-tensorrt/**/*.h', 'mlir-tensorrt/build_tools/**/*') }}
121121 restore-keys : |
@@ -125,8 +125,30 @@ jobs:
125125 ${{ github.workspace }}/.cache.cpm/*
126126 !${{ github.workspace }}/.cache.cpm/tensorrt
127127
128- # Run LIT tests with TensorRT 10
129- - name : Run MLIR-TensorRT lit tests with TensorRT 10
128+ # TensorRT 10 tests
129+ - name : TensorRT 10 build
130+ uses : addnab/docker-run-action@v3
131+ with :
132+ image : ${{ env.DEFAULT_IMAGE }}
133+ options : -v ${{ github.workspace }}/mlir-tensorrt:/mlir-tensorrt -v ${{ github.workspace }}/ccache:/ccache -v ${{ github.workspace }}/.cache.cpm:/.cache.cpm --gpus all
134+ registry : ${{ env.REGISTRY }}
135+ username : ${{ github.actor }}
136+ password : ${{ secrets.GITHUB_TOKEN }}
137+ run : |
138+ cd mlir-tensorrt
139+ ./build_tools/scripts/cicd_build.sh --build_only
140+
141+ - name : Save cache after normal build
142+ id : save-cache-after-normal-build
143+ uses : actions/cache/save@v4
144+ with :
145+ key : ${{ runner.os }}-mlir-tensorrt-cache-${{ hashFiles('mlir-tensorrt/**/*.cpp', 'mlir-tensorrt/**/*.h', 'mlir-tensorrt/build_tools/**/*') }}
146+ path : |
147+ ${{ github.workspace }}/ccache
148+ ${{ github.workspace }}/.cache.cpm/*
149+ !${{ github.workspace }}/.cache.cpm/tensorrt
150+
151+ - name : TensorRT 10 test
130152 uses : addnab/docker-run-action@v3
131153 with :
132154 image : ${{ env.DEFAULT_IMAGE }}
@@ -138,8 +160,30 @@ jobs:
138160 cd mlir-tensorrt
139161 ./build_tools/scripts/cicd_build.sh
140162
141- # Run LIT tests with TensorRT 10 & ASAN
142- - name : Run MLIR-TensorRT lit tests with TensorRT 10, ASAN enabled
163+ # TensorRT 10 & ASAN
164+ - name : TensorRT 10 ASAN build
165+ uses : addnab/docker-run-action@v3
166+ with :
167+ image : ${{ env.DEFAULT_IMAGE }}
168+ options : -v ${{ github.workspace }}/mlir-tensorrt:/mlir-tensorrt -v ${{ github.workspace }}/ccache:/ccache -v ${{ github.workspace }}/.cache.cpm:/.cache.cpm --gpus all
169+ registry : ${{ env.REGISTRY }}
170+ username : ${{ github.actor }}
171+ password : ${{ secrets.GITHUB_TOKEN }}
172+ run : |
173+ cd mlir-tensorrt
174+ ENABLE_ASAN=ON ./build_tools/scripts/cicd_build.sh --build_only
175+
176+ - name : Save cache after ASAN build
177+ id : save-cache-after-asan-build
178+ uses : actions/cache/save@v4
179+ with :
180+ key : ${{ runner.os }}-mlir-tensorrt-cache-${{ hashFiles('mlir-tensorrt/**/*.cpp', 'mlir-tensorrt/**/*.h', 'mlir-tensorrt/build_tools/**/*') }}
181+ path : |
182+ ${{ github.workspace }}/ccache
183+ ${{ github.workspace }}/.cache.cpm/*
184+ !${{ github.workspace }}/.cache.cpm/tensorrt
185+
186+ - name : TensorRT 10 ASAN test
143187 uses : addnab/docker-run-action@v3
144188 with :
145189 image : ${{ env.DEFAULT_IMAGE }}
0 commit comments