-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgithub-build-actions-python314t.yaml
More file actions
218 lines (189 loc) · 6.51 KB
/
github-build-actions-python314t.yaml
File metadata and controls
218 lines (189 loc) · 6.51 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
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
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: false # Ensure submodules are checked out
- name: Install Miniconda
shell: bash
run: |
apt-get update
apt-get install -y wget
apt-get clean
rm -rf /var/lib/apt/lists/*
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 -f /tmp/miniconda.sh
export PATH="$HOME/miniconda/bin:$PATH"
conda init bash
conda clean -all -y
- 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
conda clean -all -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==1.3.0 hatchling==1.27.0
pip cache purge
- name: Build package with hatchling
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
python -m build
- name: Install package
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
pip install dist/*.whl
# Clean up build artifacts and pip cache
rm -rf build/ dist/ *.egg-info
pip cache purge
- name: Install Lean (elan) and prepare Lean REPL
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
install-lean-repl
source $HOME/.elan/env
- name: Build Lean REPL for itp-interface
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
source $HOME/.elan/env
install-itp-interface
- name: Free up disk space before Lean build
shell: bash
run: |
echo "Disk space before cleanup:"
df -h
# Clean conda caches again
export PATH="$HOME/miniconda/bin:$PATH"
conda clean -all -y
# Clean pip cache
pip cache purge || true
# Clean apt cache
apt-get clean
rm -rf /var/lib/apt/lists/*
# Clean tmp directory
rm -rf /tmp/* 2>/dev/null || true
# Clean any build artifacts
rm -rf build/ dist/ *.egg-info 2>/dev/null || true
# Clean logs
rm -rf .log 2>/dev/null || true
# Clean GitHub runner logs if accessible
rm -rf /home/runner/actions-runner/cached/_diag/*.log 2>/dev/null || true
echo "Disk space after cleanup:"
df -h
- name: Build lean4_proj
shell: bash
run: |
source $HOME/.elan/env
cd src/data/test/lean4_proj && lake exe cache get && lake build
- name: List repository files (debug step)
run: find . -type f
- name: Clean up logs
run: |
rm -rf .log
echo "Cleaned .log directory for fresh parallel execution test"
- name: Ray Cleanup
shell: bash
run: |
rm -rf /tmp/* --verbose
- name: Run Simple Env Lean Test
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
source $HOME/.elan/env
python src/test/simple_env_lean_test.py
- name: Clean up logs
run: |
rm -rf .log
echo "Cleaned .log directory for fresh parallel execution test"
- name: Ray Cleanup
shell: bash
run: |
rm -rf /tmp/* --verbose
- name: Run Data Gen Test
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
source $HOME/.elan/env
python src/test/simple_data_gen_test.py
- name: Clean up logs
run: |
rm -rf .log
echo "Cleaned .log directory for fresh parallel execution test"
- name: Ray Cleanup
shell: bash
run: |
rm -rf /tmp/* --verbose
- name: Run Data Extraction Test
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
source $HOME/.elan/env
python src/test/simple_data_extract_test.py
- name: Ray Cleanup
shell: bash
run: |
rm -rf /tmp/* --verbose
- name: Clean up logs
run: |
rm -rf .log
echo "Cleaned .log directory for fresh parallel execution test"
- name: Clean up .lake in lean4_proj
shell: bash
run: |
rm -rf src/data/test/lean4_proj/.lake
echo "Cleaned .lake directory in lean4_proj for fresh parallel execution test"
- 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: Run Simple Env Coq Test
shell: bash
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source $HOME/miniconda/bin/activate py314-ft
eval $(opam env)
source $HOME/.elan/env
python src/test/simple_env_coq_test.py