Skip to content
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

add ref workflow #34

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,33 @@ jobs:
# fi
# id: update

forge-moat-reference:
name: Run Forge Reference Tests (via_ir = false; fuzz_runs = 5000)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install forge dependencies
run: forge install

- name: Precompile reference using 0.8.24 and via-ir=false
run: FOUNDRY_PROFILE=reference forge build

- name: Precompile optimized using 0.8.24 and via-ir=true
run: FOUNDRY_PROFILE=optimized forge build

- name: Run tests
run: FOUNDRY_PROFILE=reference MOAT_PROFILE=reference forge test --match-test test_fuzz_generateOrders -vvv

forge-offerers:
name: Run Contract Offerer Forge Tests (via_ir = false; fuzz_runs = 1000)
runs-on: ubuntu-latest
Expand Down Expand Up @@ -99,4 +126,4 @@ jobs:
with:
files: ./lcov.info
flags: foundry


3 changes: 2 additions & 1 deletion reference/lib/ReferenceOrderCombiner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ contract ReferenceOrderCombiner is

orderHashes[i] = orderHash;

if (orderHashes[i] == bytes32(0)) {
if (orderHash == bytes32(0)) {
ordersToExecute[i].numerator = 0;
continue;
}
}
Expand Down
Loading