forked from BinaryAnalysisPlatform/bap
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (68 loc) · 2.08 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#uses omake to build and test on ubuntu only
name: build-and-test
on:
- pull_request
jobs:
build:
runs-on: ubuntu-18.04
env:
OPAMJOBS: 2
OPAMRETRES: 8
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.08.x
dune-cache: true
- name: Add the testing Repository
run: opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing
- name: Pin OASIS
run: opam pin add oasis https://github.com/BinaryAnalysisPlatform/oasis.git
- name: Install system dependencies
run: opam depext -u bap-extra
- name: Pin BAP
run: opam pin add bap . --no-action
- name: Install rest of the system dependencies
run: opam depext -u bap
- name: Install Ghidra
run: |
sudo add-apt-repository ppa:ivg/ghidra -y
sudo apt-get install libghidra-dev -y
sudo apt-get install libghidra-data -y
- name: Install opam dependencies
run: |
opam install bap --deps-only
opam install omake
- name: Configure BAP
run: |
opam exec -- ./configure-omake \
--enable-tests \
--with-llvm-version=9 \
--with-llvm-config=llvm-config-9
- name: Build BAP
run: opam exec -- make
- name: Install BAP
run: opam exec -- make reinstall
- name: Run Unit Tests
run: opam exec -- make 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: unit-tests-log
path: _build/oUnit-*.log
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: fun-tests-log
path: |
testsuite/*.log
testsuite/logs