Skip to content

Commit 5a63b99

Browse files
committed
moves ghidra installation into an action
1 parent d5e19d9 commit 5a63b99

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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

.github/workflows/nightly.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,16 @@ jobs:
2929
repository: BinaryAnalysisPlatform/bap
3030
path: bap
3131

32+
- name: Install Ghidra
33+
uses: ./bap/.github/actions/install-ghidra
34+
with:
35+
path: bap
36+
3237
- name: Install Extra System Dependencies
3338
run: |
3439
sudo apt-get update -y
3540
sudo apt-get install dejagnu -y
3641
37-
- name: Cache Ghidra
38-
id: cache-ghidra
39-
uses: actions/cache@v4
40-
with:
41-
path: |
42-
/usr/share/ghidra
43-
/usr/lib/ghidra
44-
/usr/include/ghidra
45-
key: ${{ runner.os }}-ghidra-${{ hashFiles('bap/tools/install-ghidra.sh') }}
46-
47-
- name: Build and Install Ghidra
48-
if: steps.cache-ghidra.outputs.cache-hit != 'true'
49-
run: sudo sh ./bap/tools/install-ghidra.sh
50-
5142
- name: Use OCaml ${{ matrix.ocaml-compiler }}
5243
uses: ocaml/setup-ocaml@v3
5344
with:

0 commit comments

Comments
 (0)