Skip to content

Enable Foundry test on CI #1454

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

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c20eb50
package/test-package, tests/foundry/test-foundry: add interactive tests
ehildenb Nov 7, 2022
b070cc5
Makefile, tests/foundry/test-foundry.sh: run test-foundry.sh from Mak…
ehildenb Nov 7, 2022
50f6581
.github/test-pr: increase parallelism with foundry testing
ehildenb Nov 7, 2022
95775c0
Makefile: correct file name
ehildenb Nov 7, 2022
c9fb569
tests/foundry: update expected output
ehildenb Nov 7, 2022
49854f1
tests/foundry: update expected output
ehildenb Nov 8, 2022
5fc5a69
.github/workflows: corrections to cachix usage
ehildenb Nov 9, 2022
8de0f7e
.github/test-pr: install Foundry on Nix testing environment
ehildenb Nov 9, 2022
a3fd458
.github/test-pr: set foundryup on PATH manually at first
ehildenb Nov 9, 2022
59c6ea5
.github/test-pr: set up PATH for foundry
ehildenb Nov 9, 2022
8dd9b8f
.github/test-pr, package/test-package: try moving foundry installatio…
ehildenb Nov 9, 2022
6dd0919
flake.nix: try adding curl to buildInputs
ehildenb Nov 9, 2022
9f5cd54
flake.nix, package/test-package.sh: install foundry via nix directly
ehildenb Nov 9, 2022
0d9f0ed
Merge remote-tracking branch 'upstream/master' into foundry-ci-test
ehildenb Nov 11, 2022
74ddf2e
Merge remote-tracking branch 'upstream/master' into foundry-ci-test
ehildenb Mar 29, 2023
16e74f8
Set Version: 1.0.65
rv-auditor Mar 29, 2023
5edd446
kevm-pyk/: sync poetry files
rv-auditor Mar 29, 2023
4087a5d
flake.{nix,lock}: update Nix derivations
rv-auditor Mar 29, 2023
cb4e37b
Makefile, tests/foundry/test-foundry.sh: adjust for new CLI
ehildenb Mar 29, 2023
64f5e93
tests/foundry/test-foundry: updates for CLI
ehildenb Mar 29, 2023
cb8dae2
Makefile: only include new interactive run in packaging tests
ehildenb Mar 29, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
- name: 'Build Foundry'
run: docker exec -u user kevm-ci-foundry-${GITHUB_SHA} /bin/bash -c 'make build-foundry -j2'
- name: 'Test Foundry'
run: docker exec -u user kevm-ci-foundry-${GITHUB_SHA} /bin/bash -c 'make test-foundry -j2 FOUNDRY_PAR=12'
run: docker exec -u user kevm-ci-foundry-${GITHUB_SHA} /bin/bash -c 'make test-foundry -j3 FOUNDRY_PAR=12'
- name: 'Tear down Docker'
if: always()
run: |
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@ foundry_out := $(foundry_dir)/out

test-foundry: KEVM_OPTS += --pyk --verbose
test-foundry: KEVM = $(POETRY_RUN) kevm
test-foundry: tests/foundry/foundry.k.check tests/foundry/out/kompiled/foundry.k.prove
test-foundry: \
tests/foundry/foundry.k.check \
tests/foundry/out/kompiled/foundry.k.prove

foundry-forge-build: $(foundry_out)

Expand All @@ -499,6 +501,10 @@ $(foundry_out):
rm -rf $@
cd $(dir $@) && forge build

tests/foundry/interactive.out.check: tests/foundry/out/kompiled/timestamp $(KEVM_BIN)/kevm
$(POETRY_RUN) ./tests/foundry/test-foundry.sh > interactive.out
$(CHECK) tests/foundry/interactive.out tests/foundry/interactive.expected

tests/foundry/foundry.k.check: tests/foundry/out/kompiled/foundry.k
grep --invert-match ' rule ( #binRuntime (' $< > [email protected]
$(CHECK) [email protected] [email protected]
Expand Down
107 changes: 78 additions & 29 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
pyk.url = "github:runtimeverification/pyk/v0.1.204";
pyk.inputs.flake-utils.follows = "k-framework/flake-utils";
pyk.inputs.nixpkgs.follows = "k-framework/nixpkgs";

foundry.url = "github:shazow/foundry.nix";
};
outputs = { self, k-framework, haskell-backend, nixpkgs, flake-utils, poetry2nix
, blockchain-k-plugin, ethereum-tests, ethereum-legacytests, rv-utils, pyk
, blockchain-k-plugin, ethereum-tests, ethereum-legacytests, rv-utils, pyk, foundry
}:
let
buildInputs = pkgs: k:
Expand Down Expand Up @@ -120,7 +120,7 @@

enableParallelBuilding = true;

buildInputs = [ (final.kevm k) prev.which prev.git ];
buildInputs = [ (final.kevm k) prev.which prev.git prev.curl ];

buildPhase = ''
mkdir -p tests/ethereum-tests/LegacyTests
Expand Down Expand Up @@ -166,6 +166,7 @@
blockchain-k-plugin.overlay
poetry2nix.overlay
pyk.overlay
foundry.overlay
overlay
];
};
Expand Down
Loading