Skip to content

Commit 3f2c1d2

Browse files
committed
test:ci
1 parent 649af21 commit 3f2c1d2

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

.github/workflows/main.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,24 @@ jobs:
2828
run: python run_tests.py
2929

3030
test-debug:
31-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-latest
3232
steps:
3333
- uses: actions/checkout@v4
34-
- name: Set up debug Python
35-
uses: deadsnakes/action@v3.2.0
34+
- name: Cache Python debug build
35+
uses: actions/cache@v4
36+
id: cache-python
3637
with:
37-
python-version: "3.12"
38-
debug: true
39-
- name: Verify debug build
40-
run: python -c "import sys; assert hasattr(sys, 'gettotalrefcount'), 'NOT a debug build'; print('Debug build confirmed:', sys.version)"
38+
path: ~/python-debug
39+
key: python-3.12.12-pydebug
40+
- name: Build Python 3.12 with --with-pydebug
41+
if: steps.cache-python.outputs.cache-hit != 'true'
42+
run: |
43+
sudo apt-get update -qq && sudo apt-get install -y -qq build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev
44+
curl -sL https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tgz | tar xz
45+
cd Python-3.12.12
46+
./configure --with-pydebug --prefix=$HOME/python-debug -q
47+
make -j$(nproc) -s && make install -s
4148
- name: Install test dependencies
42-
run: python -m pip install .[test]
49+
run: ~/python-debug/bin/python3.12 -m pip install .[test]
4350
- name: Run tests (debug build)
44-
run: python run_tests.py
51+
run: ~/python-debug/bin/python3.12 run_tests.py

0 commit comments

Comments
 (0)