Skip to content

Commit b6faf2b

Browse files
committed
add cache
1 parent 3f33643 commit b6faf2b

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/build-native-nuget.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,25 @@ jobs:
2323
# - { title: osx-arm64, rid: osx-arm64, url: https://paddle-inference-lib.bj.bcebos.com/3.0.0/cxx_c/MacOS/m1_clang_noavx_accelerate_blas/paddle_inference_c.tgz }
2424

2525
steps:
26+
- name: Cache Paddle Inference C API Archive
27+
id: cache-inference-lib
28+
uses: actions/cache@v4
29+
with:
30+
path: paddle_inference_c
31+
key: paddle-inference-${{ matrix.url }}
32+
2633
- name: Download/Extract Paddle Inference C API Archive
34+
if: steps.cache-inference-lib.outputs.cache-hit != 'true'
2735
run: |
28-
wget -q -O paddle_inference_c.zip ${{ matrix.url }}
36+
wget -q -O archive_file.tmp ${{ matrix.url }}
2937
3038
if [[ "${{ matrix.rid }}" == "win-x64" ]]; then
31-
unzip -q paddle_inference_c.zip
39+
unzip -q archive_file.tmp -d paddle_inference_c
3240
else
33-
tar -xzf paddle_inference_c.zip
41+
tar -xzf archive_file.tmp -C paddle_inference_c
3442
fi
35-
rm paddle_inference_c.zip
43+
rm archive_file.tmp
3644
37-
echo "::group::Extracted Paddle Inference C API Archive"
38-
ls -lR
45+
echo "::group::Extracted Paddle Inference C API Archive (contents of ./paddle_inference_c)"
46+
ls -lR paddle_inference_c
3947
echo "::endgroup::"

0 commit comments

Comments
 (0)