From 3fbf2833c27d3f8ec8eefb24886a8a9a3d49ecbf Mon Sep 17 00:00:00 2001 From: Chris <100840345+0xf333@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:00:44 -0400 Subject: [PATCH] feat: streamline bin updates during developement (#5) * feat: streamline bin updates during developement Description =========== This PR introduces a way for the 'zksolc' binary to automatically be updated/copied to '.cargo/bin' after each build to resolves the issue of having to manually update the $PATH or each time keep running `cargo install --path crates/solidity`, which was a recurring annoyance during testing and development. Co-authored-by: Cyrill Leutwiler --- Makefile | 23 +++++++++++++++++++++++ README.md | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ff0ea7d --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +.PHONY: install test test-solidity test-cli test-integration clean + +install: + cargo install --path crates/solidity && \ + npm install && npm fund + +test: install test-integration test-cli test-solidity + +test-integration: install + cargo test --package revive-integration + +test-solidity: install + cargo test --package revive-solidity + +test-cli: install + npm run test:cli + +clean: + cargo clean && \ + rm -rf node_modules && \ + rm -rf crates/solidity/src/tests/cli-tests/artifacts && \ + cargo uninstall revive-solidity && \ + rm -f package-lock.json \ No newline at end of file diff --git a/README.md b/README.md index 33565de..7dc7748 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The project is in a very early PoC phase. Don't yet expect the produced code to - [ ] Use `drink` for integration tests once we have 64bit support in PolkaVM - [x] Use PolkaVM allocator for heap space - [ ] Exercice `schlau` and possibly `smart-bench` benchmark cases -- [ ] Tests currently rely on the binary being in $PATH, which is very annoying and requires `cargo install` all the times +- [x] Tests currently rely on the binary being in $PATH, which is very annoying and requires `cargo install` all the times - [ ] Define how to do deployments - [ ] Calling conventions for calling other contracts - [ ] Runtime environment isn't fully figured out; implement all EVM builtins