Compare commits

...

3 Commits

Author SHA1 Message Date
Nathan McCarty 0e71949bc1
Comment clarification 2023-05-16 15:58:42 -04:00
Nathan McCarty 1f18ca97fe
Clean up flake structure a little bit 2023-05-16 15:57:26 -04:00
Nathan McCarty 30e29cc5d0
Fix updater to correctly handle aarch64
Now properly handles if a release isn't available for a particular target.
2023-05-16 15:44:38 -04:00
4 changed files with 89 additions and 107 deletions

View File

@ -76,29 +76,20 @@
'';
};
in with import nixpkgs { system = system; }; {
packages.temurin =
(builtins.mapAttrs (name: value: buildAdoptLike name value)
packages = {
temurin = (builtins.mapAttrs (name: value: buildAdoptLike name value)
sources.${system}.temurin.versions) // {
latest = buildAdoptLike "latest" sources.${system}.temurin.latest;
stable = buildAdoptLike "stable" sources.${system}.temurin.stable;
lts = buildAdoptLike "lts" sources.${system}.temurin.lts;
};
packages.temurin-latest = self.packages.${system}.temurin.latest;
packages.temurin-stable = self.packages.${system}.temurin.stable;
packages.temurin-lts = self.packages.${system}.temurin.lts;
packages.semeru =
(builtins.mapAttrs (name: value: buildAdoptLike name value)
semeru = (builtins.mapAttrs (name: value: buildAdoptLike name value)
sources.${system}.semeru.versions) // {
latest = buildAdoptLike "latest" sources.${system}.semeru.latest;
stable = buildAdoptLike "stable" sources.${system}.semeru.stable;
lts = buildAdoptLike "lts" sources.${system}.semeru.lts;
};
packages.semeru-latest = self.packages.${system}.semeru.latest;
packages.semeru-stable = self.packages.${system}.semeru.stable;
packages.semeru-lts = self.packages.${system}.semeru.lts;
};
defaultPackage = self.packages.${system}.temurin.stable;
});

View File

@ -2,159 +2,129 @@
"aarch64-linux": {
"semeru": {
"versions": {
"jdk10": {
"link": "https://github.com/AdoptOpenJDK/openjdk10-openj9-releases/releases/download/jdk-10.0.2%2B13_openj9-0.9.0/OpenJDK10-OPENJ9_x64_Linux_jdk-10.0.2.13_openj9-0.9.0.tar.gz",
"major_version": 10,
"sha256": "1ef0dab3853b2f3666091854ef8149fcb85970254558d5d62cfa9446831779d1",
"java_version": "10.0.2+13"
},
"jdk11": {
"link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.18%2B10_openj9-0.36.1/ibm-semeru-open-jdk_x64_linux_11.0.18_10_openj9-0.36.1.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.18%2B10_openj9-0.36.1/ibm-semeru-open-jdk_aarch64_linux_11.0.18_10_openj9-0.36.1.tar.gz",
"major_version": 11,
"sha256": "256135d0992f23acaf61cf955325e6a899ebbd41bb2c7fdd2fe7ac4c2ee55e38",
"sha256": "499594963aeb85293992f1ee95856f0f1642fd4de350e36766616fc47098fd02",
"java_version": "11.0.18+10"
},
"jdk12": {
"link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10_openj9-0.15.1/OpenJDK12U-jdk_x64_linux_openj9_12.0.2_10_openj9-0.15.1.tar.gz",
"major_version": 12,
"sha256": "e2f6f021560ddf217c60980ac147856e5b36f0ab0a0fd70091800d6042136229",
"java_version": "12.0.2+10"
},
"jdk13": {
"link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jdk_x64_linux_openj9_13.0.2_8_openj9-0.18.0.tar.gz",
"major_version": 13,
"sha256": "aeecf6d30d0c847db81d07793cf97e5dc44890c29366d7d9f8f9f397f6c52590",
"java_version": "13.0.2+8"
},
"jdk14": {
"link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12_openj9-0.21.0/OpenJDK14U-jdk_x64_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz",
"major_version": 14,
"sha256": "306f7138cdb65daaf2596ec36cafbde72088144c83b2e964f0193662e6caf3be",
"java_version": "14.0.2+12"
},
"jdk15": {
"link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_x64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7_openj9-0.24.0/OpenJDK15U-jdk_aarch64_linux_openj9_15.0.2_7_openj9-0.24.0.tar.gz",
"major_version": 15,
"sha256": "5515ccd79b1b5e8d8a615b80d5fe1272f7bb41100e46d94fb78ee611ea014816",
"java_version": "15.0.2+7"
"sha256": "b69a4bc87ed2e985d252cff02d53f1a11b8d83d39e0800cd4a1cab4521375314",
"java_version": "15.0.2-ea+7"
},
"jdk16": {
"link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz",
"major_version": 16,
"sha256": "1349eb9a1d9af491a1984d66a80126730357c4a5c4fcbe7112a2c832f6c0886e",
"java_version": "16.0.2+7"
"sha256": "022cda1210331488c3db3d0d1282ea74467397fdabc34cb482cdfe81c45f6a15",
"java_version": "16.0.2-ea+7"
},
"jdk17": {
"link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.6%2B10_openj9-0.36.0/ibm-semeru-open-jdk_x64_linux_17.0.6_10_openj9-0.36.0.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.6%2B10_openj9-0.36.0/ibm-semeru-open-jdk_aarch64_linux_17.0.6_10_openj9-0.36.0.tar.gz",
"major_version": 17,
"sha256": "ce39a4f7c2e08e56083f17f3e44c05e0fbbeba775e670f015a337679c99c54c6",
"sha256": "7c6ef5b4989313b2e64b77613c13ec66a3fe85429732f63b6fe9f410d9e37d3c",
"java_version": "17.0.6+10"
},
"jdk18": {
"link": "https://github.com/AdoptOpenJDK/semeru18-binaries/releases/download/jdk-18.0.2%2B9_openj9-0.33.1/ibm-semeru-open-jdk_x64_linux_18.0.2_9_openj9-0.33.1.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru18-binaries/releases/download/jdk-18.0.2%2B9_openj9-0.33.1/ibm-semeru-open-jdk_aarch64_linux_18.0.2_9_openj9-0.33.1.tar.gz",
"major_version": 18,
"sha256": "b694d47666035b1f7870bc3749aa7c1903d50976eab3772fd81c32dab2aa8e64",
"sha256": "00e46a2b8be005eb03e3e4d939d4cf9b8331f22ee50ed75b84136d3f0ead7498",
"java_version": "18.0.2+9"
},
"jdk19": {
"link": "https://github.com/AdoptOpenJDK/semeru19-binaries/releases/download/jdk-19.0.2%2B7_openj9-0.37.0/ibm-semeru-open-jdk_x64_linux_19.0.2_7_openj9-0.37.0.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru19-binaries/releases/download/jdk-19.0.2%2B7_openj9-0.37.0/ibm-semeru-open-jdk_aarch64_linux_19.0.2_7_openj9-0.37.0.tar.gz",
"major_version": 19,
"sha256": "5fd94c57afe0d4e778bfc284f3f7830c34de59bed4faba12d4bb46a77d0b516e",
"sha256": "c20cd3c641eebc3e534fa4ce05b211fc8bcd011eb392ceda40d3fadd35f5f8d0",
"java_version": "19.0.2+7"
},
"jdk8": {
"link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u362-b09_openj9-0.36.0/ibm-semeru-open-jdk_x64_linux_8u362b09_openj9-0.36.0.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u362-b09_openj9-0.36.0/ibm-semeru-open-jdk_aarch64_linux_8u362b09_openj9-0.36.0.tar.gz",
"major_version": 8,
"sha256": "4c956f08cbe02d43a06536e9eae888925cc495a669bd024606389bec5ea6964a",
"sha256": "502b13e9ff9dae3984633ef1560b642d9836b8a0e7f5d84baf2d4a438d375360",
"java_version": "1.8.0_362-b09"
},
"jdk9": {
"link": "https://github.com/AdoptOpenJDK/openjdk9-openj9-releases/releases/download/jdk-9.0.4%2B12_openj9-0.9.0/OpenJDK9-OPENJ9_x64_Linux_jdk-9.0.4.12_openj9-0.9.0.tar.gz",
"major_version": 9,
"sha256": "d5bb41b7ed4fc1a6aba0914718aff4abec42acf18c776b7641efcbbb761e6e6b",
"java_version": "9.0.4+12"
}
},
"latest": {
"link": "https://github.com/AdoptOpenJDK/semeru19-binaries/releases/download/jdk-19.0.2%2B7_openj9-0.37.0/ibm-semeru-open-jdk_x64_linux_19.0.2_7_openj9-0.37.0.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru19-binaries/releases/download/jdk-19.0.2%2B7_openj9-0.37.0/ibm-semeru-open-jdk_aarch64_linux_19.0.2_7_openj9-0.37.0.tar.gz",
"major_version": 19,
"sha256": "5fd94c57afe0d4e778bfc284f3f7830c34de59bed4faba12d4bb46a77d0b516e",
"sha256": "c20cd3c641eebc3e534fa4ce05b211fc8bcd011eb392ceda40d3fadd35f5f8d0",
"java_version": "19.0.2+7"
},
"stable": {
"link": "https://github.com/AdoptOpenJDK/semeru19-binaries/releases/download/jdk-19.0.2%2B7_openj9-0.37.0/ibm-semeru-open-jdk_x64_linux_19.0.2_7_openj9-0.37.0.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru19-binaries/releases/download/jdk-19.0.2%2B7_openj9-0.37.0/ibm-semeru-open-jdk_aarch64_linux_19.0.2_7_openj9-0.37.0.tar.gz",
"major_version": 19,
"sha256": "5fd94c57afe0d4e778bfc284f3f7830c34de59bed4faba12d4bb46a77d0b516e",
"sha256": "c20cd3c641eebc3e534fa4ce05b211fc8bcd011eb392ceda40d3fadd35f5f8d0",
"java_version": "19.0.2+7"
},
"lts": {
"link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.6%2B10_openj9-0.36.0/ibm-semeru-open-jdk_x64_linux_17.0.6_10_openj9-0.36.0.tar.gz",
"link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.6%2B10_openj9-0.36.0/ibm-semeru-open-jdk_aarch64_linux_17.0.6_10_openj9-0.36.0.tar.gz",
"major_version": 17,
"sha256": "ce39a4f7c2e08e56083f17f3e44c05e0fbbeba775e670f015a337679c99c54c6",
"sha256": "7c6ef5b4989313b2e64b77613c13ec66a3fe85429732f63b6fe9f410d9e37d3c",
"java_version": "17.0.6+10"
}
},
"temurin": {
"versions": {
"jdk11": {
"link": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.19_7.tar.gz",
"link": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.19%2B7/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.19_7.tar.gz",
"major_version": 11,
"sha256": "5f19fb28aea3e28fcc402b73ce72f62b602992d48769502effe81c52ca39a581",
"sha256": "0c7763a19b4af4ef5fbae831781b5184e988d6f131d264482399eeaf51b6e254",
"java_version": "11.0.19+7"
},
"jdk16": {
"link": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz",
"link": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_aarch64_linux_hotspot_16.0.2_7.tar.gz",
"major_version": 16,
"sha256": "323d6d7474a359a28eff7ddd0df8e65bd61554a8ed12ef42fd9365349e573c2c",
"sha256": "cb77d9d126f97898dfdc8b5fb694d1e0e5d93d13a0a6cb2aeda76f8635384340",
"java_version": "16.0.2+7"
},
"jdk17": {
"link": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz",
"link": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.7_7.tar.gz",
"major_version": 17,
"sha256": "e9458b38e97358850902c2936a1bb5f35f6cffc59da9fcd28c63eab8dbbfbc3b",
"sha256": "0084272404b89442871e0a1f112779844090532978ad4d4191b8d03fc6adfade",
"java_version": "17.0.7+7"
},
"jdk18": {
"link": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_x64_linux_hotspot_18.0.2.1_1.tar.gz",
"link": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_aarch64_linux_hotspot_18.0.2.1_1.tar.gz",
"major_version": 18,
"sha256": "7d6beba8cfc0a8347f278f7414351191a95a707d46b6586e9a786f2669af0f8b",
"sha256": "262be608e266fd76d7496af83b2832be853c3aaf7460d6a4da198cd40db74553",
"java_version": "18.0.2.1+1"
},
"jdk19": {
"link": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_x64_linux_hotspot_19.0.2_7.tar.gz",
"link": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_aarch64_linux_hotspot_19.0.2_7.tar.gz",
"major_version": 19,
"sha256": "3a3ba7a3f8c3a5999e2c91ea1dca843435a0d1c43737bd2f6822b2f02fc52165",
"sha256": "1c4be9aa173cb0deb0d215643d9509c8900e5497290b29eee4bee335fa57984f",
"java_version": "19.0.2+7"
},
"jdk20": {
"link": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.1%2B9/OpenJDK20U-jdk_x64_linux_hotspot_20.0.1_9.tar.gz",
"link": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.1%2B9/OpenJDK20U-jdk_aarch64_linux_hotspot_20.0.1_9.tar.gz",
"major_version": 20,
"sha256": "43ad054f135a7894dc87ad5d10ad45d8e82846186515892acdbc17c2c5cd27e4",
"sha256": "b16c0271899de1f0e277dc0398bfff11b54511765f104fa938929ac484dc926d",
"java_version": "20.0.1+9"
},
"jdk8": {
"link": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_x64_linux_hotspot_8u372b07.tar.gz",
"link": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jdk_aarch64_linux_hotspot_8u372b07.tar.gz",
"major_version": 8,
"sha256": "78a0b3547d6f3d46227f2ad8c774248425f20f1cd63f399b713f0cdde2cc376c",
"sha256": "195808eb42ab73535c84de05188914a52a47c1ac784e4bf66de95fe1fd315a5a",
"java_version": "1.8.0_372-b07"
}
},
"latest": {
"link": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk20u-2023-05-10-08-56-beta/OpenJDK20U-jdk_x64_linux_hotspot_2023-05-10-08-56.tar.gz",
"link": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk20u-2023-05-10-08-56-beta/OpenJDK20U-jdk_aarch64_linux_hotspot_2023-05-10-08-56.tar.gz",
"major_version": 20,
"sha256": "d73db1554c637bf1619cd0e23f27e3e236ab505359934afbf7abe0cd357288c9",
"sha256": "e960a51dbc2d1f984eabbdf964af54481bf3eb697c3a4a8aedf3cdfb3c6af8ab",
"java_version": "20.0.1-beta+9-202305100346"
},
"stable": {
"link": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.1%2B9/OpenJDK20U-jdk_x64_linux_hotspot_20.0.1_9.tar.gz",
"link": "https://github.com/adoptium/temurin20-binaries/releases/download/jdk-20.0.1%2B9/OpenJDK20U-jdk_aarch64_linux_hotspot_20.0.1_9.tar.gz",
"major_version": 20,
"sha256": "43ad054f135a7894dc87ad5d10ad45d8e82846186515892acdbc17c2c5cd27e4",
"sha256": "b16c0271899de1f0e277dc0398bfff11b54511765f104fa938929ac484dc926d",
"java_version": "20.0.1+9"
},
"lts": {
"link": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz",
"link": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.7_7.tar.gz",
"major_version": 17,
"sha256": "e9458b38e97358850902c2936a1bb5f35f6cffc59da9fcd28c63eab8dbbfbc3b",
"sha256": "0084272404b89442871e0a1f112779844090532978ad4d4191b8d03fc6adfade",
"java_version": "17.0.7+7"
}
}

View File

@ -7,7 +7,7 @@ use color_eyre::{
};
use isahc::HttpClient;
use serde::{Deserialize, Serialize};
use tracing::{debug, error, instrument, trace, warn};
use tracing::{debug, error, info, instrument, trace, warn};
/// Abstraction over an adoptium API instance
#[derive(custom_debug::Debug)]
@ -58,18 +58,21 @@ impl AdoptiumAPI {
}
/// Return the most recent version for the specified release and architecture
#[instrument(skip(arch, os), fields(arch = arch.as_ref(), os = os.as_ref()))]
pub async fn release(
&self,
version: u32,
arch: impl AsRef<str>,
os: impl AsRef<str>,
pre_release: bool,
) -> Result<Version> {
let release_type = if pre_release { "ea" } else { "ga" };
let arch = arch.as_ref();
let os = os.as_ref();
let version = format!("[{version}, {})", version + 1);
let version = urlencoding::encode(&version);
let url = format!(
"{}/v3/info/release_versions?architecture={arch}&heap_size=normal&image_type=jdk&os_type=linux&project=jdk&release_type={release_type}&sort_method=DATE&sort_order=DESC&jvm_impl={}&version={version}",
"{}/v3/info/release_versions?architecture={arch}&heap_size=normal&image_type=jdk&os_type={os}&project=jdk&release_type={release_type}&sort_method=DATE&sort_order=DESC&jvm_impl={}&version={version}",
self.base_url,
self.jvm_impl,
);
@ -90,18 +93,20 @@ impl AdoptiumAPI {
}
/// Return latest release
#[instrument(skip(arch), fields(arch = arch.as_ref()))]
#[instrument(skip(arch, os), fields(arch = arch.as_ref(), os = os.as_ref()))]
pub async fn latest(
&self,
version: u32,
arch: impl AsRef<str>,
os: impl AsRef<str>,
pre_release: bool,
) -> Result<Release> {
let release_type = if pre_release { "ea" } else { "ga" };
debug!(?release_type);
let arch = arch.as_ref();
let os = os.as_ref();
let url = format!(
"{}/v3/assets/feature_releases/{version}/{release_type}?architecture={arch}&heap_size=normal&image_type=jdk&os=linux&page=0&page_size=10&project=jdk&sort_method=DATE&sort_order=DESC&jvm_impl={}",
"{}/v3/assets/feature_releases/{version}/{release_type}?architecture={arch}&heap_size=normal&image_type=jdk&os={os}&page=0&page_size=10&project=jdk&sort_method=DATE&sort_order=DESC&jvm_impl={}",
self.base_url,
self.jvm_impl
);
@ -146,49 +151,65 @@ impl AdoptiumAPI {
}
/// Get all versions
pub async fn get_all(&self, arch: impl AsRef<str>) -> Result<OutputReleases> {
#[instrument(skip(arch, os), fields(arch = arch.as_ref(), os = os.as_ref()))]
pub async fn get_all(
&self,
arch: impl AsRef<str>,
os: impl AsRef<str>,
) -> Result<OutputReleases> {
let input_versions = self
.available_releases()
.await
.context("Failed to get releases")?;
let arch = arch.as_ref();
let os = os.as_ref();
info!(?input_versions, "Getting versions");
let mut versions: BTreeMap<String, OutputRelease> = BTreeMap::new();
for release in &input_versions.available_releases {
let output_release: OutputRelease = self
.latest(*release, arch, false)
.await
.context("Failed to get version")?
.into();
versions.insert(
format!("jdk{}", output_release.major_version),
output_release,
);
match self.latest(*release, arch, os, false).await {
Ok(output_release) => {
let output_release: OutputRelease = output_release.into();
trace!(?output_release, "Inserting version");
versions.insert(
format!("jdk{}", output_release.major_version),
output_release,
);
}
Err(e) => {
warn!(?e, ?release, "Version not available for os/architecture");
}
};
}
info!("Getting latest");
let latest: OutputRelease = match self
.latest(input_versions.most_recent_feature_version, arch, true)
.latest(input_versions.most_recent_feature_version, arch, os, true)
.await
{
Ok(x) => x.into(),
Err(_) => self
.latest(input_versions.most_recent_feature_release, arch, false)
.latest(input_versions.most_recent_feature_release, arch, os, false)
.await
.context("Failed to get latest version")?
.into(),
};
info!("Getting stable");
let stable: OutputRelease = self
.latest(
input_versions.available_releases[input_versions.available_releases.len() - 1],
arch,
os,
false,
)
.await
.context("Failed to get version - stable")?
.into();
info!("Getting lts");
let lts: OutputRelease = self
.latest(
input_versions.available_lts_releases
[input_versions.available_lts_releases.len() - 1],
arch,
os,
false,
)
.await

View File

@ -22,38 +22,38 @@ async fn main() -> Result<()> {
// Create the api instances
let adoptium = AdoptiumAPI::adoptium().context("Creating api")?;
let semeru = AdoptiumAPI::semeru().context("Creating api")?;
// Fill in x86_64 first
// Fill in x86_64-linux first
{
let x86_64 = output.entry("x86_64-linux".to_string()).or_default();
x86_64.insert(
"temurin".to_string(),
adoptium
.get_all("x64")
.get_all("x64", "linux")
.await
.context("Failed getting x86_64 adopt releases")?,
);
x86_64.insert(
"semeru".to_string(),
semeru
.get_all("x64")
.get_all("x64", "linux")
.await
.context("Failed getting x86_64 adopt releases")?,
);
}
// Then aarch64
// Then aarch64-linux
{
let aarch64 = output.entry("aarch64-linux".to_string()).or_default();
aarch64.insert(
"temurin".to_string(),
adoptium
.get_all("x64")
.get_all("aarch64", "linux")
.await
.context("Failed getting aarch64 adopt releases")?,
);
aarch64.insert(
"semeru".to_string(),
semeru
.get_all("x64")
.get_all("aarch64", "linux")
.await
.context("Failed getting aarch64 adopt releases")?,
);