-
Notifications
You must be signed in to change notification settings - Fork 32
Add a windows build workflow. #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,3 +97,29 @@ jobs: | |
| run: uv run --no-sync python -c "from wolfcrypt.random import Random; Random()" | ||
| - name: Run tests | ||
| run: uv run --no-sync pytest tests | ||
|
|
||
| build-windows: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 [Medium] Windows job gives no signal about which features were actually compiled in Without Fix: Add a feature-assertion step mirroring
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 [Low] No timeout-minutes on a job that builds wolfSSL from source with MSVC Because the job does not set Fix: Add |
||
|
|
||
| runs-on: windows-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | ||
| with: | ||
| # Install a specific version of uv. | ||
| version: "0.11.26" | ||
| - name: Build the wheel | ||
| run: uv build --wheel | ||
| - name: Install the project | ||
| run: uv sync --dev | ||
| - name: Perform static checks | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 [Low] Duplicate ruff lint on a 2x-billed Windows runner
Fix: Drop the |
||
| run: uv run ruff check | ||
| - name: Run tests using the locally built wheel | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CI is failing:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 [High] PowerShell does not expand dist/*.whl, so the wheel install step fails on windows-latest The new Fix: Add
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 [High] Multi-line pwsh run block does not fail-fast, so the broken wheel install produces a false-green job GitHub Actions wraps a Fix: Set |
||
| run: | | ||
| uv pip install --reinstall dist/*.whl | ||
| uv run --no-sync pytest tests | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -560,7 +560,7 @@ def build_ffi(local_wolfssl, features): | |
| extern int HASHDRBG_ENABLED; | ||
|
|
||
| typedef unsigned char byte; | ||
| typedef unsigned int word32; | ||
| typedef uint32_t word32; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 [Medium] word32 typedef change to uint32_t is a no-op on supported platforms and the stated rationale does not hold The commit message justifies this with "'unsigned int' might be interpreted as a 64 bit unsigned int", but that does not describe any platform this project targets. In API mode, cffi expands a cdef typedef down to its primitive and emits that primitive directly into the generated C, which is then handed to the real wolfSSL function. The checked-in generated source confirms this -- Fix: Please describe the concrete failure this fixes -- the exact compiler/linker error or wrong runtime value, and on which target. If there is no reproducer, revert the hunk and land the workflow on its own so the Windows CI addition can be evaluated independently. If a real width bug does exist, the fix likely belongs with the |
||
|
|
||
| typedef struct { ...; } WC_RNG; | ||
| typedef struct { ...; } OS_Seed; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 [Medium] build-windows is a verbatim copy of the build job instead of an OS matrix
build-windows(lines 101-125) is character-for-character identical tobuild(lines 16-40) except forruns-on. This creates a maintenance trap: the workflow now pins the sameastral-sh/setup-uvcommit SHA08807647e7069bb48b6ef5acd8ec9567f424441b, the same uv version0.11.26, the sameactions/checkout@v7, and the sameactions/setup-python@v6in three separate places (lines 21-30, 52-63, 112-115). Every future dependency bump or step change has to be applied three times, and the two jobs will silently drift the first time someone forgets. A matrix also makes the Linux-vs-Windows delta explicit and reviewable rather than hidden in a duplicated block.Fix: Collapse
buildandbuild-windowsinto a single job withstrategy.matrix.os: [ubuntu-latest, windows-latest]andfail-fast: falseso a Windows failure still yields Linux results. Settingshell: bashon the wheel-install step keeps one script working on both legs.