Fix GitHub Actions CI and Windows/MinGW build compatibility#1237
Merged
lucaderi merged 1 commit intontop:3.0-stablefrom Mar 2, 2026
Merged
Fix GitHub Actions CI and Windows/MinGW build compatibility#1237lucaderi merged 1 commit intontop:3.0-stablefrom
lucaderi merged 1 commit intontop:3.0-stablefrom
Conversation
Contributor
|
Just a quick observation. Almost all the issues you have found have been fixed for over a year in the https://github.com/n42n/n3n project |
Update GitHub Actions workflow: - Upgrade deprecated actions (checkout, upload/download-artifact, codecov, gh-release) to v4/v2 - Replace deprecated ::set-output with $GITHUB_OUTPUT - Update runner images: remove deprecated macos-13, add macos-15, update Ubuntu to 22.04/24.04 and Windows to 2022/2025 - Make Windows coverage generation non-fatal - Clean up stale gcov artifacts before coverage runs - Disable fail-fast on test matrices Fix Windows/MinGW build errors: - Modernize K&R-style C function definitions to ANSI C in win32/getopt.c, getopt1.c, and getopt.h - Rename reserved __argc/__argv parameter names in getopt.h - Fix implicit declarations: GetAdaptersInfo (add iphlpapi.h), getenv (add stdlib.h), _byteswap_ulong (add stdlib.h) - Fix type mismatches: setsockopt (const char* cast), CryptGenRandom (BYTE* cast), pthread_create/mutex_trylock macros - Extend N2N_THREAD_RETURN/PARAMETER_DATATYPE to cover __MINGW32__ - Exclude MinGW from system getopt.h to use local version Fix Python and C linting: - Fix flake8 E275 in n2n-ctl and n2n-httpd (assert syntax) - Fix uncrustify indentation in HASH_FIND_PEER/HASH_ADD_PEER macros Made-with: Cursor
9cd317b to
3cad2a3
Compare
Author
Sure - could be. I just fixed it all, so that it's clean plate now. |
Member
|
Thank you |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.0-stable #1237 +/- ##
==============================================
+ Coverage 18.31% 21.38% +3.07%
==============================================
Files 41 45 +4
Lines 8589 9161 +572
Branches 0 1235 +1235
==============================================
+ Hits 1573 1959 +386
- Misses 7016 7202 +186 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
Follow-up to #1236 (MacOS Tahoe utun support). Fixes all CI failures so that every job in the test matrix passes.
GitHub Actions workflow updates
checkout,upload/download-artifact,codecov,gh-release) to v4/v2::set-outputsyntax with$GITHUB_OUTPUTmacos-13, addmacos-15, update Ubuntu to22.04/24.04, Windows to2022/2025fail-faston test matrices to surface all failuresWindows/MinGW build fixes
win32/getopt.c,getopt1.c, andgetopt.h__argc/__argvparameter names ingetopt.hto avoid conflicts with Windows runtime symbolsGetAdaptersInfo(addiphlpapi.h),getenv(addstdlib.h),_byteswap_ulong(addstdlib.h)setsockopt(const char*cast),CryptGenRandom(BYTE*cast),pthread_create/pthread_mutex_trylockmacro signaturesN2N_THREAD_RETURN_DATATYPE/N2N_THREAD_PARAMETER_DATATYPEto cover__MINGW32__getopt.hinclude to use the localwin32/getopt.hLinting fixes
flake8E275 errors inscripts/n2n-ctlandscripts/n2n-httpd(assertsyntax)uncrustifyindentation inHASH_FIND_PEER/HASH_ADD_PEERmacrosFiles changed (14)
.github/workflows/tests.yml,.github/workflows/cmake-linux.yml,include/n2n.h,include/n2n_define.h,include/portable_endian.h,scripts/n2n-ctl,scripts/n2n-httpd,src/edge_utils.c,src/sn_utils.c,src/random_numbers.c,win32/getopt.c,win32/getopt.h,win32/getopt1.c,win32/n2n_win32.hTest plan
All 20 CI jobs pass (Linux, macOS, Windows tests + binary builds + packaging).