Skip to content

Commit bf0e6be

Browse files
authored
Merge pull request #422 from bashtage/clang-cl
CI: Add clang to Ubuntu
2 parents e90c909 + 91595fb commit bf0e6be

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

ci/azure/azure_template_posix.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ jobs:
4646
BUILD_FLAGS: '-Csetup-args=-Dcython-coverage=true'
4747
cython.coverage: true
4848
PYTEST_PATTERN: "(not slow)"
49-
python313_latest_coverage:
49+
python313_clang:
50+
python.version: '3.13'
51+
CC: clang-20
52+
use.clang: true
53+
python313_debug:
54+
python.version: '3.13'
55+
BUILD_FLAGS: '-Csetup-args=-Dbuildtype=debug -Cbuild-dir=build-dbg'
56+
python313_latest:
5057
python.version: '3.13'
5158
python314_latest:
5259
python.version: '3.14'
@@ -56,8 +63,6 @@ jobs:
5663
python_312_no_coverage:
5764
python.version: '3.12'
5865
PYPI: true
59-
# TODO: Enable debug
60-
RANDOMGEN_DEBUG: true
6166
test.wheel: true
6267
coverage: false
6368
${{ if eq(parameters.name, 'macOS') }}:
@@ -107,6 +112,12 @@ jobs:
107112
displayName: 'List Configuration (PyPI)'
108113
condition: ne(variables['use.conda'], 'true')
109114
115+
- script: |
116+
sudo apt update
117+
sudo apt install clang-20 lldb-20 clangd-20
118+
displayName: 'Install Clang'
119+
condition: eq(variables['use.clang'], 'true')
120+
110121
- script: |
111122
python -m pip install pip --upgrade
112123
python -c "import platform;print(platform.uname())"

randomgen/meson.build

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ npyrandom_lib = cc.find_library('npyrandom', dirs: npyrandom_path)
4040
# Needed to trick Cython, it won't do a relative import outside a package
4141
_cython_tree = [fs.copyfile('__init__.py')]
4242

43-
# TODO: Check these flags
44-
# TODO: Enable cython coverage in CI
45-
# "language_level": "3",
46-
# "binding": True,
47-
# "linetrace": CYTHON_COVERAGE,
48-
4943
_pcg64_def = []
5044
_blabla_def = []
5145
if get_option('pcg64-force-emulated')

randomgen/rdrand.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ cdef uint64_t rdrand_uint64(void* st) noexcept nogil:
5252

5353

5454
cdef uint32_t rdrand_uint32(void *st) noexcept nogil:
55-
# TODO: This is lazy
5655
return <uint32_t>rdrand_uint64(st)
5756

5857
cdef double rdrand_double(void* st) noexcept nogil:

tools/practrand-driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def main():
364364
if __name__ == "__main__":
365365
try:
366366
main()
367-
except (BrokenPipeError, OSError):
367+
except OSError:
368368
logging.log(logging.INFO, "Pipe broken, assuming complete")
369369

370370
sys.stderr.close()

0 commit comments

Comments
 (0)