fix(ci): fix wheel version detection & windows wheel ci (#303)

This commit is contained in:
Jalin Wang 2026-04-02 22:26:00 +08:00 committed by GitHub
parent b6f2d4367d
commit 2cb1a146fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 5 deletions

View File

@ -28,7 +28,9 @@ jobs:
uses: actions/checkout@v6
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0
- name: Set up Python (for cibuildwheel controller)
uses: actions/setup-python@v6
with:

View File

@ -1,8 +1,6 @@
name: Build and Test PyPi Wheels on Windows
on:
push:
branches: [ "main" ]
workflow_call:
inputs:
publish_target:
@ -71,6 +69,8 @@ jobs:
uses: actions/checkout@v6
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0
- name: Cleanup left marker files
run: |
@ -81,6 +81,11 @@ jobs:
with:
python-version: '3.11'
- name: Set up MSVC environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install cibuildwheel
run: |
pip install --upgrade pip
@ -100,6 +105,11 @@ jobs:
- name: Build wheels using cibuildwheel
if: steps.cache-wheels.outputs.cache-hit != 'true'
shell: powershell
# env:
# CIBW_BUILD_VERBOSITY: 1
# CIBW_DEBUG_TRACEBACK: 1
# CIBW_DEBUG_KEEP_CONTAINER: 1
run: |
python -m cibuildwheel --output-dir wheelhouse

View File

@ -130,7 +130,7 @@ BUILD_PYTHON_BINDINGS = "ON"
[tool.setuptools_scm]
local_scheme = "no-local-version"
version_scheme = "guess-next-dev"
fallback_version = "0.2.1b1"
fallback_version = "0.0.0"
######################################################################################################
# TESTING & QUALITY
######################################################################################################
@ -189,7 +189,9 @@ environment = { CMAKE_GENERATOR = "Unix Makefiles", CMAKE_BUILD_PARALLEL_LEVEL =
[tool.cibuildwheel.windows]
archs = ["auto64"]
test-command = "cd /d {project} && pytest python/tests -v --tb=short --basetemp=./.pytest_tmp"
test-command = "cd /d {project} && pytest python/tests -v --tb=short --basetemp=./.pytest_tmp && if exist .pytest_tmp rmdir /s /q .pytest_tmp"
environment = { CMAKE_GENERATOR = "Ninja" }
config-settings = { build-dir = "build/{wheel_tag}" }
######################################################################################################
# CODE QUALITY & FORMATTING (Ruff)