-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switches to dune as the main build system but keeps support for OASIS with ocamlbuild and omake backends. The implementation utilizes the dune sites and plugins system, but it still supports plugins that are built with bapbuild. To ease the transition, the OASIS-built BAP is also able to load dune plugins. Later the OASIS build system will be removed from BAP but the support for bundled with bapbuild plugins will remain. Since dune sites impose their own restrictions we had to introduce a new bap-common package that manages all the sites, starting from plugins and ending with semantic files.
- Loading branch information
Showing
543 changed files
with
9,618 additions
and
2,864 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# tests all packages, including bap-extra | ||
# it requires ghidra, so it works only on ubuntu-20.04 | ||
name: full | ||
run-name: Testing everything in ${{ github.ref }} | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
BAP_LOG_DIR: $HOME/log | ||
OPAMRETRES: 8 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Ghidra and Dejagnu | ||
run: | | ||
sudo add-apt-repository ppa:ivg/ghidra -y | ||
sudo apt-get install libghidra-dev -y | ||
sudo apt-get install libghidra-data -y | ||
sudo apt-get install dejagnu -y | ||
- name: Install OCaml | ||
uses: ocaml/setup-ocaml@v2 | ||
with: | ||
ocaml-compiler: 4.14.x | ||
dune-cache: true | ||
opam-disable-sandboxing: true | ||
|
||
- name: Install BAP | ||
run: opam install . --with-test | ||
|
||
- name: Run Functional Tests | ||
run: opam exec -- make check | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: bap-log | ||
path: ~/.local/state/bap | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: fun-tests-log | ||
path: | | ||
testsuite/*.log | ||
testsuite/logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: main | ||
run-name: Testing main packages in ${{ github.ref }} | ||
on: | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-20.04 | ||
- macos-11 | ||
ocaml-compiler: | ||
- 4.08.x | ||
- 4.14.x | ||
|
||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.os == 'macos-11'}} | ||
|
||
env: | ||
TMPDIR: /tmp | ||
XDG_CACHE_HOME: /tmp/cache | ||
BAP_LOG_DIR: /tmp/bap-log | ||
OPAMJOBS: 2 | ||
OPAMRETRES: 8 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare Ubuntu | ||
if: matrix.os == 'ubuntu-20.04' | ||
run: | | ||
sudo apt-get install dejagnu -y | ||
- name: Prepare macOS | ||
if: matrix.os == 'macos-11' | ||
run: | | ||
echo 'LLVM_CONFIG=/usr/local/opt/llvm@9/bin/llvm-config' >> $GITHUB_ENV | ||
brew install deja-gnu | ||
- name: Install OCaml | ||
uses: ocaml/setup-ocaml@v2 | ||
with: | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
dune-cache: ${{ matrix.os != 'macos-11' }} | ||
opam-disable-sandboxing: true | ||
opam-local-packages: | | ||
*.opam | ||
!bap-extra.opam | ||
!bap-radare2.opam | ||
!bap-ghidra.opam | ||
!bap-primus-symbolic-executor.opam | ||
!bap-ida.opam | ||
opam-repositories: | | ||
default: git+https://github.com/ocaml/opam-repository.git | ||
bap: git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing | ||
- name: Build BAP | ||
run: opam install bap.dev --with-test | ||
|
||
- name: Run MC Functional Tests | ||
run: | | ||
opam exec -- make TOOLS=mc check | ||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: bap-log | ||
path: ~/.local/state/bap | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: unit-tests-log | ||
path: _build/default/lib_test/*/oUnit-*.log | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: fun-tests-log | ||
path: | | ||
testsuite/*.log | ||
testsuite/logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.