From 03352ca202cd6c7634fc96315ffe3481627e40bb Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 21 Aug 2025 13:18:48 +0200 Subject: [PATCH 1/5] ci: enable testing for aarch64 linux --- .github/scripts/matrices.py | 7 ++++--- crates/cast/tests/cli/main.rs | 38 +++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.github/scripts/matrices.py b/.github/scripts/matrices.py index 4ad0c3acc34dc..0f4aa66ca2bee 100755 --- a/.github/scripts/matrices.py +++ b/.github/scripts/matrices.py @@ -68,11 +68,12 @@ def __init__( profile = os.environ.get("PROFILE") is_pr = os.environ.get("EVENT_NAME") == "pull_request" t_linux_x86 = Target("ubuntu-latest", "x86_64-unknown-linux-gnu", "linux-amd64") -# TODO: Figure out how to make this work -# t_linux_arm = Target("ubuntu-latest", "aarch64-unknown-linux-gnu", "linux-aarch64") +# ARM Linux runners are now available for free in public repositories +# using ubuntu-24.04-arm and ubuntu-22.04-arm runner labels +t_linux_arm = Target("ubuntu-24.04-arm", "aarch64-unknown-linux-gnu", "linux-aarch64") t_macos = Target("macos-latest", "aarch64-apple-darwin", "macosx-aarch64") t_windows = Target("windows-latest", "x86_64-pc-windows-msvc", "windows-amd64") -targets = [t_linux_x86, t_windows] if is_pr else [t_linux_x86, t_macos, t_windows] +targets = [t_linux_x86, t_linux_arm, t_windows] if is_pr else [t_linux_x86, t_linux_arm, t_macos, t_windows] config = [ Case( diff --git a/crates/cast/tests/cli/main.rs b/crates/cast/tests/cli/main.rs index 69b3181db6686..b076cee5d8e8b 100644 --- a/crates/cast/tests/cli/main.rs +++ b/crates/cast/tests/cli/main.rs @@ -3146,29 +3146,33 @@ forgetest_async!(cast_run_impersonated_tx, |_prj, cmd| { }); // -casttest!(fetch_src_blockscout, |_prj, cmd| { - let url = "https://eth.blockscout.com/api"; - - let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"); - - cmd.args([ - "source", - &weth.to_string(), - "--chain-id", - "1", - "--explorer-api-url", - url, - "--flatten", - ]) - .assert_success() - .stdout_eq(str![[r#" +casttest!( + #[cfg_attr(all(target_os = "linux", target_arch = "aarch64"), ignore = "no 0.4 solc")] + fetch_src_blockscout, + |_prj, cmd| { + let url = "https://eth.blockscout.com/api"; + + let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"); + + cmd.args([ + "source", + &weth.to_string(), + "--chain-id", + "1", + "--explorer-api-url", + url, + "--flatten", + ]) + .assert_success() + .stdout_eq(str![[r#" ... contract WETH9 { string public name = "Wrapped Ether"; string public symbol = "WETH"; uint8 public decimals = 18; ..."#]]); -}); + } +); casttest!(fetch_src_default, |_prj, cmd| { let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"); From ece1ef11247765fcdee1069f45566072258f86bd Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 21 Aug 2025 13:24:45 +0200 Subject: [PATCH 2/5] nff --- .github/scripts/matrices.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/scripts/matrices.py b/.github/scripts/matrices.py index 0f4aa66ca2bee..7c697b8c54f50 100755 --- a/.github/scripts/matrices.py +++ b/.github/scripts/matrices.py @@ -68,12 +68,14 @@ def __init__( profile = os.environ.get("PROFILE") is_pr = os.environ.get("EVENT_NAME") == "pull_request" t_linux_x86 = Target("ubuntu-latest", "x86_64-unknown-linux-gnu", "linux-amd64") -# ARM Linux runners are now available for free in public repositories -# using ubuntu-24.04-arm and ubuntu-22.04-arm runner labels t_linux_arm = Target("ubuntu-24.04-arm", "aarch64-unknown-linux-gnu", "linux-aarch64") t_macos = Target("macos-latest", "aarch64-apple-darwin", "macosx-aarch64") t_windows = Target("windows-latest", "x86_64-pc-windows-msvc", "windows-amd64") -targets = [t_linux_x86, t_linux_arm, t_windows] if is_pr else [t_linux_x86, t_linux_arm, t_macos, t_windows] +targets = ( + [t_linux_x86, t_linux_arm, t_windows] + if is_pr + else [t_linux_x86, t_linux_arm, t_macos, t_windows] +) config = [ Case( @@ -121,11 +123,13 @@ def main(): s = f"{partition}/{case.n_partitions}" name += f" ({s})" flags += f" --partition count:{s}" - + if profile == "isolate": flags += " --features=isolate-by-default" name += os_str + flags += " --no-fail-fast" + obj = Expanded( name=name, runner_label=target.runner_label, From 59b83ea402e5fa7a48fbff5e91cf8d06f01a6aad Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 21 Aug 2025 13:36:37 +0200 Subject: [PATCH 3/5] tmp --- .github/scripts/matrices.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/scripts/matrices.py b/.github/scripts/matrices.py index 7c697b8c54f50..32b0b837e5da4 100755 --- a/.github/scripts/matrices.py +++ b/.github/scripts/matrices.py @@ -71,11 +71,7 @@ def __init__( t_linux_arm = Target("ubuntu-24.04-arm", "aarch64-unknown-linux-gnu", "linux-aarch64") t_macos = Target("macos-latest", "aarch64-apple-darwin", "macosx-aarch64") t_windows = Target("windows-latest", "x86_64-pc-windows-msvc", "windows-amd64") -targets = ( - [t_linux_x86, t_linux_arm, t_windows] - if is_pr - else [t_linux_x86, t_linux_arm, t_macos, t_windows] -) +targets = [t_linux_arm] if is_pr else [t_linux_x86, t_linux_arm, t_macos, t_windows] config = [ Case( @@ -94,13 +90,13 @@ def __init__( name="integration / issue-repros", filter="package(=forge) & test(/\\bissue/)", n_partitions=2, - pr_cross_platform=False, + pr_cross_platform=True, ), Case( name="integration / external", filter="package(=forge) & test(/\\bext_integration/)", n_partitions=2, - pr_cross_platform=False, + pr_cross_platform=True, ), ] From 08675d84738689ad956ed1143cacba765997f186 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 21 Aug 2025 14:11:38 +0200 Subject: [PATCH 4/5] fix --- crates/cast/tests/cli/main.rs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/crates/cast/tests/cli/main.rs b/crates/cast/tests/cli/main.rs index b076cee5d8e8b..bc18a938be16c 100644 --- a/crates/cast/tests/cli/main.rs +++ b/crates/cast/tests/cli/main.rs @@ -3174,11 +3174,20 @@ contract WETH9 { } ); -casttest!(fetch_src_default, |_prj, cmd| { - let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"); - let etherscan_api_key = next_etherscan_api_key(); +casttest!( + #[cfg_attr(all(target_os = "linux", target_arch = "aarch64"), ignore = "no 0.4 solc")] + fetch_src_default, + |_prj, cmd| { + let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"); + let etherscan_api_key = next_etherscan_api_key(); - cmd.args(["source", &weth.to_string(), "--flatten", "--etherscan-api-key", ðerscan_api_key]) + cmd.args([ + "source", + &weth.to_string(), + "--flatten", + "--etherscan-api-key", + ðerscan_api_key, + ]) .assert_success() .stdout_eq(str![[r#" ... @@ -3187,7 +3196,8 @@ contract WETH9 { string public symbol = "WETH"; uint8 public decimals = 18; ..."#]]); -}); + } +); // // From 66dced29267e85dca1fda36eb264d2d6f2bf2a05 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 21 Aug 2025 14:40:08 +0200 Subject: [PATCH 5/5] untmp --- .github/scripts/matrices.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/scripts/matrices.py b/.github/scripts/matrices.py index 32b0b837e5da4..b421fe8f3738c 100755 --- a/.github/scripts/matrices.py +++ b/.github/scripts/matrices.py @@ -71,7 +71,11 @@ def __init__( t_linux_arm = Target("ubuntu-24.04-arm", "aarch64-unknown-linux-gnu", "linux-aarch64") t_macos = Target("macos-latest", "aarch64-apple-darwin", "macosx-aarch64") t_windows = Target("windows-latest", "x86_64-pc-windows-msvc", "windows-amd64") -targets = [t_linux_arm] if is_pr else [t_linux_x86, t_linux_arm, t_macos, t_windows] +targets = ( + [t_linux_x86, t_windows] + if is_pr + else [t_linux_x86, t_linux_arm, t_macos, t_windows] +) config = [ Case( @@ -90,13 +94,13 @@ def __init__( name="integration / issue-repros", filter="package(=forge) & test(/\\bissue/)", n_partitions=2, - pr_cross_platform=True, + pr_cross_platform=False, ), Case( name="integration / external", filter="package(=forge) & test(/\\bext_integration/)", n_partitions=2, - pr_cross_platform=True, + pr_cross_platform=False, ), ] @@ -124,8 +128,6 @@ def main(): flags += " --features=isolate-by-default" name += os_str - flags += " --no-fail-fast" - obj = Expanded( name=name, runner_label=target.runner_label,