forked from JonathanSalwan/Triton
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (74 loc) · 2.58 KB
/
osx.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
name: Tests on OSX
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm
- name: Install dependencies
run: |
brew install boost
- name: Install Z3
run: |
brew install z3
sudo python -m pip install z3-solver
- name: Download and build GMP
run: |
wget https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz
tar xvf gmp-6.2.1.tar.xz
cd gmp-6.2.1/
./configure --with-pic
make
make check
- name: Download and build Bitwuzla
run: |
git clone https://github.com/bitwuzla/bitwuzla.git
cd bitwuzla
./contrib/setup-cadical.sh
./contrib/setup-btor2tools.sh
./contrib/setup-symfpu.sh
CMAKE_OPTS="-DCMAKE_POSITION_INDEPENDENT_CODE=ON" ./configure.sh --prefix $(pwd)/install
cd build
make
cd lib
libtool -static -o libbitwuzlam.a libbitwuzla.a ../../deps/install/lib/libbtor2parser.a ../../deps/cadical/build/libcadical.a ../../../gmp-6.2.1/.libs/libgmp.a
mv libbitwuzlam.a libbitwuzla.a
cd ..
make install
- name: Install Capstone
run: |
wget https://github.com/aquynh/capstone/archive/5.0-rc2.tar.gz
tar -xf ./5.0-rc2.tar.gz
cd ./capstone-5.0-rc2
bash ./make.sh
sudo make install
cd ../
- name: Install Unicorn
run: |
sudo python -m pip install unicorn
- name: Install LIEF
run: |
sudo python -m pip install lief
- name: Compile Triton
run: |
mkdir ./build
cd ./build
cmake ..
cmake -DZ3_INTERFACE=ON -DBITWUZLA_INTERFACE=ON -DBITWUZLA_INCLUDE_DIRS=${{ github.workspace }}/bitwuzla/install/include -DBITWUZLA_LIBRARIES=${{ github.workspace }}/bitwuzla/install/lib/libbitwuzla.a -DLLVM_INTERFACE=ON -DCMAKE_PREFIX_PATH=${{env.LLVM_PATH}} -DBOOST_INTERFACE=OFF ..
sudo make -j3 install
- name: Unittests
run: |
ctest --test-dir build --output-on-failure