-
Notifications
You must be signed in to change notification settings - Fork 25
Implement verification of reproducible builds and run differential E2E tests #468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
96f11a1
ff7fd85
1a31d89
e5e020c
0bd1995
e9ea206
364dd23
4b2c99f
6759c9e
d967c82
4e73e59
2df795d
2bbe953
f381f4e
b6635a9
c9e683c
a6f7c35
e539d9e
812d18a
b5e60af
7267f63
e803931
a0d6e7b
396570f
5695cb6
8f1ded6
c9d4aa3
0123ad9
27da4b1
eba7b9e
d8d1c08
fc8221e
ed39df3
352aa56
c8e488b
e4c811e
fd5a1a3
193f360
794a8b8
45e8004
5d2560d
5838412
6e7151d
285a940
5e00736
382bcab
72895f2
13ccf19
5ab5139
9bb537a
559c35a
b1ed29f
01ae964
5093a99
a663d58
d801f05
784b9bb
1c38116
4d6c2ed
cfa1fb6
d455b5f
96f975e
a1d3e44
51938f6
6a363cc
0e77060
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "fixtures/solidity/simple/algorithm/cryptography/caesar_cypher.sol::2::Y M0 S-": "Failed" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,192 @@ | ||
| name: Verify Reproducible Builds | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| env: | ||
| # The compiler modes to use for compilation by retester. | ||
| MODES: "Y M0 S+, Y M3 S+, Y Mz S+" | ||
| SOLC_VERSION: "0.8.33" | ||
|
|
||
| jobs: | ||
| build: | ||
| uses: ./.github/workflows/reusable-build.yml | ||
| with: | ||
| is_release: false | ||
| retention_days: 1 | ||
|
|
||
| create-macos-universal: | ||
| needs: build | ||
| runs-on: macos-15 | ||
| steps: | ||
| - name: Download MacOS artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: resolc-*-apple-darwin | ||
| merge-multiple: true | ||
|
|
||
| - name: Create MacOS Fat Binary | ||
| run: | | ||
| lipo resolc-aarch64-apple-darwin resolc-x86_64-apple-darwin -create -output resolc-universal-apple-darwin | ||
|
|
||
| - name: Upload Universal Binary | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: resolc-universal-apple-darwin | ||
| path: resolc-universal-apple-darwin | ||
| retention-days: 1 | ||
|
|
||
| compile-and-export-hashes-native: | ||
| needs: [build, create-macos-universal] | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - platform: linux | ||
| target: x86_64-unknown-linux-musl | ||
| runner: ubuntu-24.04 | ||
| - platform: macos | ||
| target: universal-apple-darwin | ||
| runner: macos-15 | ||
| - platform: windows | ||
| target: x86_64-pc-windows-msvc | ||
| runner: windows-2022 | ||
| runs-on: ${{ matrix.runner }} | ||
| steps: | ||
| # For some deeply nested contracts in `resolc-compiler-tests`, Windows | ||
| # will generate a "Filename too long" error. This step enables long paths. | ||
| - name: Enable Git Long Paths (Windows) | ||
| if: ${{ runner.os == 'Windows' }} | ||
| run: git config --system core.longpaths true | ||
|
|
||
| - name: Checkout revive | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: revive | ||
| submodules: recursive | ||
|
|
||
| - name: Download Binary | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: resolc-${{ matrix.target }} | ||
| path: resolc-bin | ||
|
|
||
| - name: Make resolc Executable | ||
| shell: bash | ||
| run: chmod +x "resolc-bin/resolc-${{ matrix.target }}${{ runner.os == 'Windows' && '.exe' || '' }}" | ||
|
|
||
| - name: Compile Contracts | ||
| id: compile | ||
| uses: ./revive/revive-differential-tests/.github/actions/compile-contracts | ||
| with: | ||
| revive-differential-tests-path: revive/revive-differential-tests | ||
| resolc-path: resolc-bin/resolc-${{ matrix.target }}${{ runner.os == 'Windows' && '.exe' || '' }} | ||
| solc-version: ${{ env.SOLC_VERSION }} | ||
| modes: ${{ env.MODES }} | ||
| upload-artifact-name: compilation-report-${{ matrix.platform }} | ||
|
|
||
| - name: Export Bytecode Hashes | ||
| uses: ./revive/revive-differential-tests/.github/actions/export-bytecode-hashes | ||
| with: | ||
| revive-differential-tests-path: revive/revive-differential-tests | ||
| report-path: ${{ steps.compile.outputs.report-path }} | ||
| remove-prefix: ${{ steps.compile.outputs.contracts-source-prefix }} | ||
| platform-label: ${{ matrix.platform }} | ||
| upload-artifact-name: hashes-${{ matrix.platform }} | ||
|
|
||
| compare-hashes: | ||
| needs: compile-and-export-hashes-native | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout revive | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: revive | ||
| submodules: true | ||
|
|
||
| - name: Compare Bytecode Hashes | ||
| uses: ./revive/revive-differential-tests/.github/actions/compare-bytecode-hashes | ||
| with: | ||
| revive-differential-tests-path: revive/revive-differential-tests | ||
| hash-artifact-names: "hashes-linux, hashes-macos, hashes-windows" | ||
| modes: ${{ env.MODES }} | ||
| upload-artifact-name: hash-comparison-result | ||
|
|
||
| run-differential-tests: | ||
| needs: build | ||
| runs-on: parity-large | ||
| timeout-minutes: 75 | ||
| env: | ||
| # TODO: Which Polkadot SDK commit do we want to use? | ||
| # The below one is as of March. 25, 2026. | ||
| POLKADOT_SDK_REF: "9d8a2fefd2414591c4a243460f3ffc5195a71deb" | ||
|
Comment on lines
+120
to
+122
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a commit from Polkadot SDK
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be aligned to what we have in also, @xermicus, don't we need to also update this dependency ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes we test against the exact same time everywhere |
||
| RUSTFLAGS: "-Awarnings" | ||
| steps: | ||
| - name: Checkout revive | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: revive | ||
| submodules: recursive | ||
|
|
||
| - name: Download Binary | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: resolc-x86_64-unknown-linux-musl | ||
| path: ./resolc-bin | ||
|
|
||
| - name: Make resolc Executable | ||
| shell: bash | ||
| run: chmod +x ./resolc-bin/resolc-x86_64-unknown-linux-musl | ||
|
|
||
| - name: Checkout Polkadot SDK | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: paritytech/polkadot-sdk | ||
| ref: ${{ env.POLKADOT_SDK_REF }} | ||
| path: polkadot-sdk | ||
| submodules: recursive | ||
|
|
||
| - name: Install Dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential pkg-config libssl-dev protobuf-compiler llvm clang libclang-dev | ||
|
|
||
| - name: Install forklift | ||
| run: | | ||
| curl -fsSLo forklift https://github.com/paritytech/forklift/releases/download/0.15.0/forklift_0.15.0_linux_amd64 | ||
| chmod +x forklift | ||
| sudo mv forklift /usr/local/bin/ | ||
|
|
||
| - name: Configure forklift | ||
| run: | | ||
| mkdir -p .forklift | ||
| cp polkadot-sdk/.forklift/config.toml .forklift/config.toml | ||
|
|
||
| - name: Set Up Rust Toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: "1.90.0" | ||
| target: "wasm32-unknown-unknown" | ||
| components: "rust-src" | ||
| rustflags: "" | ||
|
|
||
| - name: Run Differential E2E Tests | ||
| uses: ./revive/revive-differential-tests/.github/actions/run-differential-tests | ||
| with: | ||
| revive-differential-tests-path: revive/revive-differential-tests | ||
| polkadot-sdk-path: ./polkadot-sdk | ||
| cargo-command: "forklift cargo" | ||
| platform: revive-dev-node-polkavm-resolc | ||
| resolc-path: ./resolc-bin/resolc-x86_64-unknown-linux-musl | ||
| solc-version: ${{ env.SOLC_VERSION }} | ||
| expectations-file-path: ./revive/.github/assets/revive-dev-node-polkavm-resolc.json | ||
|
|
||
| # Sentinel job that depends on the jobs we want to allow completing (instead of | ||
| # being canceled once the other job chains complete). Thus, run-differential-tests | ||
| # will always run even if compare-hashes finishes first, and vice versa. | ||
| wait-for-jobs: | ||
| if: ${{ always() }} | ||
| needs: [compare-hashes, run-differential-tests] | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - run: echo "All jobs finished" | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the expectations file (expected test execution failures) generated by retester in this run.
Reason for the test execution failure of
fixtures/solidity/simple/algorithm/cryptography/caesar_cypher.sol::2::Y M0 S-: