mirror of
https://github.com/JonathanSalwan/Triton
synced 2026-08-17 10:23:04 -04:00
Add CI action for installing Triton deps on macOS
This commit is contained in:
parent
8e91799dc1
commit
02f75c6c77
1 changed files with 84 additions and 0 deletions
84
.github/actions/install-triton-deps/macos/action.yml
vendored
Normal file
84
.github/actions/install-triton-deps/macos/action.yml
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
name: Install Triton dependencies (macOS)
|
||||
|
||||
description: Installs all dependencies required to build and test Triton on macOS
|
||||
|
||||
inputs:
|
||||
python-version:
|
||||
description: Python version to use
|
||||
default: '3.11'
|
||||
llvm-version:
|
||||
description: LLVM version to install
|
||||
default: '17'
|
||||
bitwuzla-version:
|
||||
description: Bitwuzla version to install
|
||||
default: '0.9.0'
|
||||
capstone-version:
|
||||
description: Capstone version to install
|
||||
default: '5.0.7'
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
|
||||
- name: Upgrade pip
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
shell: bash
|
||||
|
||||
- name: Fix Homebrew git installation
|
||||
run: |
|
||||
brew update
|
||||
brew reinstall git
|
||||
shell: bash
|
||||
|
||||
- name: Install Python build dependencies
|
||||
run: |
|
||||
python -m pip install setuptools importlib-resources build meson
|
||||
shell: bash
|
||||
|
||||
- name: Install LLVM
|
||||
uses: KyleMayes/install-llvm-action@v2
|
||||
with:
|
||||
version: ${{ inputs.llvm-version }}
|
||||
directory: ${{ runner.temp }}/llvm
|
||||
|
||||
- name: Install z3
|
||||
run: |
|
||||
wget -q https://github.com/Z3Prover/z3/releases/download/z3-4.16.0/z3-4.16.0-arm64-osx-15.7.3.zip
|
||||
unzip -q z3-4.16.0-arm64-osx-15.7.3.zip
|
||||
echo "Z3_INCLUDE_DIRS=$GITHUB_WORKSPACE/z3-4.16.0-arm64-osx-15.7.3/include" >> $GITHUB_ENV
|
||||
echo "Z3_LIBRARIES=$GITHUB_WORKSPACE/z3-4.16.0-arm64-osx-15.7.3/bin/libz3.a" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Install Bitwuzla
|
||||
run: |
|
||||
wget -q https://github.com/bitwuzla/bitwuzla/archive/refs/tags/${{ inputs.bitwuzla-version }}.tar.gz
|
||||
tar -xf ${{ inputs.bitwuzla-version }}.tar.gz
|
||||
cd bitwuzla-${{ inputs.bitwuzla-version }}
|
||||
python ./configure.py --shared --prefix $(pwd)/install
|
||||
cd build
|
||||
ninja install
|
||||
find . -name "libcadical*.dylib" -exec cp {} ../install/lib/ \;
|
||||
cd ..
|
||||
echo "BITWUZLA_INCLUDE_DIRS=$GITHUB_WORKSPACE/bitwuzla-${{ inputs.bitwuzla-version }}/install/include" >> $GITHUB_ENV
|
||||
echo "BITWUZLA_LIBRARIES=$GITHUB_WORKSPACE/bitwuzla-${{ inputs.bitwuzla-version }}/install/lib/libbitwuzla.dylib" >> $GITHUB_ENV
|
||||
echo "DYLD_LIBRARY_PATH=$GITHUB_WORKSPACE/bitwuzla-${{ inputs.bitwuzla-version }}/install/lib:/opt/homebrew/lib:/usr/local/lib" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Install Capstone
|
||||
run: |
|
||||
wget -q https://github.com/capstone-engine/capstone/releases/download/5.0.7/capstone-${{ inputs.capstone-version }}.tar.xz
|
||||
tar -xf capstone-${{ inputs.capstone-version }}.tar.xz
|
||||
cd capstone-${{ inputs.capstone-version }}
|
||||
bash ./make.sh
|
||||
sudo make install
|
||||
shell: bash
|
||||
|
||||
- name: Install Unicorn and LIEF
|
||||
run: |
|
||||
python -m pip install unicorn lief
|
||||
shell: bash
|
||||
Loading…
Add table
Add a link
Reference in a new issue