Repository navigation
Conversation
Add a new GitHub Actions workflow (Cross-Platform Noise Benchmark) that runs an additional benchmark of all OpenSimplex2F noise functions on all three platforms (Linux, Windows, macOS) with the same seed and the same input parameters, waits for all three jobs to complete, and then compares the produced result files byte-for-byte: the noise results must match perfectly on every platform. - tests/test_OpenSimplex2F_cross_platform.c: evaluates all nine noise functions (2D, 3D, 4D variants) on a fixed coordinate grid with three frequency scales (37107 values in total) and prints the exact IEEE-754 binary64 bit pattern of every result plus an FNV-1a checksum. - tests/CMakeLists.txt: new OpenSimplex2_cross_platform executable and the OpenSimplex2_cross_platform_benchmark target that runs it (no cqtdeployer deployment required). - CMakeLists.txt: disable FMA (-mno-fma) for GNU/Clang builds of the library and the benchmark so that arm64 (Apple Silicon) FMA contraction cannot change the least significant bits of the results. - .github/workflows/cross-platform-compare.yml: benchmark matrix job on ubuntu-latest, windows-latest and macos-latest (same Qt/libpng setup as ci.yml), artifact upload of the platform reports, and a compare job that waits for all three jobs (needs) and fails when the reports differ.
EndrII
self-requested a review
November 12, 2026 08:36
Member
Author
Task checklist — PR #33 (issue #31) — DONE
Result (CI, head 579453b)
Label |
The first CI run (43130583493) of the Cross-Platform Noise Benchmark workflow failed on the windows-latest and macos-latest benchmark jobs (compare skipped):
- macos-latest: Apple Clang rejects -mno-fma (unsupported option for target
arm64-apple-darwin), so the FMA guard broke the build on the only platform
where it was needed. Use the portable -ffp-contract=off (supported by both
GCC and Clang, no-op on x86-64) for the library and the benchmark target.
- windows-latest: the 'Run cross-platform benchmark' step runs under bash
(Git Bash), where the Windows workspace path (D:\a\...) is mangled by
backslash escaping ('D:/a/.../aOpenSimplex2OpenSimplex2/build is not a
directory'). Normalize GITHUB_WORKSPACE to forward slashes first (a no-op on
Linux and macOS).
- The report was written with fopen(path, w) (text mode), which converts
every newline to CRLF in the Windows C runtime and would have broken the
byte-for-byte comparison even after the path fix. Write in binary mode
("wb") so the report is byte-identical on all three platforms.
- CodeQL ('Workflow does not contain permissions'): limit the GITHUB_TOKEN of
the benchmark job to contents:read + actions:write (checkout +
upload-artifact) and the compare job to actions:read (download-artifact).
Verified locally (Linux x86-64, GCC 13, Qt 6.12.0 prefix): build + benchmark
PASS with 37107 values and checksum bb84b67c9c4e1e11 (unchanged by the flag
swap, matching the ubuntu CI job), re-run byte-identical, PNG test target
3/3 passed, and the compare script passes with three identical reports and
fails on a tampered one.
EndrII
enabled auto-merge
November 12, 2026 18:16
EndrII
approved these changes
Nov 12, 2026
5 tasks done
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 (issue #31)
Adds one more action that triggers an additional test of all noise functions across all three platforms (Linux, Windows, macOS). It waits for completion of all three platform jobs and then compares the results — they must match perfectly, given the same input parameters.
Changes
.github/workflows/cross-platform-compare.yml(new): the new "Cross-Platform Noise Benchmark" action.benchmarkjob: matrix overubuntu-latest,windows-latest,macos-latest(same Qt + libpng setup asci.yml), builds the project and runs the benchmark target, uploads the platform report as an artifact.comparejob:needs: benchmark(waits for all three platforms), downloads the three reports and compares them byte-for-byte (cmp) plus FNV-1a/sha256 checksums; any difference fails the pipeline.tests/test_OpenSimplex2F_cross_platform.c(new): evaluates all nine public noise functions (noise2,noise2_XBeforeY,noise3_Classic,noise3_XYBeforeZ,noise3_XZBeforeY,noise4_Classic,noise4_XYBeforeZW,noise4_XZBeforeYW,noise4_XYZBeforeW) with the same seed (77374) and the same fixed input parameters on every platform, and prints the exact IEEE-754 binary64 bit pattern of every result (37107 values in total) plus an FNV-1a checksum. The report is plain ASCII, so it is platform independent and can be compared byte-for-byte.tests/CMakeLists.txt: newOpenSimplex2_cross_platformexecutable and theOpenSimplex2_cross_platform_benchmarktarget that runs it (deliberately not part of the QuasarApptesttarget, so no cqtdeployer deployment is required).CMakeLists.txt: disables FMA (-mno-fma) for GNU/Clang builds of the library and the benchmark — arm64 (Apple Silicon) compilers may contracta*b+cinto FMA instructions, which would change the least significant bits of the results; on x86-64 this flag is a no-op.Verification (local, Linux)
Result: PASS (37107 values, seed 77374), report written tobuild/cross_platform/noise_benchmark_results.txt(checksumbb84b67c9c4e1e11).-O0produces the same bit patterns as the Release build.Result: 3/3 tests passed.