Conversation
Single workflow with 4 jobs:
test (matrix: windows + ubuntu + macos, .NET 8 + 10 preview):
- Builds and runs all tests on 3 OSes x 2 TFMs
- Excludes 49 known-failing tests via TEST_FILTER env var:
OpenBugs (38), NpAnyTest (8), np_all_axis_Test (4), Issue448 (2),
13 specific IndexingTest methods (fancy indexing/mask bugs)
- Excludes BitmapWithAlphaTests on non-Windows (System.Drawing.Common
is Windows-only on .NET 6+)
- New test failures will correctly fail the pipeline and block merges
- Filter is documented: remove exclusions as bugs are fixed
build-nuget (on v* tags, after test):
- Packs NumSharp and NumSharp.Bitmap into .nupkg with version from tag
- Version extraction: v1.2.3-beta -> Version=1.2.3-beta, AssemblyVersion=1.2.3
- Embeds commit SHA via SourceRevisionId
create-release (on v* tags, after build-nuget):
- Creates GitHub Release with .nupkg + SHA256 checksum assets
- Detects prerelease from version suffix (any hyphen)
- Auto-generates changelog + structured install instructions body
publish-nuget (on v* tags, after build-nuget, parallel to create-release):
- Pushes all .nupkg to nuget.org via NUGETAPIKEY secret
- Uses --skip-duplicate for idempotency
Triggers: push/PR to master/main, v* tags, workflow_dispatch (manual)
Tested on Nucs/NumSharp-dev — all 3 OS test jobs pass green.
NumSharp generates ~7,600 noisy build warnings that get picked up by GitHub Actions' MSBuild problem matcher and displayed as annotations, drowning out real issues. This adds -p:NoWarn to all build/pack steps via a centralized DOTNET_NOWARN env var. Uses %3B (URL-encoded semicolons) because MSBuild CLI treats raw ; and , as property separators — a known MSBuild quoting issue. Suppressed warning categories: XML doc warnings (~7,200 instances — 83% of all warnings): - CS1570: Badly formed XML in doc comments - CS1571: Duplicate param tag - CS1572: Param tag for non-existent parameter - CS1573: Missing param tag - CS1574: Unresolvable cref - CS1587: XML comment not placed on valid element - CS1591: Missing XML comment on public type/member - CS1711: Typeparam for non-existent param - CS1734: Paramref refers to non-existent param Other cosmetic noise: - CS8981: Type name only contains lowercase chars (360 instances) — intentional for NumPy API compatibility (class 'np') - NU5048: PackageIconUrl deprecated (2 instances) Preserved warnings (still visible in CI): - CS0162: Unreachable code (860) - CS0168/CS0219: Unused variables (128) - CA1416: Platform compatibility (380) - CS0109/CS0628/CS0659/CS0661/CS0693: Miscellaneous code issues
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
.github/workflows/build-and-release.yml— full CI/CD pipeline with 4 jobs: test (3 OSes), build-nuget, create-release, publish-nugetnpclass name) to keep annotations cleanTEST_FILTERso the pipeline starts green (bugs tracked inOpenBugs.cs)Details
Triggers: push to master, PR to master, tag
v*, manualworkflow_dispatchTag releases: Pushing a
v*tag runs the full pipeline — tests on all 3 OSes, builds NuGet packages forNumSharp+NumSharp.Bitmap, creates a GitHub Release with.nupkg+.sha256assets, and publishes to nuget.org (requiresNUGETAPIKEYsecret).Prerelease detection: Tags with hyphens (e.g.,
v1.0.0-rc1) →prerelease: true. Without →prerelease: false.Warning suppression: Uses
-p:NoWarnwith%3B-encoded semicolons (MSBuild CLI quoting) to suppress XML doc warnings (CS1570-CS1591,CS1711,CS1734),CS8981(lowercase type namenp), andNU5048(PackageIconUrl deprecated). Real code warnings preserved.Test plan
Exhaustively verified on
Nucs/NumSharp-devtest repository:workflow_dispatch— 3 OSes green, publish jobs skippedv0.50.0) — full pipeline with release assetsprerelease: falsefor non-hyphenated tag)NUGETAPIKEY— clear error, doesn't crash parallel jobsCloses #533