Skip to content

python 314 support and perf improvments for GIL free usage. #10

python 314 support and perf improvments for GIL free usage.

python 314 support and perf improvments for GIL free usage. #10

name: Build, Package, and Test (Python 3.14 Free-Threading)
on:
push:
branches: [main, feature/python_314_support]
pull_request:
branches: [main, feature/python_314_support]
jobs:
build-test-python314t:
runs-on: ubuntu-latest
container:
image: coqorg/coq:8.18.0-ocaml-4.14.2-flambda
options: --user 0 # Running as root; no sudo needed
env:
HOME: /root
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true # Ensure submodules are checked out
- name: Install dependencies for building Python
run: |
apt-get update
apt-get install -y build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
libffi-dev liblzma-dev wget
- name: Download and build Python 3.14 free-threading
run: |
cd /tmp
wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0a2.tar.xz
tar -xf Python-3.14.0a2.tar.xz
cd Python-3.14.0a2
./configure --prefix=/usr/local --enable-optimizations --disable-gil
make -j$(nproc)
make altinstall
ln -sf /usr/local/bin/python3.14 /usr/bin/python
ln -sf /usr/local/bin/python3.14 /usr/bin/python3
ln -sf /usr/local/bin/pip3.14 /usr/bin/pip
- name: Check Python version and GIL status
run: |
python --version
python -c "import sys; print('GIL disabled:', not sys._is_gil_enabled())"
- name: Upgrade pip and install build tools
run: |
python -m pip install --upgrade pip
# Install latest build from git to fix ArgumentParser color issue with Python 3.14
pip install git+https://github.com/pypa/build.git
pip install hatchling
- name: Build package with hatchling
run: |
python -m build
- name: Install package
run: pip install dist/*.whl
- name: Install Lean (elan) and prepare Lean REPL
shell: bash
run: |
install-lean-repl
source $HOME/.elan/env
- name: Build Lean REPL for itp-interface
shell: bash
run: |
source $HOME/.elan/env
install-itp-interface
- name: Check and Init opam version
run: |
opam --version
opam init --disable-sandboxing --yes
- name: Install Coq
run: |
opam switch create simple_grp_theory 4.14.2
opam switch simple_grp_theory
eval $(opam env)
opam repo add coq-released https://coq.inria.fr/opam/released
opam pin add -y coq-lsp 0.1.8+8.18
- name: List repository files (debug step)
run: find . -type f
- name: Run Simple Env Test
shell: bash
run: |
eval $(opam env)
source $HOME/.elan/env
python src/test/simple_env_test.py
- name: Run Data Gen Test
shell: bash
run: |
eval $(opam env)
source $HOME/.elan/env
python src/test/simple_data_gen_test.py