Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cnheitman committed Dec 17, 2024
1 parent ad6b978 commit 8bcb808
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: |
git clone https://github.com/bitwuzla/bitwuzla.git
cd bitwuzla
git checkout -b 0.4.0 0.4.0
git checkout -b 0.7.0 0.7.0
python ./configure.py --shared
cd build
sudo ninja install
Expand All @@ -58,9 +58,9 @@ jobs:
- name: Install Capstone
run: |
wget https://github.com/aquynh/capstone/archive/5.0.1.tar.gz
tar -xf ./5.0.1.tar.gz
cd ./capstone-5.0.1
wget https://github.com/aquynh/capstone/archive/5.0.3.tar.gz
tar -xf ./5.0.3.tar.gz
cd ./capstone-5.0.3
bash ./make.sh
sudo make install
cd ../
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
boost-interface: ['ON', 'OFF']
capstone-version: ['5.0.1']
capstone-version: ['5.0.3']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
run: |
git clone https://github.com/bitwuzla/bitwuzla.git
cd bitwuzla
git checkout -b 0.4.0 0.4.0
git checkout -b 0.7.0 0.7.0
python ./configure.py --shared
cd build
sudo ninja install
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ jobs:

- name: Download and build Capstone
run: |
wget -UseBasicParsing https://github.com/capstone-engine/capstone/archive/refs/tags/5.0.1.zip -O capstone-5.0.1.zip
tar -xf capstone-5.0.1.zip
mkdir -p capstone-5.0.1/build
cd capstone-5.0.1/build
wget -UseBasicParsing https://github.com/capstone-engine/capstone/archive/refs/tags/5.0.3.zip -O capstone-5.0.3.zip
tar -xf capstone-5.0.3.zip
mkdir -p capstone-5.0.3/build
cd capstone-5.0.3/build
../nmake.bat
shell: powershell

Expand All @@ -143,8 +143,8 @@ jobs:
PYTHON_LIBRARY: ${{ env.pythonLocation }}\libs\${{ matrix.pylib }}
Z3_INCLUDE_DIRS: ${{ github.workspace }}\z3-4.12.2-x64-win\include
Z3_LIBRARIES: ${{ github.workspace }}\z3-4.12.2-x64-win\bin\libz3.lib
CAPSTONE_INCLUDE_DIRS: ${{ github.workspace }}\capstone-5.0.1\include
CAPSTONE_LIBRARIES: ${{ github.workspace }}\capstone-5.0.1\build\capstone.lib
CAPSTONE_INCLUDE_DIRS: ${{ github.workspace }}\capstone-5.0.3\include
CAPSTONE_LIBRARIES: ${{ github.workspace }}\capstone-5.0.3\build\capstone.lib

- name: Repair wheel package
run: |
Expand Down
18 changes: 4 additions & 14 deletions src/scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,12 @@ ENV SOURCE_DIR=/src
# Create directory for dependencies.
RUN mkdir -p $DEPENDENCIES_DIR

# Download, build and install GMP.
RUN echo "[+] Download, build and install GMP" && \
cd $DEPENDENCIES_DIR && \
wget -q https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz -O gmp-6.3.0.tar.xz && \
tar -xf gmp-6.3.0.tar.xz && \
cd gmp-6.3.0 && \
./configure --enable-cxx && \
make -j $(nproc) && \
make install

# Download, build and install Bitwuzla.
RUN echo "[+] Download, build and install Bitwuzla" && \
cd $DEPENDENCIES_DIR && \
git clone https://github.com/bitwuzla/bitwuzla.git && \
cd bitwuzla && \
git checkout -b 0.4.0 0.4.0 && \
git checkout -b 0.7.0 0.7.0 && \
export PY310_PATH=$(python3.10 -c 'import sys, os; print(os.path.dirname(sys.executable))') && \
CC=clang CXX=clang++ PATH=$PATH:$PY310_PATH python3.10 ./configure.py --shared --prefix $(pwd)/install && \
cd build && \
Expand All @@ -55,8 +45,8 @@ RUN echo "[+] Download Z3" && \
# Download, build and install Capstone.
RUN echo "[+] Download, build and install Capstone" && \
cd $DEPENDENCIES_DIR && \
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 && \
wget -q https://github.com/capstone-engine/capstone/archive/refs/tags/5.0.3.tar.gz -O capstone-5.0.3.tar.gz && \
tar xf capstone-5.0.3.tar.gz && \
cd ./capstone-5.0.3 && \
CAPSTONE_ARCHS="arm aarch64 riscv x86" ./make.sh && \
sudo make install
14 changes: 13 additions & 1 deletion src/scripts/docker/build-wheel-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# $ docker pull quay.io/pypa/manylinux_2_28_x86_64
# $ ./src/scripts/docker/build-docker-image.sh
# $ cd /tmp
# $ wget https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
# $ wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
# $ tar xf clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
# $ cd -
# $ docker run \
Expand Down Expand Up @@ -42,6 +42,8 @@ export CMAKE_PREFIX_PATH=$LLVM_DIR
# Build Triton Python wheel package for Python 3.8.
echo "[+] Build Triton wheel package for Python 3.8"
cd $SOURCE_DIR
rm -rf $SOURCE_DIR/build
rm -rf $SOURCE_DIR/triton_library.egg-info
export PYTHON_BINARY=/opt/_internal/cpython-3.8.*/bin/python
export PYTHON_INCLUDE_DIRS=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
export PYTHON_LIBRARY=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
Expand All @@ -51,6 +53,8 @@ $PYTHON_BINARY -m build --wheel --outdir $WHEEL_DIR/linux_x86_64
# Build Triton Python wheel package for Python 3.9.
echo "[+] Build Triton wheel package for Python 3.9"
cd $SOURCE_DIR
rm -rf $SOURCE_DIR/build
rm -rf $SOURCE_DIR/triton_library.egg-info
export PYTHON_BINARY=/opt/_internal/cpython-3.9.*/bin/python
export PYTHON_INCLUDE_DIRS=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
export PYTHON_LIBRARY=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
Expand All @@ -60,6 +64,8 @@ $PYTHON_BINARY -m build --wheel --outdir $WHEEL_DIR/linux_x86_64
# Build Triton Python wheel package for Python 3.10.
echo "[+] Build Triton wheel package for Python 3.10"
cd $SOURCE_DIR
rm -rf $SOURCE_DIR/build
rm -rf $SOURCE_DIR/triton_library.egg-info
export PYTHON_BINARY=/opt/_internal/cpython-3.10.*/bin/python
export PYTHON_INCLUDE_DIRS=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
export PYTHON_LIBRARY=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
Expand All @@ -69,6 +75,8 @@ $PYTHON_BINARY -m build --wheel --outdir $WHEEL_DIR/linux_x86_64
# Build Triton Python wheel package for Python 3.11.
echo "[+] Build Triton wheel package for Python 3.11"
cd $SOURCE_DIR
rm -rf $SOURCE_DIR/build
rm -rf $SOURCE_DIR/triton_library.egg-info
export PYTHON_BINARY=/opt/_internal/cpython-3.11.*/bin/python
export PYTHON_INCLUDE_DIRS=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
export PYTHON_LIBRARY=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
Expand All @@ -78,6 +86,8 @@ $PYTHON_BINARY -m build --wheel --outdir $WHEEL_DIR/linux_x86_64
# Build Triton Python wheel package for Python 3.12.
echo "[+] Build Triton wheel package for Python 3.12"
cd $SOURCE_DIR
rm -rf $SOURCE_DIR/build
rm -rf $SOURCE_DIR/triton_library.egg-info
export PYTHON_BINARY=/opt/_internal/cpython-3.12.*/bin/python
export PYTHON_INCLUDE_DIRS=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
export PYTHON_LIBRARY=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
Expand All @@ -87,6 +97,8 @@ $PYTHON_BINARY -m build --wheel --outdir $WHEEL_DIR/linux_x86_64
# Build Triton Python wheel package for Python 3.13.
echo "[+] Build Triton wheel package for Python 3.13"
cd $SOURCE_DIR
rm -rf $SOURCE_DIR/build
rm -rf $SOURCE_DIR/triton_library.egg-info
export PYTHON_BINARY=/opt/_internal/cpython-3.13.1/bin/python
export PYTHON_INCLUDE_DIRS=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
export PYTHON_LIBRARY=$($PYTHON_BINARY -c "from sysconfig import get_paths; print(get_paths()['include'])")
Expand Down

0 comments on commit 8bcb808

Please sign in to comment.