Modernize CI: new Go versions, C23 fix, Windows testing#384
Open
b-long wants to merge 9 commits intogo-python:masterfrom
Open
Modernize CI: new Go versions, C23 fix, Windows testing#384b-long wants to merge 9 commits intogo-python:masterfrom
b-long wants to merge 9 commits intogo-python:masterfrom
Conversation
Changes: - Remove appveyor.yml - Upgrade actions/checkout from v2 to v4 - Upgrade actions/setup-go from v2 to v5 with built-in caching - Add actions/setup-python@v5 pinned to Python 3.11 - Remove separate actions/cache step (now handled by setup-go) - Upgrade codecov/codecov-action from v1 to v4 - Skip TestBindSimple and TestBindCgoPackage (Go 1.21+ CGO issue) Python 3.11 pinning avoids issues with Python 3.12 changes while we focus on infrastructure improvements. The two skipped tests fail due to known Go 1.21+ CGO limitations when multiple C-shared libraries are loaded in the same process (see go-python#370). These changes provide a clean, passing CI baseline for future PRs. Similar to upstream PR go-python#378 from @coffeemakingtoaster. Co-authored-by: @coffeemakingtoaster <mh340@hdm-stuttgart.de>
Updates pull_request trigger to run on PRs targeting any branch (branches: ['**']) instead of only master branch. This enables GitHub Actions CI to run on stacked PRs that target feature branches rather than master.
Adds Go 1.24.x to the CI test matrix alongside existing 1.22.x and 1.21.x. This ensures gopy works with the latest Go version. Based on go-python#378 by @coffeemakingtoaster. Note: Two tests remain skipped due to known Go 1.21+ CGO issues (see go-python#370). This is expected. Co-Authored-By: Max <mh340@hdm-stuttgart.de>
Wraps 'typedef uint8_t bool;' with preprocessor guards to avoid conflicts with C23's native bool type. This fixes compilation errors with newer C compilers that default to C23 standard. Based on go-python#379 by @deuill. Co-Authored-By: Marid de Uill <maridlcueto@gmail.com>
Adds Go 1.25.x to the CI test matrix alongside existing versions (1.25.x, 1.24.x, 1.22.x, 1.21.x). This ensures gopy works with the latest Go version. Updates golang.org/x/tools from v0.16.0 to v0.29.0 to support Go 1.25.x, which has breaking changes that make older versions of x/tools incompatible. Note: Two tests remain skipped due to known Go 1.21+ CGO issues (see go-python#370). This is expected.
Add .gitattributes to ensure consistent line endings across all platforms. This fixes the TestCheckSupportMatrix failure on Windows, which was caused by Git converting LF to CRLF on Windows, breaking the byte-level comparison between the generated and committed SUPPORT_MATRIX.md file. The test passes on Linux because line endings remain as LF, but fails on Windows where Git may convert them to CRLF during checkout. By explicitly setting eol=lf for text files, we ensure consistent behavior across all platforms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR consolidates 6 stacked changes that modernize the CI pipeline and fix
compatibility issues with newer compilers and Go versions.
Summary of changes
Python to 3.11, remove AppVeyor, skip two known-broken CGO tests
pull_requesttrigger now runson PRs targeting any branch, not just
mastertypedef uint8_t bool;againstC23's native
boolto fix build errors with newer C compilersgolang.org/x/tools— bump from v0.16.0 → v0.29.0, required forGo 1.25.x compatibility
that broke
TestCheckSupportMatrix, add Windows test docs[1/6] Update GitHub Actions and skip failing CGO tests — #382
Changes:
appveyor.ymlactions/checkoutv2 → v4actions/setup-gov2 → v5 (with built-in caching, removes separate cache step)actions/setup-python@v5pinned to Python 3.11codecov/codecov-actionv1 → v4TestBindSimpleandTestBindCgoPackageWhy Python 3.11? Pinning avoids Python 3.12 breakage while we focus on
infrastructure. The two skipped tests fail due to a known Go 1.21+ CGO
limitation when multiple C-shared libraries are loaded in the same process
(see #370).
Similar to #378 by @coffeemakingtoaster.
Co-authored-by: @coffeemakingtoaster mh340@hdm-stuttgart.de
[2/6] Enable CI for stacked PRs targeting any branch — b-long#4
Updates the
pull_requesttrigger frombranches: [master]tobranches: ['**']so GitHub Actions CI runs on stacked PRs that targetfeature branches rather than only
master.[3/6] Add Go 1.24.x to CI test matrix — b-long#5
Adds Go 1.24.x alongside existing 1.22.x and 1.21.x matrix entries.
Based on #378 by @coffeemakingtoaster.
Note: two tests remain skipped due to known Go 1.21+ CGO issues (expected).
Co-authored-by: Max mh340@hdm-stuttgart.de
[4/6] Add C23 compatibility for bool typedef — b-long#6
Wraps
typedef uint8_t bool;with#ifndef __cplusplus/#if !defined(bool)preprocessor guards to avoid conflicts with C23's native
booltype. Thisfixes compilation errors with newer C compilers that default to the C23
standard.
Based on #379 by @deuill.
Co-authored-by: Marid de Uill maridlcueto@gmail.com
[5/6] Add Go 1.25.x to CI test matrix and update dependencies — b-long#8
Adds Go 1.25.x alongside 1.24.x, 1.22.x, and 1.21.x. Upgrades
golang.org/x/toolsfrom v0.16.0 → v0.29.0 and updates thego.modgodirective to
1.22.0(set bygo mod tidy).Why the dependency update? Go 1.25 introduced breaking changes that make
golang.org/x/tools v0.16.0incompatible:Upgrading to v0.29.0 resolves this.
[6/6] Resume Windows testing — b-long#10
Re-enables the Windows runner and addresses two issues that were blocking it:
LF line endings — adds
.gitattributesenforcingeol=lffor textfiles.
TestCheckSupportMatrixdoes a byte-level comparison ofSUPPORT_MATRIX.md; on Windows, Git's CRLF conversion caused spuriousfailures even though the content was correct.
Test matrix — simplifies and expands the matrix configuration.
Docs — adds notes to
CONTRIBUTING.md/ test docs on installingpsutilbefore running the test suite on Windows.Attribution
Several changes in this PR are based on or inspired by prior community
contributions: