From 1c18dbe97172ffa10c9ef6e918c4b039bcf6a7ee Mon Sep 17 00:00:00 2001 From: xermicus Date: Tue, 4 Jun 2024 22:04:31 +0200 Subject: [PATCH 1/2] run all tests on CI Signed-off-by: xermicus --- .github/workflows/rust.yml | 7 +++++-- Makefile | 2 +- README.md | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 520d4691..5c1758d2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -40,5 +40,8 @@ jobs: - name: Clippy run: make clippy - - name: Integration - run: make test-integration + - name: Test cargo workspace + run: make test-workspace + + - name: Test CLI + run: make test-cli diff --git a/Makefile b/Makefile index 92f1e1bb..0eeb5f59 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ install-npm: format: cargo fmt --all --check -test: format install test-cli test-workspace +test: format clippy test-cli test-workspace cargo test --workspace test-integration: install-bin diff --git a/README.md b/README.md index 3e9a5d95..52298962 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,8 @@ resolc --version ### Development -Please consult the [Makefile](Makefile) targets to learn how to run tests and benchmarks. +Please consult the [Makefile](Makefile) targets to learn how to run tests and benchmarks. +Ensure that your branch passes `make test` locally when submitting a pull request. ## Design overview `revive` uses [solc](https://github.com/ethereum/solidity/), the Ethereum Solidity compiler, as the [Solidity frontend](crates/solidity/src/lib.rs) to process smart contracts written in Solidity. The YUL IR code (or legacy EVM assembly as a fallback for older `solc` versions) emitted by `solc` is then translated to LLVM IR, targetting a runtime similar to [Polkadots `contracts` pallet](https://docs.rs/pallet-contracts/latest/pallet_contracts/api_doc/trait.Current.html). From 8637554402397e352cbcfc3d606a11d444b2941f Mon Sep 17 00:00:00 2001 From: xermicus Date: Wed, 5 Jun 2024 00:42:42 +0200 Subject: [PATCH 2/2] on ubuntu needs explict linking against libtinfo Signed-off-by: xermicus --- crates/integration/codesize.json | 6 +++--- crates/lld-sys/build.rs | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/integration/codesize.json b/crates/integration/codesize.json index cd688579..3c103b7f 100644 --- a/crates/integration/codesize.json +++ b/crates/integration/codesize.json @@ -1,10 +1,10 @@ { "Baseline": 934, "Computation": 4360, - "DivisionArithmetics": 39448, - "ERC20": 46512, + "DivisionArithmetics": 39824, + "ERC20": 46356, "Events": 1749, "FibonacciIterative": 2973, "Flipper": 3549, - "SHA1": 32709 + "SHA1": 32543 } \ No newline at end of file diff --git a/crates/lld-sys/build.rs b/crates/lld-sys/build.rs index 1b332625..bb5c9f60 100644 --- a/crates/lld-sys/build.rs +++ b/crates/lld-sys/build.rs @@ -27,7 +27,10 @@ fn set_rustc_link_flags() { } #[cfg(target_os = "linux")] - println!("cargo:rustc-link-lib=dylib=stdc++"); + { + println!("cargo:rustc-link-lib=dylib=stdc++"); + println!("cargo:rustc-link-lib=tinfo"); + } } fn main() {