Skip to content

Commit c88ae1f

Browse files
committed
chore: chache infer build
1 parent 57bd055 commit c88ae1f

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/run_infer.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,30 @@ jobs:
2727

2828
- name: Clone infer
2929
run: |
30-
cd ..
3130
git clone https://github.com/facebook/infer.git
3231
32+
- name: Cache infer build
33+
id: cache-infer
34+
uses: actions/cache@v4
35+
with:
36+
path: ./infer
37+
key: ${{ runner.os }}-infer-${{ hashFiles('./infer/.git/logs/HEAD') }}
38+
3339
- name: Build infer
40+
if: steps.cache-infer.outputs.cache-hit != 'true'
3441
run: |
35-
cd ../infer
42+
cd ./infer
3643
./build-infer.sh java
37-
sudo make install
44+
45+
- name: Add infer to PATH
46+
run: |
47+
cd ./infer
48+
export PATH=$(pwd)/infer/bin:$PATH
49+
50+
- name: Display infer version
51+
run: |
52+
which infer
53+
infer --version
3854
3955
- name: Run infer
4056
run: |

0 commit comments

Comments
 (0)