vlang / vsl

V library to develop Artificial Intelligence and High-Performance Scientific Computations
https://vlang.github.io/vsl
MIT License
351 stars 44 forks source link

Fix tests on macOS #184

Closed ttytm closed 11 months ago

ttytm commented 11 months ago

Best #182 first, then C types can be updated here as well before a merge.

Apparently math works different on mac, needed to add a little tolarance for some tests.

Summary by CodeRabbit

coderabbitai[bot] commented 11 months ago

Walkthrough

The changes primarily focus on platform-specific adjustments for macOS, particularly in floating-point comparisons and LAPACK library usage. The CI/CD pipeline is simplified, and test execution steps are streamlined. The codebase now incorporates LAPACK functionality for macOS, and the test assertions have been updated to use tolerance checks for floating-point comparisons.

Changes

File(s) Summary
.github/workflows/ci.yml Simplified the CI/CD pipeline by removing specific test configurations and adding the --skip-examples flag to test execution commands.
float/float64/ge_test.v, iter/ranges_test.v, la/matrix_ops_test.v Introduced platform-specific tolerance checks for floating-point comparisons in tests. Enhanced assertions with failure messages displaying actual, expected values, and tolerance.
vlas/cflags_d_cblas.v, vlas/cflags_notd_cblas.v Added header files and flags for LAPACK and CBLAS functionality on macOS.
vlas/lapack_common.v, vlas/lapack_default.c.v, vlas/lapack_macos.c.v Removed unused functions, updated function signatures, and incorporated LAPACK functionality.
vlas/conversions.v Simplified code by replacing if-else statements with conditional expressions and changing return types.

🐇 "In the land of code, where logic is the road, Changes come and go, like a river's flow. Tolerance in tests, for platforms at their best, With LAPACK's zest, we're on a quest. Simplified CI/CD, as easy as one, two, three, Celebrate, for we are free! 🎉"


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files.