mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-09 14:20:29 +00:00
Support cargo-valgrind (#20)
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -27,15 +27,15 @@ jobs:
|
|||||||
tool:
|
tool:
|
||||||
# Note: Specifying the version of valgrind is not supported.
|
# Note: Specifying the version of valgrind is not supported.
|
||||||
# cargo-watch is supported by cargo-binstall (through quickinstall)
|
# cargo-watch is supported by cargo-binstall (through quickinstall)
|
||||||
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cross,nextest,protoc,shellcheck,shfmt,valgrind,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
|
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cross,nextest,protoc,shellcheck,shfmt,valgrind,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
|
||||||
- cargo-hack@0.5.17,cargo-llvm-cov@0.4.14,cargo-minimal-versions@0.1.5,parse-changelog@0.5.0,cargo-udeps@0.1.32,cross@0.2.4,nextest@0.9.11,protoc@3.21.5,shellcheck@0.8.0,shfmt@3.5.1,wasm-pack@0.10.3,wasmtime@0.40.0,mdbook@0.4.21,mdbook-linkcheck@0.7.6,cargo-watch@8.1.1
|
- cargo-hack@0.5.17,cargo-llvm-cov@0.4.14,cargo-minimal-versions@0.1.5,parse-changelog@0.5.0,cargo-udeps@0.1.32,cargo-valgrind@2.1.0,cross@0.2.4,nextest@0.9.11,protoc@3.21.5,shellcheck@0.8.0,shfmt@3.5.1,wasm-pack@0.10.3,wasmtime@0.40.0,mdbook@0.4.21,mdbook-linkcheck@0.7.6,cargo-watch@8.1.1
|
||||||
# Nextest supports basic version ranges as well
|
# Nextest supports basic version ranges as well
|
||||||
- nextest@0.9
|
- nextest@0.9
|
||||||
include:
|
include:
|
||||||
- os: macos-11
|
- os: macos-11
|
||||||
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
|
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
|
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- Support `cargo-valgrind`
|
||||||
|
|
||||||
## [1.11.2] - 2022-08-23
|
## [1.11.2] - 2022-08-23
|
||||||
|
|
||||||
- Update `wasmtime@latest` to 0.40.0.
|
- Update `wasmtime@latest` to 0.40.0.
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ https://spdx.org/licenses
|
|||||||
| [**shellcheck**](https://www.shellcheck.net) | `/usr/local/bin` | [GitHub Releases](https://github.com/koalaman/shellcheck/releases) | Linux, macOS, Windows | [GPL-3.0-or-later](https://github.com/koalaman/shellcheck/blob/HEAD/LICENSE) |
|
| [**shellcheck**](https://www.shellcheck.net) | `/usr/local/bin` | [GitHub Releases](https://github.com/koalaman/shellcheck/releases) | Linux, macOS, Windows | [GPL-3.0-or-later](https://github.com/koalaman/shellcheck/blob/HEAD/LICENSE) |
|
||||||
| [**shfmt**](https://github.com/mvdan/sh) | `/usr/local/bin` | [GitHub Releases](https://github.com/mvdan/sh/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/mvdan/sh/blob/HEAD/LICENSE) |
|
| [**shfmt**](https://github.com/mvdan/sh) | `/usr/local/bin` | [GitHub Releases](https://github.com/mvdan/sh/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/mvdan/sh/blob/HEAD/LICENSE) |
|
||||||
| [**valgrind**](https://valgrind.org) | `/snap/bin` | [snap](https://snapcraft.io/install/valgrind/ubuntu) | Linux | [GPL-2.0-or-later](https://valgrind.org/docs/manual/license.gpl.html) |
|
| [**valgrind**](https://valgrind.org) | `/snap/bin` | [snap](https://snapcraft.io/install/valgrind/ubuntu) | Linux | [GPL-2.0-or-later](https://valgrind.org/docs/manual/license.gpl.html) |
|
||||||
|
| [**cargo-valgrind**](https://github.com/jfrimmel/cargo-valgrind) | `$CARGO_HOME/bin` | [GitHub Release](https://github.com/jfrimmel/cargo-valgrind/releases) | Linux, macOS, Windows | [MIT](https://github.com/jfrimmel/cargo-valgrind/blob/master/LICENSE-MIT) or [Apache-2.0](https://github.com/jfrimmel/cargo-valgrind/blob/master/LICENSE-APACHE) |
|
||||||
| [**wasm-pack**](https://github.com/rustwasm/wasm-pack) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustwasm/wasm-pack/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rustwasm/wasm-pack/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/rustwasm/wasm-pack/blob/HEAD/LICENSE-MIT) |
|
| [**wasm-pack**](https://github.com/rustwasm/wasm-pack) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustwasm/wasm-pack/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rustwasm/wasm-pack/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/rustwasm/wasm-pack/blob/HEAD/LICENSE-MIT) |
|
||||||
| [**wasmtime**](https://github.com/bytecodealliance/wasmtime) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bytecodealliance/wasmtime/releases) | Linux, macOS, Windows | [Apache-2.0 WITH LLVM-exception](https://github.com/bytecodealliance/wasmtime/blob/HEAD/LICENSE) |
|
| [**wasmtime**](https://github.com/bytecodealliance/wasmtime) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bytecodealliance/wasmtime/releases) | Linux, macOS, Windows | [Apache-2.0 WITH LLVM-exception](https://github.com/bytecodealliance/wasmtime/blob/HEAD/LICENSE) |
|
||||||
|
|
||||||
|
|||||||
26
main.sh
26
main.sh
@@ -212,6 +212,31 @@ for tool in "${tools[@]}"; do
|
|||||||
# leading `./` is required for cargo-udeps to work
|
# leading `./` is required for cargo-udeps to work
|
||||||
download "${url}" "${cargo_bin}" "./${tool}-v${version}-${target}/${tool}${exe}"
|
download "${url}" "${cargo_bin}" "./${tool}-v${version}-${target}/${tool}${exe}"
|
||||||
;;
|
;;
|
||||||
|
cargo-valgrind)
|
||||||
|
# https://github.com/jfrimmel/cargo-valgrind
|
||||||
|
latest_version="2.1.0"
|
||||||
|
repo="jfrimmel/${tool}"
|
||||||
|
case "${version}" in
|
||||||
|
latest) version="${latest_version}" ;;
|
||||||
|
esac
|
||||||
|
base_url="https://github.com/${repo}/releases/download/v${version}/${tool}-${version}"
|
||||||
|
case "${OSTYPE}" in
|
||||||
|
linux*)
|
||||||
|
target="x86_64-unknown-linux-musl"
|
||||||
|
url="${base_url}-${target}.tar.gz"
|
||||||
|
;;
|
||||||
|
darwin*)
|
||||||
|
target="x86_64-apple-darwin"
|
||||||
|
url="${base_url}-${target}.tar.gz"
|
||||||
|
;;
|
||||||
|
cygwin* | msys*)
|
||||||
|
target="x86_64-pc-windows-msvc"
|
||||||
|
url="${base_url}-${target}.zip"
|
||||||
|
;;
|
||||||
|
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
|
||||||
|
esac
|
||||||
|
download "${url}" "${cargo_bin}" "${tool}${exe}"
|
||||||
|
;;
|
||||||
cross)
|
cross)
|
||||||
# https://github.com/cross-rs/cross/releases
|
# https://github.com/cross-rs/cross/releases
|
||||||
latest_version="0.2.4"
|
latest_version="0.2.4"
|
||||||
@@ -459,6 +484,7 @@ for tool in "${tools[@]}"; do
|
|||||||
info "${tool} installed at $(type -P "${bin}")"
|
info "${tool} installed at $(type -P "${bin}")"
|
||||||
case "${bin}" in
|
case "${bin}" in
|
||||||
"cargo-udeps${exe}") x cargo udeps --help | head -1 ;; # cargo-udeps v0.1.30 does not support --version option
|
"cargo-udeps${exe}") x cargo udeps --help | head -1 ;; # cargo-udeps v0.1.30 does not support --version option
|
||||||
|
"cargo-valgrind${exe}") x cargo valgrind --help ;; # cargo-valgrind v2.1.0 does not support --version option
|
||||||
cargo-*) x cargo "${tool#cargo-}" --version ;;
|
cargo-*) x cargo "${tool#cargo-}" --version ;;
|
||||||
*) x "${tool}" --version ;;
|
*) x "${tool}" --version ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ tools=(
|
|||||||
cargo-llvm-cov
|
cargo-llvm-cov
|
||||||
cargo-minimal-versions
|
cargo-minimal-versions
|
||||||
cargo-udeps
|
cargo-udeps
|
||||||
|
cargo-valgrind
|
||||||
parse-changelog
|
parse-changelog
|
||||||
cargo-binstall
|
cargo-binstall
|
||||||
cross
|
cross
|
||||||
|
|||||||
Reference in New Issue
Block a user