File tree 4 files changed +25
-7
lines changed
4 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 9
9
strategy :
10
10
matrix :
11
11
include :
12
- - {python: '3.7', debug: true}
13
- - {python: '3.11-dev', debug: false}
14
- - {python: '3.12-dev', debug: false}
12
+ - {python: '3.7', debug: true, nogil: false}
13
+ - {python: '3.11-dev', debug: false, nogil: false}
14
+ - {python: '3.12-dev', debug: false, nogil: false}
15
+ - {python: '3.13-dev', debug: false, nogil: true}
15
16
steps :
16
- - uses : actions/checkout@v3
17
+ - uses : actions/checkout@v4
17
18
- uses : ./.
18
19
with :
19
20
python-version : ${{ matrix.python }}
20
21
debug : ${{ matrix.debug }}
22
+ nogil : ${{ matrix.nogil }}
Original file line number Diff line number Diff line change 34
34
with :
35
35
python-version : ${{ matrix.python-version }}
36
36
# debug: true # Optional, to select a Python debug build
37
+ # nogil: true # Optional, to select a free-threaded Python build (3.13+ only)
37
38
- run : python --version --version && which python
38
39
` ` `
39
40
47
48
In either case, the actions's `debug` input can be used to install a
48
49
debug build of the selected Python version, by adding `debug : true`.
49
50
51
+ The `nogil` input can be used instead of `debug` to install an *experimental*
52
+ free-threaded build of the selected Python version, by adding `nogil : true`
53
+ Only available for Python 3.13 and later.
54
+
50
55
[available nightly versions] : https://launchpad.net/~deadsnakes/+archive/ubuntu/nightly/+packages
51
56
[available versions] : https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa/+packages
Original file line number Diff line number Diff line change 8
8
description : use debug version of python
9
9
required : false
10
10
default : false
11
+ nogil :
12
+ description : use free-threaded version of python
13
+ required : false
14
+ default : false
11
15
runs :
12
16
using : composite
13
17
steps :
14
18
- name : add deadsnakes ppa and install ${{ inputs.python-version }} ${{ inputs.debug == 'true' && '(debug)' || '' }}
15
- run : ${{ github.action_path }}/bin/install-python ${{ inputs.python-version }} ${{ inputs.debug == 'true' && '--debug' || '' }}
19
+ run : ${{ github.action_path }}/bin/install-python ${{ inputs.python-version }} ${{ inputs.debug == 'true' && '--debug' || '' }} ${{ inputs.nogil == 'true' && '--nogil' || '' }}
16
20
shell : bash
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ def _print_call(*args: str) -> int:
36
36
def main () -> int :
37
37
parser = argparse .ArgumentParser ()
38
38
parser .add_argument ('version' )
39
- parser .add_argument ('--debug' , action = 'store_true' )
39
+ mut = parser .add_mutually_exclusive_group ()
40
+ mut .add_argument ('--debug' , action = 'store_true' )
41
+ mut .add_argument ('--nogil' , action = 'store_true' )
40
42
args = parser .parse_args ()
41
43
42
44
if args .version .endswith ('-dev' ):
@@ -54,11 +56,16 @@ def main() -> int:
54
56
packages .append (f'{ py } -distutils' )
55
57
if args .debug :
56
58
packages .append (f'{ py } -dbg' )
59
+ py_executable = f'{ py } -dbg'
60
+ elif args .nogil :
61
+ packages .append (f'{ py } -nogil' )
62
+ py_executable = f'{ py } -nogil'
63
+ else :
64
+ py_executable = py
57
65
58
66
envdir = os .path .expanduser (f'~/venv-{ version } ' )
59
67
bindir = os .path .join (envdir , 'bin' )
60
68
pip = os .path .join (bindir , 'pip' )
61
- py_executable = f'{ py } -dbg' if args .debug else py
62
69
63
70
groups = (
64
71
Group .make (
You can’t perform that action at this time.
0 commit comments