From e9c72de4385affcd03d517dae2b1bddbf1688314 Mon Sep 17 00:00:00 2001 From: Selim Sandal <49725809+selimsandal@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:51:58 +0300 Subject: [PATCH 1/5] Fix build error on macos --- CMakeModules/FindBITWUZLA.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeModules/FindBITWUZLA.cmake b/CMakeModules/FindBITWUZLA.cmake index 518ea4708..e3784d966 100644 --- a/CMakeModules/FindBITWUZLA.cmake +++ b/CMakeModules/FindBITWUZLA.cmake @@ -23,7 +23,7 @@ endif() if(NOT BITWUZLA_INCLUDE_DIRS AND NOT BITWUZLA_LIBRARIES) find_path(BITWUZLA_INCLUDE_DIR - NAMES bitwuzla/bitwuzla.h + NAMES bitwuzla/bitwuzla.h bitwuzla/cpp/bitwuzla.h PATHS ${BITWUZLA_PKGCONF_INCLUDE_DIRS} ) From ade1773a67a3cb9e3b61d5a692de49ced629adbe Mon Sep 17 00:00:00 2001 From: Christian Heitman Date: Mon, 15 Jul 2024 16:59:31 -0300 Subject: [PATCH 2/5] Update Python workflow --- .github/workflows/python.yml | 12 +++++++++++- src/scripts/docker/Dockerfile | 4 ++-- src/scripts/docker/build-wheel-linux.sh | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 5354db03f..21172d910 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -62,7 +62,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] include: - python-version: 3.8 pycp: cp38-cp38 @@ -76,6 +76,12 @@ jobs: - python-version: 3.11 pycp: cp311-cp311 pylib: python311.lib + - python-version: 3.12 + pycp: cp312-cp312 + pylib: python312.lib + - python-version: 3.13 + pycp: cp313-cp313 + pylib: python313.lib steps: - name: Checkout uses: actions/checkout@v3 @@ -155,6 +161,10 @@ jobs: pycp: cp39-cp39 - python-version: 3.10 pycp: cp310-cp310 + # - python-version: 3.11 + # pycp: cp311-cp311 + # - python-version: 3.12 + # pycp: cp312-cp312 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/src/scripts/docker/Dockerfile b/src/scripts/docker/Dockerfile index cf08bac3b..bae7bd2a1 100644 --- a/src/scripts/docker/Dockerfile +++ b/src/scripts/docker/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMG +ARG BASE_IMG=quay.io/pypa/manylinux_2_28_x86_64 FROM $BASE_IMG @@ -41,7 +41,7 @@ RUN echo "[+] Download, build and install Bitwuzla" && \ git clone https://github.com/bitwuzla/bitwuzla.git && \ cd bitwuzla && \ git checkout -b 0.4.0 0.4.0 && \ - export PY310_PATH=$(dirname $(realpath -L $(which python3.10))) && \ + 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 && \ PATH=$PATH:$PY310_PATH ninja -j $(nproc) install diff --git a/src/scripts/docker/build-wheel-linux.sh b/src/scripts/docker/build-wheel-linux.sh index fab3e7794..72879e714 100755 --- a/src/scripts/docker/build-wheel-linux.sh +++ b/src/scripts/docker/build-wheel-linux.sh @@ -71,6 +71,24 @@ export PYTHON_LIBRARY=$($PYTHON_BINARY -c "from sysconfig import get_paths; prin $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 +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'])") + +$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 +export PYTHON_BINARY=/opt/_internal/cpython-3.13.0/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'])") + +$PYTHON_BINARY -m build --wheel --outdir $WHEEL_DIR/linux_x86_64 + # Repair wheels. echo "[+] Repair wheel packages" cd $SOURCE_DIR From 3dbe302679ce6df50d7c6df45a0a8fd34acf5d27 Mon Sep 17 00:00:00 2001 From: Christian Heitman Date: Tue, 15 Oct 2024 14:36:46 -0300 Subject: [PATCH 3/5] Fix Linux workflow --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 523b711af..aaa4e0935 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get install python-setuptools libboost-dev libgmp-dev + sudo apt-get install python3-setuptools libboost-dev libgmp-dev - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v1 From 8cfdc16d08ca73ac436cf4aae6574c1257201df5 Mon Sep 17 00:00:00 2001 From: Christian Heitman Date: Tue, 15 Oct 2024 15:39:37 -0300 Subject: [PATCH 4/5] Fix CodeCov workflow --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index d329f91d6..b9cea758a 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get install python-setuptools lcov libboost-dev libgmp-dev + sudo apt-get install python3-setuptools lcov libboost-dev libgmp-dev - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v1 From 80168f68955bb2d2f4c22e62cf1b9a07fa9979ad Mon Sep 17 00:00:00 2001 From: Christian Heitman Date: Wed, 16 Oct 2024 14:07:08 -0300 Subject: [PATCH 5/5] Fix CodeCov workflow --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b553fa44..c4625c5cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,7 +128,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND GCOV) COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target test-python COMMAND ctest --output-on-failure COMMAND lcov --no-checksum --directory $ --capture --output-file coverage.info - COMMAND lcov --remove coverage.info '/usr*' --remove coverage.info 'pintools*' --remove coverage.info 'examples*' -o coverage.info + COMMAND lcov --ignore-errors unused --remove coverage.info '/usr*' --remove coverage.info 'pintools*' --remove coverage.info 'examples*' -o coverage.info COMMAND genhtml coverage.info -o coverage COMMAND ${CMAKE_COMMAND} -E echo "-- Report generated in ${CMAKE_CURRENT_BINARY_DIR}/coverage/index.html" )