Skip to content

Commit

Permalink
Update Python workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cnheitman committed Oct 15, 2024
1 parent 4770a26 commit 0e9a3e2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMG
ARG BASE_IMG=quay.io/pypa/manylinux_2_28_x86_64

FROM $BASE_IMG

Expand Down Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions src/scripts/docker/build-wheel-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e9a3e2

Please sign in to comment.