File tree Expand file tree Collapse file tree 6 files changed +47
-53
lines changed Expand file tree Collapse file tree 6 files changed +47
-53
lines changed Original file line number Diff line number Diff line change
1
+ name : " Installs Ghidra"
2
+ description : " Installs ghidra libraries and data into the /usr prefix"
3
+ inputs :
4
+ path :
5
+ description : " A path to the bap repository root"
6
+ default : ${{ github.workspace }}
7
+
8
+ runs :
9
+ using : composite
10
+ steps :
11
+ - name : Cache Ghidra
12
+ id : cache-ghidra
13
+ uses : actions/cache@v4
14
+ with :
15
+ path : ghidra
16
+ key : ${{ runner.os }}-ghidra-${{ hashFiles(format('{0}/tools/install-ghidra.sh', inputs.path)) }}
17
+
18
+ - name : Build Ghidra
19
+ if : steps.cache-ghidra.outputs.cache-hit != 'true'
20
+ run : sudo sh ${{inputs.path}}/tools/install-ghidra.sh ghidra
21
+ shell : bash
22
+
23
+ - name : Install Ghidra
24
+ run : sudo cp -r ghidra/* /usr/
25
+ shell : bash
Original file line number Diff line number Diff line change 1
1
# tests all packages, including bap-extra
2
- # it requires ghidra, so it works only on ubuntu-latest
3
2
name : full
4
3
run-name : Testing everything in ${{ github.ref }}
5
4
@@ -17,22 +16,14 @@ jobs:
17
16
- name : Checkout code
18
17
uses : actions/checkout@v3
19
18
19
+ - name : Install Ghidra
20
+ uses : ./.github/actions/install-ghidra
21
+
20
22
- name : Install Dejagnu
21
23
run : |
22
24
sudo apt-get update -y
23
25
sudo apt-get install dejagnu -y
24
26
25
- - name : Cache Ghidra
26
- id : cache-ghidra
27
- uses : actions/cache@v4
28
- with :
29
- path : /usr/share/ghidra
30
- key : ${{ runner.os }}-ghidra
31
-
32
- - name : Build and Install Ghidra
33
- if : steps.cache-ghidras.outputs.cache-hit != 'true'
34
- run : sudo sh ./tools/install-ghidra.sh
35
-
36
27
- name : Install OCaml
37
28
uses : ocaml/setup-ocaml@v3
38
29
with :
Original file line number Diff line number Diff line change @@ -23,22 +23,22 @@ jobs:
23
23
OPAMRETRES : 8
24
24
25
25
steps :
26
+ - name : Checkout the Tests
27
+ uses : actions/checkout@v4
28
+ with :
29
+ repository : BinaryAnalysisPlatform/bap
30
+ path : bap
31
+
32
+ - name : Install Ghidra
33
+ uses : ./bap/.github/actions/install-ghidra
34
+ with :
35
+ path : ./bap
36
+
26
37
- name : Install Extra System Dependencies
27
38
run : |
28
39
sudo apt-get update -y
29
40
sudo apt-get install dejagnu -y
30
41
31
- - name : Cache Ghidra
32
- id : cache-ghidra
33
- uses : actions/cache@v4
34
- with :
35
- path : /usr/share/ghidra
36
- key : ${{ runner.os }}-ghidra
37
-
38
- - name : Build and Install Ghidra
39
- if : steps.cache-ghidras.outputs.cache-hit != 'true'
40
- run : sudo sh ./tools/install-ghidra.sh
41
-
42
42
- name : Use OCaml ${{ matrix.ocaml-compiler }}
43
43
uses : ocaml/setup-ocaml@v3
44
44
with :
51
51
bap: git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing
52
52
53
53
- name : Build and Install BAP
54
- run : opam install bap-extra bap-radare2
55
-
56
- - name : Checkout the Tests
57
- uses : actions/checkout@v4
58
- with :
59
- repository : BinaryAnalysisPlatform/bap
60
- path : bap
54
+ run : opam install bap.master bap-extra.master bap-radare2.master
61
55
62
56
- name : Run Functional Tests
63
57
run : opam exec -- make -C bap check
Original file line number Diff line number Diff line change @@ -21,22 +21,14 @@ jobs:
21
21
- name : Checkout code
22
22
uses : actions/checkout@v4
23
23
24
+ - name : Install Ghidra
25
+ uses : .github/actions/install-ghidra
26
+
24
27
- name : Install Dejagnu
25
28
run : |
26
29
sudo apt-get update -y
27
30
sudo apt-get install dejagnu -y
28
31
29
- - name : Cache Ghidra
30
- id : cache-ghidra
31
- uses : actions/cache@v4
32
- with :
33
- path : /usr/share/ghidra
34
- key : ${{ runner.os }}-ghidra
35
-
36
- - name : Build and Install Ghidra
37
- if : steps.cache-ghidras.outputs.cache-hit != 'true'
38
- run : sudo sh ./tools/install-ghidra.sh
39
-
40
32
- name : Install OCaml ${{ matrix.ocaml-compiler }}
41
33
uses : ocaml/setup-ocaml@v3
42
34
with :
Original file line number Diff line number Diff line change @@ -18,23 +18,15 @@ jobs:
18
18
- name : Checkout code
19
19
uses : actions/checkout@v4
20
20
21
+ - name : Install Ghidra
22
+ uses : .github/actions/install-ghidra
23
+
21
24
- name : Install OCaml
22
25
uses : ocaml/setup-ocaml@v3
23
26
with :
24
27
ocaml-compiler : ocaml-variants.4.14.2+flambda
25
28
dune-cache : true
26
29
27
- - name : Cache Ghidra
28
- id : cache-ghidra
29
- uses : actions/cache@v4
30
- with :
31
- path : /usr/share/ghidra
32
- key : ${{ runner.os }}-ghidra
33
-
34
- - name : Build and Install Ghidra
35
- if : steps.cache-ghidras.outputs.cache-hit != 'true'
36
- run : sudo sh ./tools/install-ghidra.sh
37
-
38
30
- name : Add the testing Repository
39
31
run : opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing
40
32
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ set -x \
20
20
&& cd ${BUILDDIR} \
21
21
&& curl -sS -L -o ${GHIDRA_TARBALL} ${GHIDRA_SRC_URL} \
22
22
&& echo " ${GHIDRA_SHA256} ${GHIDRA_TARBALL} " | sha256sum --check \
23
- && tar xzvf ${GHIDRA_TARBALL} \
23
+ && tar xzf ${GHIDRA_TARBALL} \
24
24
&& rm ${LIBGHIDRA_PATH} /* bfd* .* ${LIBGHIDRA_PATH} /codedata.* \
25
25
&& make -j -C ${LIBGHIDRA_PATH} OPT_CXXFLAGS=" ${LIBGHIDRA_FLAGS} " libdecomp.a libsla.a \
26
26
&& make -j -C ${LIBGHIDRA_PATH} sleigh_opt \
You can’t perform that action at this time.
0 commit comments