Skip to content

Commit

Permalink
feat: patch svm-rs with 0.8.17 (foundry-rs#3188)
Browse files Browse the repository at this point in the history
* feat: patch svm-rs with 0.8.17

* ci: git config
  • Loading branch information
mattsse authored Sep 12, 2022
1 parent 63c71b4 commit 152e200
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ jobs:
with:
path: "$HOME/.foundry/cache"
key: rpc-cache-${{ hashFiles('cli/tests/rpc-cache-keyfile') }}

- name: Setup git config
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "<>"
- name: Force use of HTTPS for submodules
run: git config --global url."https://github.com/".insteadOf "[email protected]:"

Expand Down
5 changes: 2 additions & 3 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ debug = 0
[patch.crates-io]
#revm = { path = "../revm/crates/revm" }
#revm = { git = "https://github.com/bluealloy/revm" }
svm-rs = { git = "https://github.com/roynalnaruto/svm-rs" }
29 changes: 28 additions & 1 deletion cli/tests/it/svm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! svm sanity checks
use foundry_cli_test_utils::{forgetest_init, TestCommand, TestProject};
use semver::Version;
use svm::{self, Platform};

Expand All @@ -10,7 +11,7 @@ use svm::{self, Platform};
/// 2. svm updated with all build info
/// 3. svm bumped in ethers-rs
/// 4. ethers bumped in foundry + update the `LATEST_SOLC`
const LATEST_SOLC: Version = Version::new(0, 8, 16);
const LATEST_SOLC: Version = Version::new(0, 8, 17);

macro_rules! ensure_svm_releases {
($($test:ident => $platform:ident),*) => {
Expand Down Expand Up @@ -43,3 +44,29 @@ ensure_svm_releases!(
test_svm_releases_macos_aarch64 => MacOsAarch64,
test_svm_releases_windows_amd64 => WindowsAmd64
);

// Ensures we can always test with the latest solc build
forgetest_init!(can_test_with_latest_solc, |prj: TestProject, mut cmd: TestCommand| {
prj.inner()
.add_test(
"Counter",
r#"
// SPDX-License-Identifier: UNLICENSED
pragma solidity =<VERSION>;
import "forge-std/Test.sol";
contract CounterTest is Test {
function testAssert() public {
assert(true);
}
}
"#
.replace("<VERSION>", &LATEST_SOLC.to_string()),
)
.unwrap();

cmd.args(["test"]);
cmd.stdout().contains("[PASS]")
});

0 comments on commit 152e200

Please sign in to comment.