Compare commits

...

8 Commits

Author SHA1 Message Date
Taiki Endo
fe7bfc78d7 Release 2.44.72 2024-11-20 04:17:46 +09:00
Taiki Endo
b5ee2ee0c2 codegen: Remove needless clone 2024-11-20 04:10:19 +09:00
Taiki Endo
f0e0e09968 Update comments 2024-11-20 04:10:19 +09:00
Taiki Endo
adcdc5f593 hyperfine 1.19.0+ provides AArch64 macOS binary 2024-11-20 04:10:19 +09:00
Taiki Endo
6c9d919fa0 ci: Avoid buggy behavior of cygwin 2024-11-20 04:10:19 +09:00
Taiki Endo
a5ee591cfb Update cargo-dinghy@latest to 0.8.0 2024-11-20 04:10:19 +09:00
Taiki Endo
f725b9adf3 Update cargo-binstall@latest to 1.10.13 2024-11-18 21:17:20 +09:00
Taiki Endo
33a1d08515 Fix clippy::unnecessary_map_or warning
```
error: this `map_or` is redundant
  --> tools/codegen/src/main.rs:68:34
   |
68 |         if r.len() < per_page || version_req.map_or(false, |req| req == "latest") {
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `version_req.is_some_and(|req| req == "latest")`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
   = note: `-D clippy::unnecessary-map-or` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_map_or)]`
```
2024-11-17 13:31:13 +09:00
10 changed files with 72 additions and 44 deletions

View File

@@ -77,6 +77,12 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
# cross attempts to install rust-src when Cargo.toml is available even if `cross --version`
- run: rm Cargo.toml
- name: Generate tool list
id: tool-list
run: tools/ci/tool-list.sh "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.bash }}" >>"${GITHUB_OUTPUT}"
- run: |
printf '%s\n' 'C:\msys64\mingw32\bin' >>"${GITHUB_PATH}"
printf '%s\n' 'C:\msys64\usr\bin' >>"${GITHUB_PATH}"
@@ -86,12 +92,6 @@ jobs:
printf '%s\n' 'C:\tools\cygwin\bin' >>"${GITHUB_PATH}"
printf '%s\n' 'C:\tools\cygwin\usr\bin' >>"${GITHUB_PATH}"
if: matrix.bash == 'cygwin'
- uses: taiki-e/checkout-action@v1
# cross attempts to install rust-src when Cargo.toml is available even if `cross --version`
- run: rm Cargo.toml
- name: Generate tool list
id: tool-list
run: tools/ci/tool-list.sh "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.bash }}" >>"${GITHUB_OUTPUT}"
- run: env
- uses: ./
with:

View File

@@ -10,6 +10,12 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [2.44.72] - 2024-11-19
- Update `cargo-dinghy@latest` to 0.8.0.
- Update `cargo-binstall@latest` to 1.10.13.
## [2.44.71] - 2024-11-16
- Update `cargo-nextest@latest` to 0.9.84.
@@ -3078,7 +3084,8 @@ Note: This release is considered a breaking change because installing on version
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.44.71...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.44.72...HEAD
[2.44.72]: https://github.com/taiki-e/install-action/compare/v2.44.71...v2.44.72
[2.44.71]: https://github.com/taiki-e/install-action/compare/v2.44.70...v2.44.71
[2.44.70]: https://github.com/taiki-e/install-action/compare/v2.44.69...v2.44.70
[2.44.69]: https://github.com/taiki-e/install-action/compare/v2.44.68...v2.44.69

18
main.sh
View File

@@ -252,8 +252,8 @@ read_manifest() {
fi
;;
macos | windows)
# Binaries compiled for x86_64 macOS will usually also work on aarch64 macOS.
# Binaries compiled for x86_64 Windows will usually also work on aarch64 Windows 11+.
# Binaries compiled for x86_64 macOS will usually also work on AArch64 macOS.
# Binaries compiled for x86_64 Windows will usually also work on AArch64 Windows 11+.
host_platform="${host_arch}_${host_os}"
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
if [[ "${download_info}" == "null" ]] && [[ "${host_arch}" != "x86_64" ]]; then
@@ -499,19 +499,19 @@ esac
case "$(uname -m)" in
aarch64 | arm64) host_arch="aarch64" ;;
xscale | arm | armv*l)
# Ignore arm for now, as we need to consider the version and whether hard-float is supported.
# Ignore Arm for now, as we need to consider the version and whether hard-float is supported.
# https://github.com/rust-lang/rustup/pull/593
# https://github.com/cross-rs/cross/pull/1018
# Does it seem only armv7l+ is supported?
# https://github.com/actions/runner/blob/v2.315.0/src/Misc/externals.sh#L189
# https://github.com/actions/runner/blob/v2.321.0/src/Misc/externals.sh#L178
# https://github.com/actions/runner/issues/688
bail "32-bit ARM runner is not supported yet by this action; if you need support for this platform, please submit an issue at <https://github.com/taiki-e/install-action>"
bail "32-bit Arm runner is not supported yet by this action; if you need support for this platform, please submit an issue at <https://github.com/taiki-e/install-action>"
;;
# GitHub Actions Runner supports Linux (x86_64, aarch64, arm), Windows (x86_64, aarch64),
# and macOS (x86_64, aarch64).
# https://github.com/actions/runner/blob/v2.315.0/.github/workflows/build.yml#L21
# GitHub Actions Runner supports Linux (x86_64, AArch64, Arm), Windows (x86_64, AArch64),
# and macOS (x86_64, AArch64).
# https://github.com/actions/runner/blob/v2.321.0/.github/workflows/build.yml#L21
# https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners
# So we can assume x86_64 unless it is aarch64 or arm.
# So we can assume x86_64 unless it is AArch64 or Arm.
*) host_arch="x86_64" ;;
esac
info "host platform: ${host_arch}_${host_os}"

View File

@@ -22,32 +22,32 @@
},
"license_markdown": "[GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE)",
"latest": {
"version": "1.10.12"
"version": "1.10.13"
},
"1.10.12": {
"1.10.13": {
"x86_64_linux_musl": {
"etag": "0x8DD00A2C666B380",
"checksum": "f427555fc1bb271d3d2b2b1b50e52723df85ef3205420a1642b16d85b7a104a8"
"etag": "0x8DD07B8CE73D43F",
"checksum": "0e649badc8b9ade5f32be2afe1df9144fc4c1bb548b92eca71f0709baa240633"
},
"x86_64_macos": {
"etag": "0x8DD00A24B2B0205",
"checksum": "fa585cf2214d7d701e32a6afd68a82f720857d3bdc7c5140877711dbd84c90e3"
"etag": "0x8DD07B85D21C2C5",
"checksum": "e550b5ee473377eba343476e348998cc00f8f1785901c31cfe238ac0c7ba0be3"
},
"x86_64_windows": {
"etag": "0x8DD00A2FF44CE5F",
"checksum": "e503db82ee7e7f24082bc254406fe1ce72841ed46a58623f3e10790bb37a347b"
"etag": "0x8DD07B96F140678",
"checksum": "6c5272909b50bf93758a294c32195e8874494e5fa1ac5c741a103070c8d1d599"
},
"aarch64_linux_musl": {
"etag": "0x8DD00A25877DAA1",
"checksum": "83b2b803fa1818959d6cd813569b3f2e8949ed5b3a676f57f35ab7dd7e3994be"
"etag": "0x8DD07B8676B234D",
"checksum": "0aa68df492b79c07fd7764587200d8c85df61afbf8177b7471509792f043ab98"
},
"aarch64_macos": {
"etag": "0x8DD00A28DB4A836",
"checksum": "f6a14420a6fcf23cfc8b8716175066b8d51001bd6bccc295ae9e440717e5b62e"
"etag": "0x8DD07B88FD92077",
"checksum": "b3057055d33e443e6e07b23fea851a420dcb8c29338d1cb1e14401f91162bfe9"
},
"aarch64_windows": {
"etag": "0x8DD00A312BD798D",
"checksum": "7abca3d4aa5f50c51115edb65d374f711c87d74bb7647d38797204a99e50f69e"
"etag": "0x8DD07B958CFF416",
"checksum": "87704964c58847c9bf7f8fd5c9706dca67f4b20573d41c934bbf0194a19b5054"
}
}
}

View File

@@ -12,7 +12,20 @@
},
"license_markdown": "[MIT](https://github.com/sonos/dinghy/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/sonos/dinghy/blob/main/LICENSE-APACHE)",
"latest": {
"version": "0.7.3"
"version": "0.8.0"
},
"0.8": {
"version": "0.8.0"
},
"0.8.0": {
"x86_64_linux_musl": {
"etag": "0x8DD07EB5F95FDA4",
"checksum": "225c358aed6275a2de43c1a20006d23631013128b21a07c4977f8619a3970d08"
},
"x86_64_macos": {
"etag": "0x8DD07EBA1A526CA",
"checksum": "06c79e459ad2b46fd453eaea9da8bde01019214337134b521244e7d74251ee65"
}
},
"0.7": {
"version": "0.7.3"

View File

@@ -16,6 +16,10 @@
"aarch64_linux_gnu": {
"url": "https://github.com/sharkdp/hyperfine/releases/download/v${version}/hyperfine-v${version}-aarch64-unknown-linux-gnu.tar.gz",
"bin": "hyperfine-v${version}-aarch64-unknown-linux-gnu/hyperfine"
},
"aarch64_macos": {
"url": "https://github.com/sharkdp/hyperfine/releases/download/v${version}/hyperfine-v${version}-aarch64-apple-darwin.tar.gz",
"bin": "hyperfine-v${version}-aarch64-apple-darwin/hyperfine"
}
},
"license_markdown": "[MIT](https://github.com/sharkdp/hyperfine/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/sharkdp/hyperfine/blob/master/LICENSE-APACHE)",
@@ -44,6 +48,10 @@
"aarch64_linux_gnu": {
"etag": "0x8DD029A11BFB41C",
"checksum": "7f9c0522e1acf869e0558e085c43f2cea3e30e4f7a4b7bc3d5540cbdee7b4273"
},
"aarch64_macos": {
"etag": "0x8DD029A033B40F5",
"checksum": "502e7c7f99e7e1919321eaa23a4a694c34b1b92d99cbd773a4a2497e100e088f"
}
},
"1.18": {

View File

@@ -11,6 +11,7 @@
"x86_64_windows": {
"asset_name": "${package}-v${version}-${rust_target}.zip"
},
"aarch64_linux_gnu": {}
"aarch64_linux_gnu": {},
"aarch64_macos": {}
}
}

View File

@@ -311,22 +311,22 @@ impl StringOrArray {
}
}
/// GitHub Actions Runner supports Linux (x86_64, aarch64, arm), Windows (x86_64, aarch64),
/// and macOS (x86_64, aarch64).
/// https://github.com/actions/runner/blob/v2.315.0/.github/workflows/build.yml#L21
/// GitHub Actions Runner supports Linux (x86_64, AArch64, Arm), Windows (x86_64, AArch64),
/// and macOS (x86_64, AArch64).
/// https://github.com/actions/runner/blob/v2.321.0/.github/workflows/build.yml#L21
/// https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners
///
/// Note:
/// - Static-linked binaries compiled for linux-musl will also work on linux-gnu systems and are
/// usually preferred over linux-gnu binaries because they can avoid glibc version issues.
/// (rustc enables statically linking for linux-musl by default, except for mips.)
/// - Binaries compiled for x86_64 macOS will usually also work on aarch64 macOS.
/// - Binaries compiled for x86_64 Windows will usually also work on aarch64 Windows 11+.
/// - Ignore arm for now, as we need to consider the version and whether hard-float is supported.
/// - Binaries compiled for x86_64 macOS will usually also work on AArch64 macOS.
/// - Binaries compiled for x86_64 Windows will usually also work on AArch64 Windows 11+.
/// - Ignore Arm for now, as we need to consider the version and whether hard-float is supported.
/// https://github.com/rust-lang/rustup/pull/593
/// https://github.com/cross-rs/cross/pull/1018
/// Does it seem only armv7l+ is supported?
/// https://github.com/actions/runner/blob/v2.315.0/src/Misc/externals.sh#L189
/// https://github.com/actions/runner/blob/v2.321.0/src/Misc/externals.sh#L178
/// https://github.com/actions/runner/issues/688
// TODO: support musl with dynamic linking like wasmtime 22.0.0+'s musl binaries: https://github.com/bytecodealliance/wasmtime/releases/tag/v22.0.0
#[allow(non_camel_case_types)]

View File

@@ -65,7 +65,7 @@ fn main() -> Result<()> {
))?
.into_json()?;
// If version_req is latest, it is usually sufficient to look at the latest 100 releases.
if r.len() < per_page || version_req.map_or(false, |req| req == "latest") {
if r.len() < per_page || version_req.is_some_and(|req| req == "latest") {
releases.append(&mut r);
break;
}
@@ -441,7 +441,7 @@ fn main() -> Result<()> {
&& download_info[&HostPlatform::x86_64_macos].url
== download_info[&HostPlatform::aarch64_macos].url
{
// macOS universal binary or x86_64 binary that works on both x86_64 and aarch64 (rosetta).
// macOS universal binary or x86_64 binary that works on both x86_64 and AArch64 (rosetta).
download_info.remove(&HostPlatform::aarch64_macos);
}
has_build_metadata |= !semver_version.build.is_empty();

View File

@@ -43,8 +43,7 @@ fn main() -> Result<()> {
base_info_dir.push("codegen");
base_info_dir.push("base");
let mut paths: Vec<_> =
fs::read_dir(manifest_dir.clone()).unwrap().map(|r| r.unwrap()).collect();
let mut paths: Vec<_> = fs::read_dir(&manifest_dir).unwrap().map(|r| r.unwrap()).collect();
paths.sort_by_key(fs_err::DirEntry::path);
let mut tools = vec![MarkdownEntry {
@@ -88,7 +87,7 @@ fn main() -> Result<()> {
"linux" => platforms.linux = true,
"macos" => platforms.macos = true,
"windows" => platforms.windows = true,
&_ => todo!(),
_ => todo!(),
}
}