diff --git a/src/lib.rs b/src/lib.rs index afd2a2b..c5334dc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -423,4 +423,27 @@ mod tests { install(&version).await.unwrap(); t.await.unwrap().unwrap(); } + + // ensures we can download the latest native solc for apple silicon + #[tokio::test(flavor = "multi_thread")] + async fn can_download_latest_native_apple_silicon() { + let latest: Version = "0.8.15".parse().unwrap(); + + let artifacts = all_releases(Platform::MacOsAarch64).await.unwrap(); + + let artifact = artifacts.releases.get(&latest).unwrap(); + let download_url = artifact_url( + Platform::MacOsAarch64, + &latest, + artifact.to_string().as_str(), + ) + .unwrap(); + + let checksum = artifacts.get_checksum(&latest).unwrap(); + + let resp = reqwest::get(download_url).await.unwrap(); + assert!(resp.status().is_success()); + let binbytes = resp.bytes().await.unwrap(); + ensure_checksum(&binbytes, &latest, checksum).unwrap(); + } } diff --git a/src/releases.rs b/src/releases.rs index 940e107..66fe731 100644 --- a/src/releases.rs +++ b/src/releases.rs @@ -35,10 +35,10 @@ static LINUX_AARCH64_RELEASES: Lazy = Lazy::new(|| { static MACOS_AARCH64_NATIVE: Lazy = Lazy::new(|| Version::new(0, 8, 5)); static MACOS_AARCH64_URL_PREFIX: &str = - "https://github.com/roynalnaruto/solc-builds/raw/9cb46201533a2cb739059e09b5d9c211cfc62c4e/macosx/aarch64"; + "https://github.com/roynalnaruto/solc-builds/raw/7c716cc2f619fee991723c7341d97f58413ab953/macosx/aarch64"; static MACOS_AARCH64_RELEASES_URL: &str = - "https://github.com/roynalnaruto/solc-builds/raw/9cb46201533a2cb739059e09b5d9c211cfc62c4e/macosx/aarch64/list.json"; + "https://github.com/roynalnaruto/solc-builds/raw/7c716cc2f619fee991723c7341d97f58413ab953/macosx/aarch64/list.json"; /// Defines the struct that the JSON-formatted release list can be deserialized into. ///