init: raw cpuid/rdtsc access via ctypes

This commit is contained in:
ImSavsis 2026-07-19 23:29:46 +05:00
commit fa82965ab5
15 changed files with 437 additions and 0 deletions

27
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: ci
on:
push:
branches: [master]
jobs:
test:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: ilammy/msvc-dev-cmd@v1
- run: cl /LD /EHsc /Fe:src\rawcpu\rawcpu.dll native\rawcpu.cpp
- run: pip install -e .[dev]
- run: pytest --cov=rawcpu --cov-report=xml
- uses: codecov/codecov-action@v4
if: matrix.python-version == '3.12'
with:
files: ./coverage.xml
- run: python -m build
- run: python -m twine check dist/*

23
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: publish
on:
release:
types: [published]
permissions:
id-token: write
jobs:
publish:
runs-on: windows-latest
environment: pypi
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: ilammy/msvc-dev-cmd@v1
- run: cl /LD /EHsc /Fe:src\rawcpu\rawcpu.dll native\rawcpu.cpp
- run: pip install build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1