mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-01 11:00:26 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff05552c79 | ||
|
|
d037a2617d | ||
|
|
2e9722e984 | ||
|
|
effa33c167 | ||
|
|
2e45a72791 | ||
|
|
17a6efb458 | ||
|
|
5c982063f4 | ||
|
|
d15809d0ff | ||
|
|
fc28b6c995 | ||
|
|
dbea48787c | ||
|
|
5a0c826638 | ||
|
|
ba3d801fa2 | ||
|
|
aab5a1fdfb | ||
|
|
d612fc86be | ||
|
|
b3b9147ed7 |
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -25,15 +25,14 @@ jobs:
|
||||
os:
|
||||
- ubuntu-18.04
|
||||
tool:
|
||||
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt
|
||||
- cargo-hack@0.5.10,cargo-llvm-cov@0.1.13,cargo-minimal-versions@0.1.1,parse-changelog@0.4.6,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2
|
||||
# NOTE: Specifying the version of valgrind and wasm-pack is not supported.
|
||||
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt,valgrind,wasm-pack,wasmtime
|
||||
- cargo-hack@0.5.12,cargo-llvm-cov@0.2.0,cargo-minimal-versions@0.1.3,parse-changelog@0.4.7,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2,wasmtime@0.33.0
|
||||
include:
|
||||
- os: macos-10.15
|
||||
tool: cargo-hack@0.5.10,cargo-llvm-cov@0.1.13,cargo-minimal-versions@0.1.1,parse-changelog@0.4.6,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2
|
||||
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt,wasm-pack,wasmtime
|
||||
- os: windows-2019
|
||||
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog
|
||||
- os: windows-2019
|
||||
tool: cargo-hack@0.5.10,cargo-llvm-cov@0.1.13,cargo-minimal-versions@0.1.1,parse-changelog@0.4.6,cross@0.2.1
|
||||
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
35
CHANGELOG.md
35
CHANGELOG.md
@@ -10,6 +10,33 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.1.4] - 2022-02-06
|
||||
|
||||
- Update `cargo-llvm-cov@latest` to 0.2.0.
|
||||
|
||||
## [1.1.3] - 2022-02-06
|
||||
|
||||
- Update `cargo-minimal-versions@latest` to 0.1.3.
|
||||
|
||||
## [1.1.2] - 2022-01-21
|
||||
|
||||
- Update `cargo-hack@latest` to 0.5.12.
|
||||
- Update `cargo-llvm-cov@latest` to 0.1.16.
|
||||
- Update `cargo-minimal-versions@latest` to 0.1.2.
|
||||
- Update `parse-changelog@latest` to 0.4.7.
|
||||
|
||||
## [1.1.1] - 2022-01-21
|
||||
|
||||
- Update `cargo-hack@latest` to 0.5.11.
|
||||
|
||||
## [1.1.0] - 2022-01-09
|
||||
|
||||
- Support `valgrind`, `wasm-pack`, and `wasmtime`.
|
||||
|
||||
## [1.0.3] - 2022-01-06
|
||||
|
||||
- Update `cargo-llvm-cov@latest` to 0.1.15.
|
||||
|
||||
## [1.0.2] - 2022-01-05
|
||||
|
||||
- Update `cargo-minimal-versions@latest` to 0.1.1.
|
||||
@@ -22,7 +49,13 @@ 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.0.2...HEAD
|
||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v1.1.4...HEAD
|
||||
[1.1.4]: https://github.com/taiki-e/install-action/compare/v1.1.3...v1.1.4
|
||||
[1.1.3]: https://github.com/taiki-e/install-action/compare/v1.1.2...v1.1.3
|
||||
[1.1.2]: https://github.com/taiki-e/install-action/compare/v1.1.1...v1.1.2
|
||||
[1.1.1]: https://github.com/taiki-e/install-action/compare/v1.1.0...v1.1.1
|
||||
[1.1.0]: https://github.com/taiki-e/install-action/compare/v1.0.3...v1.1.0
|
||||
[1.0.3]: https://github.com/taiki-e/install-action/compare/v1.0.2...v1.0.3
|
||||
[1.0.2]: https://github.com/taiki-e/install-action/compare/v1.0.1...v1.0.2
|
||||
[1.0.1]: https://github.com/taiki-e/install-action/compare/v1.0.0...v1.0.1
|
||||
[1.0.0]: https://github.com/taiki-e/install-action/releases/tag/v1.0.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.9
|
||||
tool: cargo-hack@0.5.11
|
||||
```
|
||||
|
||||
To install multiple tools:
|
||||
@@ -73,6 +73,9 @@ https://spdx.org/licenses
|
||||
| [**cross**](https://github.com/rust-embedded/cross) | `~/.cargo/bin` | [GitHub Releases](https://github.com/rust-embedded/cross/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rust-embedded/cross/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/rust-embedded/cross/blob/HEAD/LICENSE-MIT) |
|
||||
| [**shellcheck**](https://www.shellcheck.net) | `/usr/local/bin` | [GitHub Releases](https://github.com/koalaman/shellcheck/releases) | Linux, macOS | [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 | [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) |
|
||||
| [**wasm-pack**](https://github.com/rustwasm/wasm-pack) | `~/.cargo/bin` | [GitHub Releases](https://github.com/rustwasm/wasm-pack/releases) | Linux, macOS | [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/bin` | [GitHub Releases](https://github.com/bytecodealliance/wasmtime/releases) | Linux, macOS | [Apache-2.0 WITH LLVM-exception](https://github.com/bytecodealliance/wasmtime/blob/HEAD/LICENSE) |
|
||||
|
||||
<!-- TODO:
|
||||
| [**cmake**](https://cmake.org) | | [GitHub Releases](https://github.com/Kitware/CMake/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/Kitware/CMake/blob/HEAD/Copyright.txt) |
|
||||
|
||||
55
main.sh
55
main.sh
@@ -28,7 +28,7 @@ warn() {
|
||||
echo "::warning::$*"
|
||||
}
|
||||
info() {
|
||||
echo >&2 "info: $*"
|
||||
echo "info: $*"
|
||||
}
|
||||
|
||||
if [[ $# -gt 0 ]]; then
|
||||
@@ -57,13 +57,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.10" ;;
|
||||
cargo-hack) latest_version="0.5.12" ;;
|
||||
# https://github.com/taiki-e/cargo-llvm-cov/releases
|
||||
cargo-llvm-cov) latest_version="0.1.13" ;;
|
||||
cargo-llvm-cov) latest_version="0.2.0" ;;
|
||||
# https://github.com/taiki-e/cargo-minimal-versions/releases
|
||||
cargo-minimal-versions) latest_version="0.1.1" ;;
|
||||
cargo-minimal-versions) latest_version="0.1.3" ;;
|
||||
# https://github.com/taiki-e/parse-changelog/releases
|
||||
parse-changelog) latest_version="0.4.6" ;;
|
||||
parse-changelog) latest_version="0.4.7" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
repo="taiki-e/${tool}"
|
||||
@@ -136,6 +136,49 @@ for tool in "${tools[@]}"; do
|
||||
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused -o /usr/local/bin/shfmt "${url}"
|
||||
chmod +x /usr/local/bin/shfmt
|
||||
;;
|
||||
valgrind)
|
||||
case "${OSTYPE}" in
|
||||
linux*) ;;
|
||||
darwin* | cygwin* | msys*) bail "${tool} for non-linux is not supported yet by this action" ;;
|
||||
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
|
||||
esac
|
||||
case "${version}" in
|
||||
latest) ;;
|
||||
*) warn "specifying the version of ${tool} is not supported yet by this action" ;;
|
||||
esac
|
||||
sudo apt-get -o Acquire::Retries=10 -qq update
|
||||
# libc6-dbg is needed to run Valgrind
|
||||
sudo apt-get -o Acquire::Retries=10 -qq -o Dpkg::Use-Pty=0 install -y libc6-dbg
|
||||
# Use snap to install the latest Valgrind
|
||||
# https://snapcraft.io/install/valgrind/ubuntu
|
||||
sudo snap install valgrind --classic
|
||||
;;
|
||||
wasm-pack)
|
||||
# https://rustwasm.github.io/wasm-pack/installer
|
||||
case "${OSTYPE}" in
|
||||
linux* | darwin*) ;;
|
||||
cygwin* | msys*) bail "${tool} for windows is not supported yet by this action" ;;
|
||||
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
|
||||
esac
|
||||
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused https://rustwasm.github.io/wasm-pack/installer/init.sh | sh
|
||||
;;
|
||||
wasmtime)
|
||||
# https://github.com/bytecodealliance/wasmtime/releases
|
||||
latest_version="0.33.0"
|
||||
repo="bytecodealliance/wasmtime"
|
||||
case "${OSTYPE}" in
|
||||
linux*) target="x86_64-linux" ;;
|
||||
darwin*) target="x86_64-macos" ;;
|
||||
cygwin* | msys*) bail "${tool} for windows is not supported yet by this action" ;;
|
||||
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
|
||||
esac
|
||||
case "${version}" in
|
||||
latest) version="${latest_version}" ;;
|
||||
esac
|
||||
url="https://github.com/bytecodealliance/wasmtime/releases/download/v${version}/wasmtime-v${version}-${target}.tar.xz"
|
||||
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
|
||||
| tar xJf - --strip-components 1 -C ~/.cargo/bin "wasmtime-v${version}-${target}/wasmtime"
|
||||
;;
|
||||
*) bail "unsupported tool '${tool}'" ;;
|
||||
esac
|
||||
|
||||
@@ -144,5 +187,5 @@ for tool in "${tools[@]}"; do
|
||||
cargo-*) x cargo "${tool#cargo-}" --version ;;
|
||||
*) x "${tool}" --version ;;
|
||||
esac
|
||||
echo >&2
|
||||
echo
|
||||
done
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
cd "$(dirname "$0")"/..
|
||||
|
||||
# Publish a new release.
|
||||
#
|
||||
@@ -10,8 +11,6 @@ IFS=$'\n\t'
|
||||
# NOTE:
|
||||
# - This script requires parse-changelog <https://github.com/taiki-e/parse-changelog>
|
||||
|
||||
cd "$(cd "$(dirname "$0")" && pwd)"/..
|
||||
|
||||
bail() {
|
||||
echo >&2 "error: $*"
|
||||
exit 1
|
||||
@@ -37,6 +36,9 @@ echo "============== CHANGELOG =============="
|
||||
parse-changelog CHANGELOG.md "${version}"
|
||||
echo "======================================="
|
||||
|
||||
if ! grep <CHANGELOG.md -E "^## \\[${version//./\\.}\\] - $(date --utc '+%Y-%m-%d')$" >/dev/null; then
|
||||
bail "not found section '[${version}] - $(date --utc '+%Y-%m-%d')' in CHANGELOG.md"
|
||||
fi
|
||||
if ! grep <CHANGELOG.md -E "^\\[${version//./\\.}\\]: " >/dev/null; then
|
||||
bail "not found link to [${version}] in CHANGELOG.md"
|
||||
fi
|
||||
@@ -54,6 +56,9 @@ tools=(
|
||||
cross
|
||||
shellcheck
|
||||
shfmt
|
||||
valgrind
|
||||
wasm-pack
|
||||
wasmtime
|
||||
)
|
||||
|
||||
(
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# shellcheck disable=SC2046
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
cd "$(dirname "$0")"/..
|
||||
|
||||
# USAGE:
|
||||
# ./tools/tidy.sh
|
||||
@@ -11,8 +12,6 @@ IFS=$'\n\t'
|
||||
# - prettier
|
||||
# - shellcheck
|
||||
|
||||
cd "$(cd "$(dirname "$0")" && pwd)"/..
|
||||
|
||||
x() {
|
||||
local cmd="$1"
|
||||
shift
|
||||
|
||||
Reference in New Issue
Block a user