File tree Expand file tree Collapse file tree 2 files changed +56
-11
lines changed Expand file tree Collapse file tree 2 files changed +56
-11
lines changed Original file line number Diff line number Diff line change 35
35
name : wheels-${{ matrix.platform.arch }}
36
36
path : wheelhouse/*.whl
37
37
38
+ build-py3-none-any :
39
+ runs-on : ubuntu-24.04
40
+ steps :
41
+ - uses : actions/checkout@v4
42
+ - uses : astral-sh/setup-uv@v4
43
+ - uses : actions/setup-python@v2
44
+ with :
45
+ python-version : " 3.12"
46
+ - name : Build py3-none-any wheel
47
+ env :
48
+ PYTEST_CODSPEED_SKIP_EXTENSION_BUILD : " 1"
49
+ run : uv build --wheel --out-dir dist/
50
+
51
+ - uses : actions/upload-artifact@v4
52
+ with :
53
+ name : wheels-py3-none-any
54
+ path : dist/*.whl
55
+
56
+ build-sdist :
57
+ runs-on : ubuntu-24.04
58
+ steps :
59
+ - uses : actions/checkout@v4
60
+ - uses : astral-sh/setup-uv@v4
61
+ - uses : actions/setup-python@v2
62
+ with :
63
+ python-version : " 3.12"
64
+ - name : Build the source dist
65
+ run : uv build --sdist --out-dir dist/
66
+
67
+ - uses : actions/upload-artifact@v4
68
+ with :
69
+ name : sdist
70
+ path : dist/*.tar.gz
71
+
38
72
publish :
39
- needs : build-wheels
73
+ needs :
74
+ - build-wheels
75
+ - build-py3-none-any
76
+ - build-sdist
77
+
40
78
runs-on : ubuntu-24.04
41
79
steps :
42
80
- uses : actions/download-artifact@v4
54
92
merge-multiple : true
55
93
path : dist/
56
94
57
- - name : Build the source dist
58
- run : uv build --sdist --out-dir dist/
59
-
60
95
- name : List artifacts
61
96
run : ls -al dist/*
62
97
Original file line number Diff line number Diff line change 28
28
IS_EXTENSION_REQUIRED = (
29
29
os .environ .get ("PYTEST_CODSPEED_FORCE_EXTENSION_BUILD" ) is not None
30
30
)
31
+
32
+ SKIP_EXTENSION_BUILD = (
33
+ os .environ .get ("PYTEST_CODSPEED_SKIP_EXTENSION_BUILD" ) is not None
34
+ )
35
+
36
+ if SKIP_EXTENSION_BUILD and IS_EXTENSION_REQUIRED :
37
+ raise ValueError ("Extension build required but the build requires to skip it" )
38
+
31
39
if IS_EXTENSION_REQUIRED and not IS_EXTENSION_BUILDABLE :
32
40
raise ValueError (
33
41
"The extension is required but the current platform is not supported"
34
42
)
35
43
36
-
37
44
ffi_extension = build .ffibuilder .distutils_extension ()
38
45
ffi_extension .optional = not IS_EXTENSION_REQUIRED
39
46
43
50
)
44
51
45
52
setup (
46
- package_data = {
47
- "pytest_codspeed" : [
48
- "instruments/valgrind/_wrapper/*.h" ,
49
- "instruments/valgrind/_wrapper/*.c" ,
50
- ]
53
+ exclude_package_data = {
54
+ "pytest_codspeed.instruments.valgrind._wrapper" : [
55
+ "*.c" ,
56
+ "*.h" ,
57
+ "build.py" ,
58
+ ],
51
59
},
52
- ext_modules = [ffi_extension ] if IS_EXTENSION_BUILDABLE else [],
60
+ ext_modules = (
61
+ [ffi_extension ] if IS_EXTENSION_BUILDABLE and not SKIP_EXTENSION_BUILD else []
62
+ ),
53
63
)
You can’t perform that action at this time.
0 commit comments