diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 094f920f0..78a63f658 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -15,11 +15,18 @@ jobs: - name: Create Docker image run: bash ./src/scripts/docker/build-docker-image.sh + - name: Install LLVM and Clang + uses: KyleMayes/install-llvm-action@v1 + with: + version: "14.0" + directory: ${{ runner.temp }}/llvm + - name: Build Wheel packages run: | - docker run \ + docker run \ --rm \ --volume $GITHUB_WORKSPACE:/src \ + --volume ${{env.LLVM_PATH}}:/llvm \ build-triton-linux-x86_64 bash /src/src/scripts/docker/build-wheel-linux.sh - name: Upload Wheel packages (Python 3.8) @@ -193,23 +200,23 @@ jobs: - name: Download Z3 run: | - wget -q https://github.com/Z3Prover/z3/releases/download/z3-4.8.17/z3-4.8.17-x64-osx-10.16.zip - unzip z3-4.8.17-x64-osx-10.16.zip + wget -q https://github.com/Z3Prover/z3/releases/download/z3-4.12.2/z3-4.12.2-x64-osx-10.16.zip -O z3-4.12.2-x64-osx-10.16.zip + unzip z3-4.12.2-x64-osx-10.16.zip - name: Install Capstone run: | - wget -q https://github.com/aquynh/capstone/archive/4.0.2.tar.gz - tar -xf ./4.0.2.tar.gz - cd capstone-4.0.2 - bash ./make.sh + wget -q https://github.com/capstone-engine/capstone/archive/refs/tags/5.0.1.tar.gz -O capstone-5.0.1.tar.gz && \ + tar xf capstone-5.0.1.tar.gz && \ + cd ./capstone-5.0.1 && \ + ./make.sh && \ sudo make install - name: Build Triton Python package run: python -m build --wheel --outdir wheelhouse/default_x86_64 env: Z3_INTERFACE: On - Z3_INCLUDE_DIRS: ${{ github.workspace }}/z3-4.8.17-x64-osx-10.16/include - Z3_LIBRARIES: ${{ github.workspace }}/z3-4.8.17-x64-osx-10.16/bin/libz3.a + Z3_INCLUDE_DIRS: ${{ github.workspace }}/z3-4.12.2-x64-osx-10.16/include + Z3_LIBRARIES: ${{ github.workspace }}/z3-4.12.2-x64-osx-10.16/bin/libz3.a BITWUZLA_INTERFACE: On BITWUZLA_INCLUDE_DIRS: ${{ github.workspace }}/bitwuzla/install/include BITWUZLA_LIBRARIES: ${{ github.workspace }}/bitwuzla/install/lib/libbitwuzla.dylib diff --git a/src/scripts/docker/Dockerfile b/src/scripts/docker/Dockerfile index 430386601..9a40908b8 100644 --- a/src/scripts/docker/Dockerfile +++ b/src/scripts/docker/Dockerfile @@ -11,6 +11,12 @@ RUN yum install -y \ sudo \ wget +# LLVM dependencies. +RUN yum install -y \ + libxml2-devel \ + libzstd-devel \ + ncurses-devel + RUN python3.10 -m pip install meson ENV DEPENDENCIES_DIR=/tmp/triton-dependencies diff --git a/src/scripts/docker/build-wheel-linux.sh b/src/scripts/docker/build-wheel-linux.sh index 349bb6a7d..fab3e7794 100755 --- a/src/scripts/docker/build-wheel-linux.sh +++ b/src/scripts/docker/build-wheel-linux.sh @@ -19,6 +19,7 @@ set -e # set -x # Debugging DEPENDENCIES_DIR=/tmp/triton-dependencies +LLVM_DIR=/llvm SOURCE_DIR=/src WHEEL_DIR=$SOURCE_DIR/wheelhouse @@ -32,7 +33,7 @@ export BITWUZLA_INTERFACE=On export BITWUZLA_INCLUDE_DIRS=$DEPENDENCIES_DIR/bitwuzla/install/include export BITWUZLA_LIBRARIES=$DEPENDENCIES_DIR/bitwuzla/install/lib64/libbitwuzla.so export LLVM_INTERFACE=ON -export CMAKE_PREFIX_PATH=$($DEPENDENCIES_DIR/clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-/bin/llvm-config --prefix) +export CMAKE_PREFIX_PATH=$LLVM_DIR # Build Triton Python wheel package for Python 3.8. echo "[+] Build Triton wheel package for Python 3.8"