diff --git a/TOOLS.md b/TOOLS.md index a98bc123..3cfe996d 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -84,7 +84,9 @@ See the [Supported tools section in README.md](README.md#supported-tools) for ho | [**mdbook-mermaid**](https://github.com/badboy/mdbook-mermaid) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/badboy/mdbook-mermaid/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/badboy/mdbook-mermaid/blob/main/LICENSE) | | | [**mdbook-mermaid-ssr**](https://github.com/CommanderStorm/mdbook-mermaid-ssr) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/CommanderStorm/mdbook-mermaid-ssr/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/CommanderStorm/mdbook-mermaid-ssr/blob/main/LICENSE) | | | [**mise**](https://github.com/jdx/mise) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/jdx/mise/releases) | Linux, macOS, Windows | [MIT](https://github.com/jdx/mise/blob/main/LICENSE) | | +| [**mold**](https://github.com/rui314/mold) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/rui314/mold/releases) | Linux, Windows | [MIT](https://github.com/rui314/mold/blob/main/LICENSE) | | | [**osv-scanner**](https://github.com/google/osv-scanner) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/google/osv-scanner/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/google/osv-scanner/blob/main/LICENSE) | | +| [**oxfmt**](https://github.com/oxc-project/oxc) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/oxc-project/oxc/releases) | Linux, macOS, Windows | [MIT](https://github.com/oxc-project/oxc/blob/main/LICENSE) | | | [**parse-changelog**](https://github.com/taiki-e/parse-changelog) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/parse-changelog/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-MIT) | | | [**parse-dockerfile**](https://github.com/taiki-e/parse-dockerfile) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/parse-dockerfile/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/parse-dockerfile/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-dockerfile/blob/main/LICENSE-MIT) | | | [**prek**](https://github.com/j178/prek) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/j178/prek/releases) | Linux, macOS, Windows | [MIT](https://github.com/j178/prek/blob/master/LICENSE) | | diff --git a/manifests/mold.json b/manifests/mold.json new file mode 100644 index 00000000..50dd5bd7 --- /dev/null +++ b/manifests/mold.json @@ -0,0 +1,60 @@ +{ + "rust_crate": null, + "template": { + "x86_64_linux_gnu": { + "url": "https://github.com/rui314/mold/releases/download/v${version}/mold-${version}-x86_64-linux.tar.gz", + "bin": "mold-${version}-x86_64-linux/bin/mold" + }, + "x86_64_windows": { + "url": "https://github.com/rui314/mold/releases/download/v${version}/mold-${version}-x86_64-windows.zip", + "bin": "bin/mold" + }, + "aarch64_linux_gnu": { + "url": "https://github.com/rui314/mold/releases/download/v${version}/mold-${version}-aarch64-linux.tar.gz", + "bin": "mold-${version}-aarch64-linux/bin/mold" + } + }, + "latest": { + "version": "3.0.0" + }, + "3": { + "version": "3.0.0" + }, + "3.0": { + "version": "3.0.0" + }, + "3.0.0": { + "x86_64_linux_gnu": { + "etag": "0x8DF22C41E044096", + "hash": "6c90d4a474c7c0409dfb575be03a5345878ac14fdba18de8b40fa58c60121189" + }, + "x86_64_windows": { + "etag": "0x8DF22C41E000DEA", + "hash": "1421fccaf7efee77e53f1dc365f90acb791bedff6be486aed0c0313393e6b8ec" + }, + "aarch64_linux_gnu": { + "etag": "0x8DF22C41D48BDBA", + "hash": "52c759d3689babaea4c42af2f31062a74ab83e17ffb5a8090232534c67b70577" + } + }, + "2": { + "version": "2.42.1" + }, + "2.42": { + "version": "2.42.1" + }, + "2.42.1": { + "x86_64_linux_gnu": { + "etag": "0x8DF0FF0371FA9AF", + "hash": "6ff270c9bf07d2bec5c98aa324eb7c4daf6a1a4d815c05ff1708049616047855" + }, + "x86_64_windows": { + "etag": "0x8DF0FF037239CE2", + "hash": "ce38c5d5d6a5169e05883d598592b367976a9575abfafcdc49889fcc788b51c0" + }, + "aarch64_linux_gnu": { + "etag": "0x8DF0FF03693F3E6", + "hash": "16b025652d3d7456689e6025a77e1903bb2a15e7630877c26cc133f5df95b9c6" + } + } +} diff --git a/tools/ci/tool-list.sh b/tools/ci/tool-list.sh index c23d4279..a6201350 100755 --- a/tools/ci/tool-list.sh +++ b/tools/ci/tool-list.sh @@ -51,9 +51,14 @@ glibc_pre_2_27_incompat=( protoc valgrind ) +# version `GLIBC_2.18' not found +glibc_pre_2_18_incompat=( + "${glibc_pre_2_27_incompat[@]}" + mold +) # version `GLIBC_2.17' not found glibc_pre_2_17_incompat=( - "${glibc_pre_2_27_incompat[@]}" + "${glibc_pre_2_18_incompat[@]}" deepsource # https://github.com/DeepSourceCorp/cli/issues/245 rafn # built on ubuntu-24.04, requires GLIBC_2.17+ rust @@ -78,6 +83,17 @@ esac runner="${2:-}" case "$(uname -s)" in Linux) + function libc_version_lower_than { + local host_version=$1 + local version=$2 + + if [[ "$(LC_ALL=C sort -Vu <<<"${version}"$'\n'"${host_version}" | tail -1)" != "${host_version}" ]]; then + return 0 + else + return 1 + fi + } + host_os=linux ldd_version=$(ldd --version 2>&1 || true) if [[ "${ldd_version}" == *'musl'* ]]; then @@ -85,39 +101,22 @@ case "$(uname -s)" in else host_glibc_version=$(grep -E "GLIBC|GNU libc" <<<"${ldd_version}") host_glibc_version="${host_glibc_version##* }" - higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.39"$'\n'"${host_glibc_version}" | tail -1) - if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then - higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.35"$'\n'"${host_glibc_version}" | tail -1) - if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then - higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.34"$'\n'"${host_glibc_version}" | tail -1) - if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then - higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.31"$'\n'"${host_glibc_version}" | tail -1) - if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then - higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.28"$'\n'"${host_glibc_version}" | tail -1) - if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then - higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.27"$'\n'"${host_glibc_version}" | tail -1) - if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then - higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.17"$'\n'"${host_glibc_version}" | tail -1) - if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then - incompat_tools+=("${glibc_pre_2_17_incompat[@]}") - else - incompat_tools+=("${glibc_pre_2_27_incompat[@]}") - fi - else - incompat_tools+=("${glibc_pre_2_28_incompat[@]}") - fi - else - incompat_tools+=("${glibc_pre_2_31_incompat[@]}") - fi - else - incompat_tools+=("${glibc_pre_2_34_incompat[@]}") - fi - else - incompat_tools+=("${glibc_pre_2_35_incompat[@]}") - fi - else - incompat_tools+=("${glibc_pre_2_39_incompat[@]}") - fi + if libc_version_lower_than "${host_glibc_version}" 2.17; then + incompat_tools+=("${glibc_pre_2_17_incompat[@]}") + elif libc_version_lower_than "${host_glibc_version}" 2.18; then + incompat_tools+=("${glibc_pre_2_18_incompat[@]}") + elif libc_version_lower_than "${host_glibc_version}" 2.27; then + incompat_tools+=("${glibc_pre_2_27_incompat[@]}") + elif libc_version_lower_than "${host_glibc_version}" 2.28; then + incompat_tools+=("${glibc_pre_2_28_incompat[@]}") + elif libc_version_lower_than "${host_glibc_version}" 2.31; then + incompat_tools+=("${glibc_pre_2_31_incompat[@]}") + elif libc_version_lower_than "${host_glibc_version}" 2.34; then + incompat_tools+=("${glibc_pre_2_34_incompat[@]}") + elif libc_version_lower_than "${host_glibc_version}" 2.35; then + incompat_tools+=("${glibc_pre_2_35_incompat[@]}") + elif libc_version_lower_than "${host_glibc_version}" 2.39; then + incompat_tools+=("${glibc_pre_2_39_incompat[@]}") fi fi if ! type -P snap >/dev/null; then diff --git a/tools/codegen/base/mold.json b/tools/codegen/base/mold.json new file mode 100644 index 00000000..0d60a565 --- /dev/null +++ b/tools/codegen/base/mold.json @@ -0,0 +1,20 @@ +{ + "repository": "https://github.com/rui314/mold", + "license_markdown": "[MIT](https://github.com/rui314/mold/blob/main/LICENSE)", + "tag_prefix": "v", + "version_range": ">= 2.42.1", + "platform": { + "x86_64_linux_gnu": { + "asset_name": "${package}-${version}-x86_64-linux.tar.gz", + "bin": "${package}-${version}-x86_64-linux/bin/mold" + }, + "x86_64_windows": { + "asset_name": "${package}-${version}-x86_64-windows.zip", + "bin": "bin/mold" + }, + "aarch64_linux_gnu": { + "asset_name": "${package}-${version}-aarch64-linux.tar.gz", + "bin": "${package}-${version}-aarch64-linux/bin/mold" + } + } +}