-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathgithub-build-actions-python314t.yaml
More file actions
151 lines (129 loc) · 4.73 KB
/
Copy pathgithub-build-actions-python314t.yaml
File metadata and controls
151 lines (129 loc) · 4.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Build, Package, and Test (Python 3.14 Free-Threading)
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-test-python314t:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up olean cache
uses: actions/cache@v3
with:
path: ~/.cache
key: oleans
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y graphviz wget
- name: Install Miniconda
shell: bash
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh
bash /tmp/miniconda.sh -b -p $HOME/miniconda
rm /tmp/miniconda.sh
export PATH="$HOME/miniconda/bin:$PATH"
conda init bash
- name: Create Python 3.14 free-threading conda environment
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
conda create -n py314-ft python=3.14 python-freethreading -c conda-forge -y
- name: Check Python version and GIL status
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
python --version
python -c "import sys; print('GIL disabled:', not sys._is_gil_enabled())"
- name: Upgrade pip and install build tools
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
python -m pip install --upgrade pip
pip install build
- name: Build the package using Hatch
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
python -m build
- name: Install the built package
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
pip install dist/*.whl
- name: Install Lean (elan)
shell: bash
run: |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y
source $HOME/.elan/env
- name: Configure
working-directory: data/test/lean4_proj
run: |
source $HOME/.elan/env
lake exe cache get
- name: Install Lean and ITP Interface
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
source $HOME/.elan/env
export LEAN_VERSION="4.21.0"
install-lean-repl
export LEAN_VERSION="4.21.0"
install-itp-interface
- name: Build the lean project
run: |
source $HOME/.elan/env
pushd data/test/lean4_proj && lake build && popd
- name: Create secrets
run: |
mkdir -p .secrets
echo ${{ secrets.OPENAI }} | base64 -d > .secrets/openai_key.json
- name: Run CI setup tests (sequential)
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
export LEAN_VERSION="4.21.0"
source $HOME/miniconda/bin/activate py314-ft
source $HOME/.elan/env
python src/tests/simple_copra_run.py
- name: Clean up logs before parallel test
run: |
rm -rf .log
echo "Cleaned .log directory for fresh parallel execution test"
- name: Run CI setup tests (parallel execution with threading)
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
export LEAN_VERSION="4.21.0"
source $HOME/miniconda/bin/activate py314-ft
source $HOME/.elan/env
export ENABLE_PARALLEL_THEOREMS=True
export MAX_PARALLEL_WORKERS=2
python src/tests/simple_copra_run.py
- name: Run CLI tests
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
export LEAN_VERSION="4.21.0"
source $HOME/miniconda/bin/activate py314-ft
source $HOME/.elan/env
python src/tests/test_simple_cli.py
- name: Verify threading was used
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
echo "Python 3.14t parallel execution uses threading (not multiprocessing)"
python -c "import sys; print(f'Python: {sys.version_info.major}.{sys.version_info.minor}'); print(f'GIL enabled: {sys._is_gil_enabled()}'); print(f'Free-threading: {not sys._is_gil_enabled()}')"
- name: Remove secrets
run: |
rm -rf .secrets
ls -la