Skip to content

Commit 0e20c8e

Browse files
authored
fixes installation from opam (#1571)
When bap installed from the testing repository it fails on frontends due to a missing dependency ``` Bap_plugins_loader_backend referenced from /home/runner/work/bap/bap/_opam/lib/bap-plugins/bap_plugins.cmxa(Bap_common) ``` Also improves the opam workflow and adds functional checks.
1 parent 4b40208 commit 0e20c8e

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

.github/workflows/opam.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,39 @@ jobs:
1111
- 4.11.x
1212
- 4.08.x
1313

14-
runs-on: ubuntu-18.04
14+
runs-on: ubuntu-20.04
1515

1616
env:
1717
OPAMJOBS: 2
1818
OPAMRETRES: 8
1919

2020
steps:
21-
- name: Use OCaml ${{ matrix.ocaml-compiler }}
22-
uses: ocaml/setup-ocaml@v2
23-
with:
24-
ocaml-compiler: ${{ matrix.ocaml-compiler }}
25-
dune-cache: true
21+
- name: Checkout code
22+
uses: actions/checkout@v2
2623

27-
- name: Install Ghidra
24+
- name: Install Ghidra and Dejagnu
2825
run: |
2926
sudo add-apt-repository ppa:ivg/ghidra -y
27+
sudo apt-get update -y
3028
sudo apt-get install libghidra-dev -y
3129
sudo apt-get install libghidra-data -y
30+
sudo apt-get install dejagnu -y
3231
33-
- name: Add the testing Repository
34-
run: opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing
35-
36-
- name: Install system dependencies
37-
run: opam depext -u bap-extra
38-
39-
- name: Cleanup the Caches
40-
run: sudo apt clean --yes
32+
- name: Install OCaml ${{ matrix.ocaml-compiler }}
33+
uses: ocaml/setup-ocaml@v2
34+
with:
35+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
36+
dune-cache: true
37+
opam-disable-sandboxing: true
38+
opam-repositories: |
39+
default: git+https://github.com/ocaml/opam-repository.git
40+
bap: git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing
4141
42-
- name: Check the Space
43-
run: df -h
42+
- name: Install bap-extra
43+
run: opam install bap-extra
4444

45-
- name: Build and Install BAP Packages
46-
run: opam clean -a; opam install bap-extra
45+
- name: Run functional tests
46+
run: opam exec -- make check
4747

4848
- uses: actions/upload-artifact@v2
4949
if: ${{ always() }}

oasis/plugins

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Library bap_plugins
1010
InternalModules: Bap_plugins_config,
1111
Bap_plugins_units,
1212
Bap_plugins_units_intf,
13-
Bap_common
13+
Bap_common,
14+
Bap_plugins_loader_backend
1415
BuildDepends: core_kernel, dynlink, fileutils, findlib, bap-bundle, bap-future,
1516
uri, ppx_bap

0 commit comments

Comments
 (0)