File tree 1 file changed +54
-5
lines changed
1 file changed +54
-5
lines changed Original file line number Diff line number Diff line change 1
- ---
2
1
name : Infer
3
2
4
3
' on ' :
5
4
workflow_dispatch :
6
- push :
5
+ push :
7
6
branches :
8
7
- master
9
8
pull_request :
25
24
with :
26
25
ocaml-compiler : 5
27
26
28
- - name : Get current year/weak
27
+ - name : Get current year/week
29
28
run : echo "year_week=$(date +'%Y_%U')" >> $GITHUB_ENV
30
29
31
30
- name : Cache infer build
56
55
- name : Run infer
57
56
run : |
58
57
mvn clean
59
- infer --fail-on-issue --print-logs --no-progress-bar -- mvn test
60
- ...
58
+ infer --fail-on-issue --print-logs --no-progress-bar -- mvn test
59
+
60
+ pr_infer :
61
+ runs-on : ubuntu-latest
62
+ if : github.event_name == 'pull_request'
63
+ needs : run_infer # This ensures the 'run_infer' job completes before 'pr_infer' starts
64
+ steps :
65
+ - uses : actions/checkout@v4
66
+
67
+ - name : Set up JDK
68
+ uses : actions/setup-java@v4
69
+ with :
70
+ java-version : 21
71
+ distribution : ' temurin'
72
+
73
+ - name : Set up OCaml
74
+ uses : ocaml/setup-ocaml@v3
75
+ with :
76
+ ocaml-compiler : 5
77
+
78
+ - name : Get current year/week
79
+ run : echo "year_week=$(date +'%Y_%U')" >> $GITHUB_ENV
80
+
81
+ - name : Cache infer build
82
+ id : cache-infer
83
+ uses : actions/cache@v4
84
+ with :
85
+ path : infer
86
+ key : ${{ runner.os }}-infer-${{ env.year_week }}
87
+
88
+ - name : Build infer
89
+ if : steps.cache-infer.outputs.cache-hit != 'true'
90
+ run : |
91
+ cd ..
92
+ git clone https://github.com/facebook/infer.git
93
+ cd infer
94
+ ./build-infer.sh java
95
+ cp -r infer ../Java
96
+
97
+ - name : Add infer to PATH
98
+ run : |
99
+ echo "infer/bin" >> $GITHUB_PATH
100
+
101
+ - name : Display infer version
102
+ run : |
103
+ which infer
104
+ infer --version
105
+
106
+ - name : Run infer
107
+ run : |
108
+ mvn clean
109
+ infer --fail-on-issue --print-logs --no-progress-bar -- mvn test
You can’t perform that action at this time.
0 commit comments