mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-03 03:30:36 +00:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba4b012f19 | ||
|
|
6746ad0324 | ||
|
|
68642cc590 | ||
|
|
97df8adcf7 | ||
|
|
f021e393f7 | ||
|
|
0158edbfba | ||
|
|
e3981a6d57 | ||
|
|
1bc9250743 | ||
|
|
999ba40f44 | ||
|
|
b8a856acea | ||
|
|
9f3710a281 | ||
|
|
e85ee51dd0 | ||
|
|
c35547fc3a | ||
|
|
7e60635127 | ||
|
|
25db2c0373 | ||
|
|
eabd84cfdd | ||
|
|
c7aafffa95 | ||
|
|
93c0efda22 | ||
|
|
71ce4c0326 | ||
|
|
e380e63944 | ||
|
|
0f4d53b2aa | ||
|
|
ac22f2e031 | ||
|
|
c079fd141a | ||
|
|
edbd1909dc | ||
|
|
618bb235a3 | ||
|
|
93a94c2059 | ||
|
|
6bb27b4afe | ||
|
|
ca5df137f6 | ||
|
|
a7ac3cded3 | ||
|
|
2b9035e07b | ||
|
|
6c0394aa23 | ||
|
|
815f5e1266 | ||
|
|
d5d85f7b2e | ||
|
|
a0deac80c0 | ||
|
|
6597128d21 | ||
|
|
e4c6aaa80b | ||
|
|
c8c4e1b05f | ||
|
|
39be0e3135 | ||
|
|
5475499f3a | ||
|
|
462c9790a0 | ||
|
|
7f648a20c4 | ||
|
|
6b915acdfc | ||
|
|
6559edc36a | ||
|
|
d7be3bce25 | ||
|
|
c43c9c2677 | ||
|
|
aab22b4379 | ||
|
|
20c09fa7dc | ||
|
|
684e4b1c21 | ||
|
|
d62eacb562 | ||
|
|
a8382c73ee | ||
|
|
6c46ebf75b | ||
|
|
f912bf2387 | ||
|
|
2962aafadb |
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -27,15 +27,15 @@ jobs:
|
||||
tool:
|
||||
# Note: Specifying the version of valgrind is not supported.
|
||||
# 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@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,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.22,cargo-llvm-cov@0.5.0,cargo-minimal-versions@0.1.7,parse-changelog@0.5.2,cargo-udeps@0.1.33,cargo-valgrind@2.1.0,cross@0.2.4,nextest@0.9.11,protoc@3.21.8,shellcheck@0.8.0,shfmt@3.5.1,wasm-pack@0.10.3,wasmtime@2.0.0,mdbook@0.4.21,mdbook-linkcheck@0.7.6,cargo-watch@8.1.1
|
||||
# Nextest supports basic version ranges as well
|
||||
- nextest@0.9
|
||||
include:
|
||||
- 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
|
||||
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 }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -26,5 +26,4 @@ jobs:
|
||||
changelog: CHANGELOG.md
|
||||
title: $version
|
||||
branch: 'main|v[0-9]+'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
target
|
||||
Cargo.lock
|
||||
node_modules
|
||||
package-lock.json
|
||||
package.json
|
||||
|
||||
99
CHANGELOG.md
99
CHANGELOG.md
@@ -10,6 +10,85 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.14.2] - 2022-10-25
|
||||
|
||||
- Update `cargo-hack@latest` to 0.5.22.
|
||||
- Update `cargo-minimal-versions@latest` to 0.1.7.
|
||||
- Update `parse-changelog@latest` to 0.5.2.
|
||||
|
||||
## [1.14.1] - 2022-10-21
|
||||
|
||||
- Update `wasmtime@latest` to 2.0.0.
|
||||
- Update `protoc@latest` to 3.21.8.
|
||||
|
||||
## [1.14.0] - 2022-10-18
|
||||
|
||||
- Update `protoc@latest` to 3.21.7.
|
||||
- Update `cargo-binstall@latest` to 0.16.0. ([#28](https://github.com/taiki-e/install-action/pull/28), thanks @NobodyXu)
|
||||
- Reject semver operators in version. This was not supported even before, but was accidentally accepted in the `cargo-binstall` fallback. ([#26](https://github.com/taiki-e/install-action/pull/26), thanks @NobodyXu)
|
||||
|
||||
## [1.13.9] - 2022-09-28
|
||||
|
||||
- Update `cargo-binstall@latest` to 0.14.0. ([#24](https://github.com/taiki-e/install-action/pull/24), thanks @coltfred)
|
||||
|
||||
## [1.13.8] - 2022-09-26
|
||||
|
||||
- Update `cargo-hack@latest` to 0.5.21.
|
||||
|
||||
## [1.13.7] - 2022-09-25
|
||||
|
||||
- Work around cargo-binstall upgrade issue on Windows. ([#23](https://github.com/taiki-e/install-action/pull/23))
|
||||
- Ensure that the latest cargo-binstall is used. ([#22](https://github.com/taiki-e/install-action/pull/22), thanks @NobodyXu)
|
||||
|
||||
## [1.13.6] - 2022-09-25
|
||||
|
||||
- Update `cargo-binstall@latest` to 0.13.3.
|
||||
|
||||
## [1.13.5] - 2022-09-24
|
||||
|
||||
- Update `cargo-hack@latest` to 0.5.20.
|
||||
- Downgrade `cargo-binstall@latest` to 0.13.1 to avoid [upstream bug](https://github.com/cargo-bins/cargo-binstall/issues/416).
|
||||
|
||||
## [1.13.4] - 2022-09-22
|
||||
|
||||
- Update `cargo-hack@latest` to 0.5.19.
|
||||
|
||||
## [1.13.3] - 2022-09-20
|
||||
|
||||
- Update `wasmtime@latest` to 1.0.0.
|
||||
|
||||
## [1.13.2] - 2022-09-16
|
||||
|
||||
- Update `cargo-udeps@latest` to 0.1.33.
|
||||
|
||||
## [1.13.1] - 2022-09-15
|
||||
|
||||
- Update `protoc@latest` to 3.21.6.
|
||||
|
||||
## [1.13.0] - 2022-09-10
|
||||
|
||||
- Avoid using sudo on `protoc` installation.
|
||||
|
||||
## [1.12.4] - 2022-09-10
|
||||
|
||||
- Update `cargo-llvm-cov@latest` to 0.5.0.
|
||||
|
||||
## [1.12.3] - 2022-09-08
|
||||
|
||||
- Update `parse-changelog@latest` to 0.5.1.
|
||||
|
||||
## [1.12.2] - 2022-09-04
|
||||
|
||||
- Update `cargo-hack@latest` to 0.5.18.
|
||||
|
||||
## [1.12.1] - 2022-09-01
|
||||
|
||||
- Update `wasmtime@latest` to 0.40.1.
|
||||
|
||||
## [1.12.0] - 2022-08-28
|
||||
|
||||
- Support `cargo-valgrind`. ([#20](https://github.com/taiki-e/install-action/pull/20), thanks @messense)
|
||||
|
||||
## [1.11.2] - 2022-08-23
|
||||
|
||||
- Update `wasmtime@latest` to 0.40.0.
|
||||
@@ -296,7 +375,25 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
|
||||
Initial release
|
||||
|
||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v1.11.2...HEAD
|
||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v1.14.2...HEAD
|
||||
[1.14.2]: https://github.com/taiki-e/install-action/compare/v1.14.1...v1.14.2
|
||||
[1.14.1]: https://github.com/taiki-e/install-action/compare/v1.14.0...v1.14.1
|
||||
[1.14.0]: https://github.com/taiki-e/install-action/compare/v1.13.9...v1.14.0
|
||||
[1.13.9]: https://github.com/taiki-e/install-action/compare/v1.13.8...v1.13.9
|
||||
[1.13.8]: https://github.com/taiki-e/install-action/compare/v1.13.7...v1.13.8
|
||||
[1.13.7]: https://github.com/taiki-e/install-action/compare/v1.13.6...v1.13.7
|
||||
[1.13.6]: https://github.com/taiki-e/install-action/compare/v1.13.5...v1.13.6
|
||||
[1.13.5]: https://github.com/taiki-e/install-action/compare/v1.13.4...v1.13.5
|
||||
[1.13.4]: https://github.com/taiki-e/install-action/compare/v1.13.3...v1.13.4
|
||||
[1.13.3]: https://github.com/taiki-e/install-action/compare/v1.13.2...v1.13.3
|
||||
[1.13.2]: https://github.com/taiki-e/install-action/compare/v1.13.1...v1.13.2
|
||||
[1.13.1]: https://github.com/taiki-e/install-action/compare/v1.13.0...v1.13.1
|
||||
[1.13.0]: https://github.com/taiki-e/install-action/compare/v1.12.4...v1.13.0
|
||||
[1.12.4]: https://github.com/taiki-e/install-action/compare/v1.12.3...v1.12.4
|
||||
[1.12.3]: https://github.com/taiki-e/install-action/compare/v1.12.2...v1.12.3
|
||||
[1.12.2]: https://github.com/taiki-e/install-action/compare/v1.12.1...v1.12.2
|
||||
[1.12.1]: https://github.com/taiki-e/install-action/compare/v1.12.0...v1.12.1
|
||||
[1.12.0]: https://github.com/taiki-e/install-action/compare/v1.11.2...v1.12.0
|
||||
[1.11.2]: https://github.com/taiki-e/install-action/compare/v1.11.1...v1.11.2
|
||||
[1.11.1]: https://github.com/taiki-e/install-action/compare/v1.11.0...v1.11.1
|
||||
[1.11.0]: https://github.com/taiki-e/install-action/compare/v1.10.4...v1.11.0
|
||||
|
||||
@@ -39,7 +39,7 @@ To install a specific version, use `@version` syntax:
|
||||
```yaml
|
||||
- uses: taiki-e/install-action@v1
|
||||
with:
|
||||
tool: cargo-hack@0.5.17
|
||||
tool: cargo-hack@0.5.22
|
||||
```
|
||||
|
||||
To install multiple tools:
|
||||
@@ -71,15 +71,16 @@ https://spdx.org/licenses
|
||||
| [**cargo-minimal-versions**](https://github.com/taiki-e/cargo-minimal-versions) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-minimal-versions/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-minimal-versions/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-minimal-versions/blob/HEAD/LICENSE-MIT) |
|
||||
| [**cargo-udeps**](https://github.com/est31/cargo-udeps) | `$CARGO_HOME/bin` | [GitHub Release](https://github.com/est31/cargo-udeps/releases) | Linux, macOS, Windows | [Apache-2.0 OR MIT](https://github.com/est31/cargo-udeps/blob/master/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/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/HEAD/LICENSE-MIT) |
|
||||
| [**cargo-binstall**][cargo-binstall] | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cargo-bins/cargo-binstall/releases) | Linux, macOS, Windows | [GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/LICENSE.txt) |
|
||||
| [**cargo-binstall**][cargo-binstall] | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cargo-bins/cargo-binstall/releases) | Linux, macOS, Windows | [GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE) |
|
||||
| [**cross**](https://github.com/cross-rs/cross) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cross-rs/cross/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/cross-rs/cross/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/cross-rs/cross/blob/HEAD/LICENSE-MIT) |
|
||||
| [**mdbook**](https://github.com/rust-lang/mdBook) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rust-lang/mdBook/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/rust-lang/mdBook/blob/HEAD/LICENSE) |
|
||||
| [**mdbook-linkcheck**](https://github.com/Michael-F-Bryan/mdbook-linkcheck) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases) | Linux, macOS, Windows | [MIT](https://github.com/Michael-F-Bryan/mdbook-linkcheck/blob/HEAD/LICENSE) |
|
||||
| [**nextest**](https://github.com/nextest-rs/nextest) (alias: `cargo-nextest`) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/nextest-rs/nextest/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-MIT) |
|
||||
| [**protoc**](https://github.com/protocolbuffers/protobuf) | `/usr/local/bin` | [GitHub Releases](https://github.com/protocolbuffers/protobuf/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/HEAD/LICENSE) |
|
||||
| [**protoc**](https://github.com/protocolbuffers/protobuf) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/protocolbuffers/protobuf/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/protocolbuffers/protobuf/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) |
|
||||
| [**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) |
|
||||
| [**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) |
|
||||
|
||||
|
||||
100
main.sh
100
main.sh
@@ -79,11 +79,24 @@ host_triple() {
|
||||
fi
|
||||
}
|
||||
install_cargo_binstall() {
|
||||
if [[ ! -f "${cargo_bin}/cargo-binstall" ]]; then
|
||||
# https://github.com/cargo-bins/cargo-binstall/releases
|
||||
binstall_version="0.16.0"
|
||||
install_binstall='1'
|
||||
if [[ -f "${cargo_bin}/cargo-binstall${exe}" ]]; then
|
||||
if [[ "$(cargo binstall -V)" == "cargo-binstall ${binstall_version}" ]]; then
|
||||
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall${exe}"
|
||||
install_binstall=''
|
||||
else
|
||||
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall${exe}, but is not compatible version with install-action, upgrading"
|
||||
rm "${cargo_bin}/cargo-binstall${exe}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${install_binstall}" ]]; then
|
||||
info "installing cargo-binstall"
|
||||
|
||||
host_triple
|
||||
base_url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall
|
||||
base_url="https://github.com/cargo-bins/cargo-binstall/releases/download/v${binstall_version}/cargo-binstall"
|
||||
case "${host}" in
|
||||
x86_64-unknown-linux-gnu) url="${base_url}-x86_64-unknown-linux-musl.tgz" ;;
|
||||
x86_64-unknown-linux-musl) url="${base_url}-x86_64-unknown-linux-musl.tgz" ;;
|
||||
@@ -106,9 +119,6 @@ install_cargo_binstall() {
|
||||
download "${url}" "${cargo_bin}" "cargo-binstall${exe}"
|
||||
info "cargo-binstall installed at $(type -P "cargo-binstall${exe}")"
|
||||
x cargo binstall -V
|
||||
else
|
||||
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall, upgrading"
|
||||
cargo binstall --secure --no-confirm --version '>=0.12.0' cargo-binstall
|
||||
fi
|
||||
}
|
||||
cargo_binstall() {
|
||||
@@ -119,12 +129,12 @@ cargo_binstall() {
|
||||
|
||||
install_cargo_binstall
|
||||
|
||||
# --secure mode enforce downloads over secure transports only.
|
||||
# By default, cargo-binstall enforce downloads over secure transports only.
|
||||
# As a result, http will be disabled, and it will also set
|
||||
# min tls version to be 1.2
|
||||
case "${version}" in
|
||||
latest) cargo binstall --force --secure --no-confirm "${tool}" ;;
|
||||
*) cargo binstall --force --secure --no-confirm --version "${version}" "${tool}" ;;
|
||||
latest) cargo binstall --force --no-confirm "${tool}" ;;
|
||||
*) cargo binstall --force --no-confirm --version "${version}" "${tool}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -154,6 +164,9 @@ fi
|
||||
for tool in "${tools[@]}"; do
|
||||
if [[ "${tool}" == *"@"* ]]; then
|
||||
version="${tool#*@}"
|
||||
if [[ ! "${version}" =~ ^([1-9][0-9]*(\.[0-9]+(\.[0-9]+)?)?|0\.[1-9][0-9]*(\.[0-9]+)?|^0\.0\.[0-9]+)(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?$|^latest$ ]]; then
|
||||
bail "install-action does not support semver operators"
|
||||
fi
|
||||
else
|
||||
version="latest"
|
||||
fi
|
||||
@@ -164,13 +177,13 @@ for tool in "${tools[@]}"; do
|
||||
cargo-hack | cargo-llvm-cov | cargo-minimal-versions | parse-changelog)
|
||||
case "${tool}" in
|
||||
# https://github.com/taiki-e/cargo-hack/releases
|
||||
cargo-hack) latest_version="0.5.17" ;;
|
||||
cargo-hack) latest_version="0.5.22" ;;
|
||||
# https://github.com/taiki-e/cargo-llvm-cov/releases
|
||||
cargo-llvm-cov) latest_version="0.4.14" ;;
|
||||
cargo-llvm-cov) latest_version="0.5.0" ;;
|
||||
# https://github.com/taiki-e/cargo-minimal-versions/releases
|
||||
cargo-minimal-versions) latest_version="0.1.5" ;;
|
||||
cargo-minimal-versions) latest_version="0.1.7" ;;
|
||||
# https://github.com/taiki-e/parse-changelog/releases
|
||||
parse-changelog) latest_version="0.5.0" ;;
|
||||
parse-changelog) latest_version="0.5.2" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
repo="taiki-e/${tool}"
|
||||
@@ -188,7 +201,7 @@ for tool in "${tools[@]}"; do
|
||||
;;
|
||||
cargo-udeps)
|
||||
# https://github.com/est31/cargo-udeps/releases
|
||||
latest_version="0.1.32"
|
||||
latest_version="0.1.33"
|
||||
repo="est31/${tool}"
|
||||
case "${version}" in
|
||||
latest) version="${latest_version}" ;;
|
||||
@@ -212,6 +225,31 @@ for tool in "${tools[@]}"; do
|
||||
# leading `./` is required for cargo-udeps to work
|
||||
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)
|
||||
# https://github.com/cross-rs/cross/releases
|
||||
latest_version="0.2.4"
|
||||
@@ -252,29 +290,26 @@ for tool in "${tools[@]}"; do
|
||||
;;
|
||||
protoc)
|
||||
# https://github.com/protocolbuffers/protobuf/releases
|
||||
latest_version="3.21.5"
|
||||
latest_version="3.21.8"
|
||||
repo="protocolbuffers/protobuf"
|
||||
case "${version}" in
|
||||
latest) version="${latest_version}" ;;
|
||||
esac
|
||||
miner_patch_version="${version#*.}"
|
||||
base_url="https://github.com/${repo}/releases/download/v${miner_patch_version}/protoc-${miner_patch_version}"
|
||||
bin_dir="/usr/local/bin"
|
||||
include_dir="/usr/local/include"
|
||||
# Copying files to /usr/local/include requires sudo.
|
||||
bin_dir="${HOME}/.install-action/bin"
|
||||
include_dir="${HOME}/.install-action/include"
|
||||
if [[ ! -d "${bin_dir}" ]]; then
|
||||
mkdir -p "${bin_dir}"
|
||||
mkdir -p "${include_dir}"
|
||||
echo "${bin_dir}" >>"${GITHUB_PATH}"
|
||||
export PATH="${PATH}:${bin_dir}"
|
||||
fi
|
||||
case "${OSTYPE}" in
|
||||
linux*) url="${base_url}-linux-x86_64.zip" ;;
|
||||
darwin*) url="${base_url}-osx-x86_64.zip" ;;
|
||||
cygwin* | msys*)
|
||||
url="${base_url}-win64.zip"
|
||||
bin_dir="${HOME}/.install-action/bin"
|
||||
include_dir="${HOME}/.install-action/include"
|
||||
if [[ ! -d "${bin_dir}" ]]; then
|
||||
mkdir -p "${bin_dir}"
|
||||
mkdir -p "${include_dir}"
|
||||
echo "${bin_dir}" >>"${GITHUB_PATH}"
|
||||
export PATH="${PATH}:${bin_dir}"
|
||||
fi
|
||||
;;
|
||||
cygwin* | msys*) url="${base_url}-win64.zip" ;;
|
||||
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
|
||||
esac
|
||||
mkdir -p .install-action-tmp
|
||||
@@ -285,12 +320,9 @@ for tool in "${tools[@]}"; do
|
||||
unzip tmp.zip
|
||||
mv "bin/protoc${exe}" "${bin_dir}/"
|
||||
mkdir -p "${include_dir}/"
|
||||
cp -r include/. "${include_dir}/"
|
||||
case "${OSTYPE}" in
|
||||
linux* | darwin*) sudo cp -r include/. "${include_dir}/" ;;
|
||||
cygwin* | msys*)
|
||||
cp -r include/. "${include_dir}/"
|
||||
bin_dir=$(sed <<<"${bin_dir}" 's/^\/c\//C:\\/')
|
||||
;;
|
||||
cygwin* | msys*) bin_dir=$(sed <<<"${bin_dir}" 's/^\/c\//C:\\/') ;;
|
||||
esac
|
||||
if [[ -z "${PROTOC:-}" ]]; then
|
||||
info "setting PROTOC environment variable"
|
||||
@@ -388,7 +420,7 @@ for tool in "${tools[@]}"; do
|
||||
;;
|
||||
wasmtime)
|
||||
# https://github.com/bytecodealliance/wasmtime/releases
|
||||
latest_version="0.40.0"
|
||||
latest_version="2.0.0"
|
||||
repo="bytecodealliance/${tool}"
|
||||
case "${version}" in
|
||||
latest) version="${latest_version}" ;;
|
||||
@@ -448,6 +480,7 @@ for tool in "${tools[@]}"; do
|
||||
;;
|
||||
cargo-binstall)
|
||||
install_cargo_binstall
|
||||
echo
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
@@ -459,6 +492,7 @@ for tool in "${tools[@]}"; do
|
||||
info "${tool} installed at $(type -P "${bin}")"
|
||||
case "${bin}" in
|
||||
"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 ;;
|
||||
*) x "${tool}" --version ;;
|
||||
esac
|
||||
|
||||
@@ -81,6 +81,7 @@ tools=(
|
||||
cargo-llvm-cov
|
||||
cargo-minimal-versions
|
||||
cargo-udeps
|
||||
cargo-valgrind
|
||||
parse-changelog
|
||||
cargo-binstall
|
||||
cross
|
||||
|
||||
Reference in New Issue
Block a user