[WIP] Verify reproducible builds and run differential E2E tests#468
Draft
[WIP] Verify reproducible builds and run differential E2E tests#468
Conversation
Prior to adding cache to this workflow, the build steps always ran,
which invoked the following: "make install-wasm" > "make install-npm" >
installed the solc npm package defined in "js/emscripten/package.json".
Thus, the explicitly downloaded soljson.js was never used since npm
module resolution first looks for an npm package when required with
"require('solc/soljson')" as before. With cache now added and on cache
hits, the build step no longer runs and just performs the sanity check,
which now detects this unintended behavior and fails since there is no
solc npm package. This commit updates it to look for the local file.
This allows using the same script for all builds including Wasm, and to make it more readable, maintainable, testable, and more easily allow for parallel compilations with Node async APIs.
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.
🚧 WIP
Description
This adds verification for reproducible builds by:
0,3,zfor each contractNotes
Failed compilations
Since resolc-compiler-tests includes contracts that are expected to fail (e.g. due to unsupported
pragma solidityversion specified), thecompile-and-hashworkflow jobs are not expected to fail if compilation fails for a contract. (Although, if none of the contracts provided compile to bytecode, the job will fail.)Instead, if a contract compiles with one build but not with another, a hash will be missing and will thereby generate a mismatch when comparing all hashes, failing at the verification step.
Detected mismatched hashes for Windows
We've currently detected some mismatched hashes for Windows for optimization level 0 and 3. See the "Compare Hashes Across Platforms" step in this run.