mirror of
https://github.com/JonathanSalwan/Triton
synced 2026-08-17 10:23:04 -04:00
87 lines
2.5 KiB
YAML
87 lines
2.5 KiB
YAML
name: Tests on Linux
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
|
boost-interface: ['ON', 'OFF']
|
|
capstone-version: ['5.0.3']
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Upgrade pip version
|
|
run: |
|
|
python -m pip install -U pip
|
|
python -m pip install setuptools
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get install python3-setuptools libboost-dev libgmp-dev libmpfr-dev
|
|
|
|
- name: Install LLVM and Clang
|
|
uses: KyleMayes/install-llvm-action@v2
|
|
with:
|
|
version: "14.0"
|
|
directory: ${{ runner.temp }}/llvm
|
|
|
|
- name: Install Z3
|
|
run: |
|
|
sudo apt-get install libz3-dev
|
|
python -m pip install z3-solver
|
|
python -m pip install importlib-resources
|
|
|
|
- name: Install Ninja
|
|
run: |
|
|
sudo apt-get install ninja-build
|
|
|
|
- name: Install Meson
|
|
run: |
|
|
python -m pip install meson
|
|
|
|
- name: Install Bitwuzla
|
|
run: |
|
|
git clone https://github.com/bitwuzla/bitwuzla.git
|
|
cd bitwuzla
|
|
python ./configure.py --shared
|
|
cd build
|
|
sudo ninja install
|
|
sudo ldconfig
|
|
cd ..
|
|
|
|
- name: Install Capstone
|
|
run: |
|
|
wget https://github.com/aquynh/capstone/archive/${{ matrix.capstone-version }}.tar.gz
|
|
tar -xf ./${{ matrix.capstone-version }}.tar.gz
|
|
cd ./capstone-${{ matrix.capstone-version }}
|
|
bash ./make.sh
|
|
sudo make install
|
|
cd ../
|
|
|
|
- name: Install Unicorn
|
|
run: |
|
|
python -m pip install unicorn
|
|
|
|
- name: Install LIEF
|
|
run: |
|
|
python -m pip install lief
|
|
|
|
- name: Compile Triton
|
|
run: |
|
|
mkdir ./build
|
|
cd ./build
|
|
cmake -DZ3_INTERFACE=ON -DBITWUZLA_INTERFACE=ON -DBITWUZLA_INCLUDE_DIRS=/usr/local/include -DBITWUZLA_LIBRARIES=/usr/local/lib/x86_64-linux-gnu/libbitwuzla.so -DLLVM_INTERFACE=ON -DCMAKE_PREFIX_PATH=${{env.LLVM_PATH}} -DBOOST_INTERFACE=${{ matrix.boost-interface }} ..
|
|
sudo make -j3 install
|
|
|
|
- name: Unittests
|
|
run: |
|
|
ctest --test-dir build --output-on-failure
|