@@ -233,17 +233,25 @@ jobs:
233233 python parser.py
234234 cd ../..
235235
236+ - name : Cache MNIST test dataset
237+ id : cache-mnist
238+ uses : actions/cache@v4
239+ with :
240+ path : docs/mnist/mnist/test
241+ key : mnist-dataset-e2d09c892023700f68bfa9f30ac91a4dffaa23b151deeaca627101b3d73ef83d
242+
236243 - name : Download MNIST test dataset
244+ if : steps.cache-mnist.outputs.cache-hit != 'true'
237245 run : |
246+ set -e
238247 mkdir -p docs/mnist/mnist/test
239- if [ ! -f "docs/mnist/mnist/test/0_000000.png" ]; then
240- echo "Downloading test images..."
241- wget -q https://github.com/DeepTrackAI/MNIST_dataset/archive/main.zip
242- unzip -q main.zip
243- cp MNIST_dataset-main/mnist/test/*.png docs/mnist/mnist/test/
244- rm -rf main.zip MNIST_dataset-main
245- echo "Downloaded $(ls docs/mnist/mnist/test | wc -l) images"
246- fi
248+ echo "Downloading test images..."
249+ wget -q https://github.com/DeepTrackAI/MNIST_dataset/archive/main.zip -O main.zip
250+ echo "e2d09c892023700f68bfa9f30ac91a4dffaa23b151deeaca627101b3d73ef83d main.zip" | sha256sum -c -
251+ unzip -q main.zip
252+ cp MNIST_dataset-main/mnist/test/*.png docs/mnist/mnist/test/
253+ rm -rf main.zip MNIST_dataset-main
254+ echo "Downloaded $(ls docs/mnist/mnist/test | wc -l) images"
247255
248256 - name : Download binary and libs
249257 uses : actions/download-artifact@v4
@@ -262,16 +270,14 @@ jobs:
262270 run : |
263271 echo "### Library verification ###"
264272 file build/bin/opencv_libs/libopencv_imgcodecs.so.4.9.0 | grep "shared object"
265- ldd build/bin/opencv_libs/libopencv_imgcodecs.so.4.9.0 || true
266- realpath build/bin/opencv_libs/libopencv_imgcodecs.so.409
267273
268274 - name : Run evaluation
269275 run : |
270276 echo "### Pre-run checks ###"
271277 export LD_LIBRARY_PATH=$PWD/build/bin/opencv_libs:/usr/lib/x86_64-linux-gnu
272278 echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
273279
274- LD_DEBUG=files ./build/bin/ACC_MNIST* 2> ld_debug.log || true
280+ LD_DEBUG=files ./build/bin/ACC_MNIST* 2> ld_debug.log
275281 echo "### Library loading debug # ##"
276282 grep -i "opencv_imgcodecs" ld_debug.log
277283
0 commit comments