Compare commits

...

154 Commits

Author SHA1 Message Date
Taiki Endo
de0e9b667c Release 1.10.2 2022-08-01 19:49:40 +09:00
Taiki Endo
45e69d69e2 Support protoc on Windows 2022-08-01 19:43:41 +09:00
Taiki Endo
9c40419eb7 Release 1.10.1 2022-08-01 18:19:11 +09:00
Taiki Endo
b8a66e6289 Update readme and changelog 2022-08-01 18:19:01 +09:00
Taiki Endo
a8803585a3 Fix missing include files when installing protoc on Linux and macOS 2022-08-01 18:07:53 +09:00
Taiki Endo
80528fecb9 Release 1.10.0 2022-08-01 17:43:41 +09:00
Taiki Endo
878e967972 Set PROTOC environment variable when installing protoc 2022-08-01 17:40:32 +09:00
Taiki Endo
b1b32c59f1 Tweak readme 2022-08-01 17:30:50 +09:00
Taiki Endo
a8398547d2 Release 1.9.0 2022-08-01 17:27:44 +09:00
Taiki Endo
15ad10ce15 Update readme 2022-08-01 17:26:13 +09:00
Taiki Endo
27a2597e2a Support protoc 2022-08-01 17:23:02 +09:00
Taiki Endo
41cb1134d7 Release 1.8.4 2022-08-01 12:16:56 +09:00
Taiki Endo
13e84cc696 Update cargo-llvm-cov to 0.4.13 2022-08-01 12:03:10 +09:00
Taiki Endo
d744cfca57 Release 1.8.3 2022-07-30 17:56:09 +09:00
Taiki Endo
f6e099c85c Support shorthand for mdbook-linkcheck 2022-07-30 17:56:01 +09:00
Taiki Endo
a86d24f499 Release 1.8.2 2022-07-30 16:55:08 +09:00
Taiki Endo
c13274e43a Update cargo-llvm-cov to 0.4.12 2022-07-30 16:53:29 +09:00
Taiki Endo
b0d750a59e Update cargo-hack to 0.5.16 2022-07-30 15:20:07 +09:00
Taiki Endo
7d5481ab3a Release 1.8.1 2022-07-26 12:08:13 +09:00
Taiki Endo
b6afd8d427 Fix cargo-binstall installation failure take 2 2022-07-26 12:07:17 +09:00
Taiki Endo
d1839c2f68 Fix cargo-binstall installation failure
`head` doesn't accept `1` option.
2022-07-26 12:05:34 +09:00
Taiki Endo
85064bbc1c Move cargo-binstall version output to install_cargo_binstall 2022-07-26 12:03:09 +09:00
Taiki Endo
9fdefab8ca Release 1.8.0 2022-07-26 11:36:08 +09:00
Taiki Endo
c430b7f8ce Update changelog 2022-07-26 11:33:53 +09:00
Taiki Endo
cfca345a65 Accept install-action@cargo-nextest 2022-07-26 11:33:53 +09:00
Christopher Durham
a76dc5ad72 Accept tool: cargo-nextest to install nextest (#15) 2022-07-26 11:30:14 +09:00
Christopher Durham
1dda3d1d7e Don't try to run cargo binstall --version (#16) 2022-07-26 11:30:04 +09:00
Taiki Endo
92705122ed Only use musl binaries for nextest if glibc isn't available
Closes #13
2022-07-26 11:21:16 +09:00
Taiki Endo
7e5692dc7d Release 1.7.0 2022-07-25 20:02:35 +09:00
Taiki Endo
8aa291abce Install Rust-related binaries to /usr/local/bin when cargo home is not available 2022-07-25 20:00:53 +09:00
Taiki Endo
36cb23f9a6 Release 1.6.1 2022-07-25 19:49:44 +09:00
Taiki Endo
ab4e6f5142 Update changelog 2022-07-25 19:49:37 +09:00
Taiki Endo
aae9c8b0a3 Fix install log for nextest 2022-07-25 19:47:04 +09:00
Taiki Endo
6eaed8fc4e Remove ... from log 2022-07-25 19:42:59 +09:00
Taiki Endo
fd84b52d9c Release 1.6.0 2022-07-25 19:40:48 +09:00
Taiki Endo
d637ba13b3 Set PATH internally when cargo home is not available 2022-07-25 19:38:45 +09:00
Taiki Endo
f343021ffc Cleanup
- Support mdbook-linkcheck.
- Support mdbook on Windows.
- Support wasmtime on Windows.
- Support nextest on Linux (musl).
- Fix installation failure when `$CARGO_HOME/bin` or `$HOME/.cargo/bin` is not available.

Fixes #11
2022-07-25 19:26:13 +09:00
Taiki Endo
d7602d9dcb Release 1.5.11 2022-07-25 14:49:21 +09:00
Taiki Endo
31800b17cc Fix cargo-binstall installation
Fixes #10
2022-07-25 14:47:39 +09:00
Taiki Endo
e6302a3430 Release 1.5.10 2022-07-24 13:22:47 +09:00
Taiki Endo
1e5fc1d1ff Update parse-changelog to 0.5.0 2022-07-24 13:08:44 +09:00
Taiki Endo
ca9824f699 Release 1.5.9 2022-07-23 03:34:27 +09:00
Taiki Endo
de0d285973 Update mdbook to 0.4.21 2022-07-23 03:32:40 +09:00
Taiki Endo
fb59c794dd Use macos-11 instead of deprecated macos-10.15
Refs: https://github.com/actions/virtual-environments/issues/5583
2022-07-21 21:58:15 +09:00
Taiki Endo
daa62f7ff1 Update wasmtime to 0.39.1 2022-07-21 21:58:07 +09:00
Taiki Endo
f113ef4cd9 Release 1.5.8 2022-07-21 10:16:36 +09:00
Taiki Endo
6a6a02956b Update wasmtime to 0.39.0 2022-07-21 10:07:56 +09:00
Taiki Endo
782f135cee Release 1.5.7 2022-07-21 00:18:12 +09:00
Taiki Endo
d39d50062b Update cargo-llvm-cov to 0.4.11 2022-07-21 00:16:52 +09:00
Taiki Endo
6f1ebcd9e2 Release 1.5.6 2022-07-18 16:01:38 +09:00
Taiki Endo
161dccbf9a Update cargo-llvm-cov to 0.4.10 2022-07-18 15:54:38 +09:00
Taiki Endo
b410f0ad6a Release 1.5.5 2022-07-18 14:25:59 +09:00
Taiki Endo
e067205061 Update cargo-hack to 0.5.15 2022-07-18 14:19:39 +09:00
Taiki Endo
78118df4d7 Release 1.5.4 2022-07-16 17:23:56 +09:00
Taiki Endo
1cbab0616a Update cross, cargo-minimal-versions, and parse-changelog 2022-07-16 17:22:27 +09:00
Taiki Endo
e937b634a0 Update mdbook to 0.4.20 2022-07-16 16:19:22 +09:00
Taiki Endo
37f510303a Release 1.5.3 2022-07-08 00:35:25 +09:00
Taiki Endo
841e33c134 Update cargo-llvm-cov to 0.4.9 2022-07-08 00:28:29 +09:00
Taiki Endo
095ba5e160 Update tools/publish.sh 2022-07-06 03:39:38 +09:00
Taiki Endo
0e32218b80 Release 1.5.2 2022-07-03 01:22:05 +09:00
Taiki Endo
4a4d2c21ca Update cross to 0.2.2 2022-07-02 22:50:11 +09:00
Taiki Endo
64d4f090ec Revert "Update cross to 0.2.2"
This reverts commit 60952837b3.
2022-07-02 22:40:49 +09:00
Taiki Endo
60952837b3 Update cross to 0.2.2 2022-07-02 22:38:45 +09:00
Taiki Endo
640bc768ee Release 1.5.1 2022-07-02 22:34:50 +09:00
Taiki Endo
d5b4eb3fc2 Update mdbook to 0.4.19 2022-07-02 21:04:09 +09:00
Taiki Endo
83e8fa8971 Release 1.5.0 2022-06-29 00:36:31 +09:00
Taiki Endo
2ab583ea78 Update changelog 2022-06-29 00:32:07 +09:00
Taiki Endo
6745402100 Update wasmtime to 0.38.1 2022-06-29 00:30:20 +09:00
Jiahao XU
03433ef024 Enable secure mode for cargo-binstall (#9)
`--secure` mode 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

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-29 00:28:27 +09:00
Taiki Endo
47e0a4c507 Release 1.4.2 2022-06-17 00:58:42 +09:00
Taiki Endo
7909142ffc Update cargo-llvm-cov to 0.4.8 2022-06-17 00:55:47 +09:00
Taiki Endo
cc6a4561c7 Release 1.4.1 2022-06-14 01:10:14 +09:00
Taiki Endo
e71b030c0f Update cargo-llvm-cov to 0.4.7 2022-06-14 01:07:01 +09:00
Taiki Endo
2e924a47e0 Update cargo-llvm-cov to 0.4.6 2022-06-13 22:12:26 +09:00
Taiki Endo
27b6cde93d Use -u instead of --utc to compatibility with BSD's date command 2022-06-13 22:09:25 +09:00
Taiki Endo
238cf20a47 Update readme 2022-06-10 23:39:53 +09:00
Taiki Endo
5d3b331fca Release 1.4.0 2022-06-10 23:06:24 +09:00
Taiki Endo
362d8665ec Prepare next release 2022-06-10 23:06:10 +09:00
Taiki Endo
0b1022563b Re-add version info output 2022-06-10 22:28:13 +09:00
Taiki Endo
70b038cf3c Update shfmt to 3.5.1 2022-06-10 22:23:07 +09:00
Jiahao XU
2e2f046ba3 Use cargo-binstall as fallback in main.sh (#8)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-10 22:19:55 +09:00
Taiki Endo
bc0a06a003 Release 1.3.13 2022-06-02 22:51:55 +09:00
Taiki Endo
8b8c667dd4 Update cargo-hack, cargo-llvm-cov, cargo-minimal-versions, and parse-changelog 2022-06-02 22:25:54 +09:00
Taiki Endo
b0517abb78 Release 1.3.12 2022-05-30 10:31:05 +09:00
Taiki Endo
e92f6df9a9 Update cargo-llvm-cov to 0.4.4 2022-05-30 10:29:24 +09:00
Taiki Endo
c2d1a0109d Release 1.3.11 2022-05-29 23:18:39 +09:00
Taiki Endo
faecae2c4d Update cargo-llvm-cov to 0.4.3 2022-05-29 23:15:27 +09:00
Taiki Endo
c9f17ee0e8 Release 1.3.10 2022-05-24 22:58:54 +09:00
Taiki Endo
128d64bf89 Update cargo-llvm-cov to 0.4.1 2022-05-24 22:56:58 +09:00
Taiki Endo
cc153c439a Release 1.3.9 2022-05-21 09:20:53 +09:00
Taiki Endo
68092bc267 Update wasmtime to 0.37.0 2022-05-21 09:04:37 +09:00
Taiki Endo
04e2194ad0 Release 1.3.8 2022-05-13 07:34:15 +09:00
Taiki Endo
9d4e8b470d Update shfmt to 3.5.0 2022-05-13 07:31:24 +09:00
Taiki Endo
7ac23e803d Release 1.3.7 2022-05-12 10:04:41 +09:00
Taiki Endo
1a26a6ebba Update cargo-hack and cargo-llvm-cov 2022-05-12 09:55:58 +09:00
Taiki Endo
74b1a6bda9 Release 1.3.6 2022-05-07 07:42:15 +09:00
Taiki Endo
3e62d0866a Update cargo-llvm-cov to 0.3.3 2022-05-07 07:38:46 +09:00
Taiki Endo
d6786821c2 Release 1.3.5 2022-05-06 07:56:11 +09:00
Taiki Endo
89155eb702 Update cargo-llvm-cov to 0.3.2 2022-05-06 07:52:13 +09:00
Taiki Endo
bb135877f4 Release 1.3.4 2022-05-01 23:18:09 +09:00
Taiki Endo
97a43ec52d Update cargo-llvm-cov to 0.3.1 2022-05-01 23:15:54 +09:00
Taiki Endo
f0cf8b84ad Release 1.3.3 2022-04-22 00:38:03 +09:00
Taiki Endo
330a7255ba Update wasmtime to 0.36.0 2022-04-22 00:12:27 +09:00
Taiki Endo
977df53448 Release 1.3.2 2022-04-16 11:15:36 +09:00
Taiki Endo
c2b3577a83 Update mdbook and wasmtime 2022-04-16 11:14:16 +09:00
Taiki Endo
18725c2474 Release 1.3.1 2022-04-08 19:59:34 +09:00
Taiki Endo
e28740909a Update CI config 2022-04-08 19:59:07 +09:00
Taiki Endo
9da79e8635 Update cargo-llvm-cov to 0.3.0 2022-04-08 19:57:41 +09:00
Taiki Endo
6e040510bb Fix changelog 2022-04-04 21:52:44 +09:00
Taiki Endo
35203641a6 Release 1.3.0 2022-04-04 21:49:48 +09:00
Taiki Endo
22a596fc5d Update changelog 2022-04-04 21:49:36 +09:00
Taiki Endo
ceb63b7192 Revert format change 2022-04-04 21:03:25 +09:00
Thom Chiovoloni
7718ce3390 Don't test mdbook on ubuntu 18.04 in CI 2022-04-04 21:03:25 +09:00
Thom Chiovoloni
33b9c363cc Add support for mdbook 2022-04-04 21:03:25 +09:00
Taiki Endo
c28a9b2f8c Release 1.2.2 2022-03-19 02:27:31 +09:00
Taiki Endo
d334ea4167 Update changelog 2022-03-19 02:27:25 +09:00
Rain
535250de6e for nextest action, use version in URL 2022-03-19 02:22:37 +09:00
Taiki Endo
c5927f82cd Release 1.2.1 2022-03-19 00:50:40 +09:00
Taiki Endo
f06ff66739 Update cargo-llvm-cov to 0.2.4 2022-03-19 00:45:08 +09:00
Taiki Endo
9983065757 Release 1.2.0 2022-03-19 00:00:26 +09:00
Taiki Endo
92f66cb09d Support nextest 2022-03-18 23:59:52 +09:00
Taiki Endo
af68e07c71 Release 1.1.9 2022-03-10 12:55:08 +09:00
Taiki Endo
c94ae05707 Update wasmtime to 0.35.1 2022-03-10 12:52:37 +09:00
Taiki Endo
374e0c54c9 Update actions/checkout action to v3 2022-03-09 23:54:49 +09:00
Taiki Endo
2e762384e0 Update wasmtime to 0.35.0 2022-03-09 23:54:42 +09:00
Taiki Endo
038c2c6c1b Release 1.1.8 2022-03-05 20:11:47 +09:00
Taiki Endo
e50d40cb78 Update cargo-llvm-cov to 0.2.3 2022-03-05 20:09:55 +09:00
Taiki Endo
decc7be9bf Release 1.1.7 2022-03-02 12:18:31 +09:00
Taiki Endo
01ea03f457 Update tools/publish.sh 2022-03-02 12:17:34 +09:00
Taiki Endo
de870dd7b6 Update cargo-llvm-cov to 0.2.2 2022-03-02 12:17:05 +09:00
Taiki Endo
7b2bc6ded8 Release 1.1.6 2022-02-20 11:26:34 +09:00
Taiki Endo
49d23019d2 Update cargo-llvm-cov and shfmt 2022-02-20 11:13:16 +09:00
Taiki Endo
9ac80a595c Revert "Update wasmtime to 0.34.1"
This reverts commit a3c80c04ed.

There is no x86_64 linux binary in https://github.com/bytecodealliance/wasmtime/releases/tag/v0.34.1.
2022-02-17 13:13:38 +09:00
Taiki Endo
a3c80c04ed Update wasmtime to 0.34.1 2022-02-17 13:07:07 +09:00
Taiki Endo
200308111f Update scripts 2022-02-17 13:06:46 +09:00
Taiki Endo
5df67a7818 Release 1.1.5 2022-02-08 12:17:51 +09:00
Taiki Endo
6a64a6dede Automate changelog update 2022-02-08 12:17:41 +09:00
Taiki Endo
6135833927 Update wasmtime to 0.34.0 2022-02-08 11:42:37 +09:00
Taiki Endo
fb7c739bcd Update URLs of cross 2022-02-06 23:11:33 +09:00
Taiki Endo
ff05552c79 Release 1.1.4 2022-02-06 23:07:42 +09:00
Taiki Endo
d037a2617d Update cargo-llvm-cov to 0.2.0 2022-02-06 23:05:04 +09:00
Taiki Endo
2e9722e984 Release 1.1.3 2022-02-06 10:03:50 +09:00
Taiki Endo
effa33c167 Update scripts 2022-02-06 10:00:55 +09:00
Taiki Endo
2e45a72791 Update cargo-minimal-versions to 0.1.3 2022-02-06 10:00:43 +09:00
Taiki Endo
17a6efb458 Release 1.1.2 2022-01-22 01:01:30 +09:00
Taiki Endo
5c982063f4 Update cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog 2022-01-22 00:59:13 +09:00
Taiki Endo
d15809d0ff Release 1.1.1 2022-01-21 14:38:33 +09:00
Taiki Endo
fc28b6c995 Update cargo-hack to 0.5.11 2022-01-21 14:37:35 +09:00
Taiki Endo
dbea48787c Release 1.1.0 2022-01-09 18:57:02 +09:00
Taiki Endo
5a0c826638 Support wasmtime 2022-01-09 18:53:39 +09:00
Taiki Endo
ba3d801fa2 Support wasm-pack 2022-01-09 18:53:31 +09:00
Taiki Endo
aab5a1fdfb Support valgrind 2022-01-09 18:23:50 +09:00
Taiki Endo
d612fc86be Release 1.0.3 2022-01-07 03:16:12 +09:00
Taiki Endo
b3b9147ed7 Update cargo-llvm-cov to 0.1.15 2022-01-07 03:12:35 +09:00
7 changed files with 722 additions and 74 deletions

View File

@@ -23,20 +23,26 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-18.04
- ubuntu-20.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-watch is supported by cargo-binstall (through quickinstall)
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,nextest,protoc,shellcheck,shfmt,valgrind,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
- cargo-hack@0.5.16,cargo-llvm-cov@0.4.13,cargo-minimal-versions@0.1.5,parse-changelog@0.5.0,cross@0.2.4,nextest@0.9.11,protoc@3.21.4,shellcheck@0.8.0,shfmt@3.5.1,wasmtime@0.39.1,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-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
# Note: mdBook binary is incompatible with ubuntu 18.04,
# see https://github.com/rust-lang/mdBook/issues/1779
- os: ubuntu-18.04
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,nextest,protoc,shellcheck,shfmt,valgrind,wasm-pack,wasmtime,mdbook-linkcheck,cargo-watch
- os: macos-11
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,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
- 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,nextest,protoc,shellcheck,shfmt,wasmtime,mdbook,mdbook-linkcheck,cargo-watch
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: ./
@@ -46,7 +52,7 @@ jobs:
tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: taiki-e/install-action@shellcheck

View File

@@ -18,7 +18,7 @@ jobs:
if: github.repository_owner == 'taiki-e'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: taiki-e/create-gh-release-action@v1

View File

@@ -10,6 +10,255 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [1.10.2] - 2022-08-01
- Support `protoc` on Windows.
## [1.10.1] - 2022-08-01
- Fix missing include files when installing `protoc` on Linux and macOS.
- Installation of `protoc` on Windows is not currently working (in all released versions) and is considered unsupported.
## [1.10.0] - 2022-08-01
- Set the `PROTOC` environment variable when installing `protoc` if it has not already been set.
## [1.9.0] - 2022-08-01
- Support `protoc`.
- Support `shellcheck` on Windows.
- Support `shfmt` on Windows.
## [1.8.4] - 2022-08-01
- Update `cargo-llvm-cov@latest` to 0.4.13.
## [1.8.3] - 2022-07-30
- Support `taiki-e/install-action@mdbook-linkcheck` shorthand for mdbook-linkcheck.
## [1.8.2] - 2022-07-30
- Update `cargo-hack@latest` to 0.5.16.
- Update `cargo-llvm-cov@latest` to 0.4.12.
## [1.8.1] - 2022-07-26
- Fix `cargo-binstall` installation failure.
## [1.8.0] - 2022-07-26
- Only use musl binaries for nextest if glibc isn't available. See [#13](https://github.com/taiki-e/install-action/issues/13) for more.
- Fix `cargo-binstall` installation failure. ([#16](https://github.com/taiki-e/install-action/pull/16), thanks @CAD97)
- Accept `cargo-nextest` as an alias for `nextest`. ([#15](https://github.com/taiki-e/install-action/pull/15), thanks @CAD97)
## [1.7.0] - 2022-07-25
- Install Rust-related binaries to `/usr/local/bin` when `$CARGO_HOME/bin` and `$HOME/.cargo/bin` is not available.
## [1.6.1] - 2022-07-25
- Fix diagnostics.
## [1.6.0] - 2022-07-25
- Support `mdbook-linkcheck`.
- Support `mdbook` on Windows.
- Support `wasmtime` on Windows.
- Support `nextest` on Linux (musl).
- Fix installation failure when `$CARGO_HOME/bin` and `$HOME/.cargo/bin` is not available.
## [1.5.11] - 2022-07-25
- Fix `cargo-binstall` installation on macOS and Windows.
## [1.5.10] - 2022-07-24
- Update `parse-changelog@latest` to 0.5.0.
## [1.5.9] - 2022-07-22
- Update `wasmtime@latest` to 0.39.1.
- Update `mdbook@latest` to 0.4.21.
## [1.5.8] - 2022-07-21
- Update `wasmtime@latest` to 0.39.0.
## [1.5.7] - 2022-07-20
- Update `cargo-llvm-cov@latest` to 0.4.11.
## [1.5.6] - 2022-07-18
- Update `cargo-llvm-cov@latest` to 0.4.10.
## [1.5.5] - 2022-07-18
- Update `cargo-hack@latest` to 0.5.15.
## [1.5.4] - 2022-07-16
- Update `mdbook@latest` to 0.4.20.
- Update `cross@latest` to 0.2.4.
- Update `cargo-minimal-versions@latest` to 0.1.5.
- Update `parse-changelog@latest` to 0.4.9.
## [1.5.3] - 2022-07-07
- Update `cargo-llvm-cov@latest` to 0.4.9.
## [1.5.2] - 2022-07-02
- Update `cross@latest` to 0.2.2.
## [1.5.1] - 2022-07-02
- Update `mdbook@latest` to 0.4.19.
## [1.5.0] - 2022-06-28
- Enable secure mode for `cargo-binstall`. ([#9](https://github.com/taiki-e/install-action/pull/9), thanks @NobodyXu)
- Update `wasmtime@latest` to 0.38.1.
## [1.4.2] - 2022-06-16
- Update `cargo-llvm-cov@latest` to 0.4.8.
## [1.4.1] - 2022-06-13
- Update `cargo-llvm-cov@latest` to 0.4.7.
## [1.4.0] - 2022-06-10
- Support `cargo-binstall`. ([#8](https://github.com/taiki-e/install-action/pull/8), thanks @NobodyXu)
- Use `cargo-binstall` as a fallback if the unsupported package is specified. ([#8](https://github.com/taiki-e/install-action/pull/8), thanks @NobodyXu)
- Update `shfmt@latest` to 3.5.1.
## [1.3.13] - 2022-06-02
- Update `cargo-hack@latest` to 0.5.14.
- Update `cargo-llvm-cov@latest` to 0.4.5.
- Update `cargo-minimal-versions@latest` to 0.1.4.
- Update `parse-changelog@latest` to 0.4.8.
## [1.3.12] - 2022-05-30
- Update `cargo-llvm-cov@latest` to 0.4.4.
## [1.3.11] - 2022-05-29
- Update `cargo-llvm-cov@latest` to 0.4.3.
## [1.3.10] - 2022-05-24
- Update `cargo-llvm-cov@latest` to 0.4.1.
## [1.3.9] - 2022-05-21
- Update `wasmtime@latest` to 0.37.0.
## [1.3.8] - 2022-05-12
- Update `shfmt@latest` to 3.5.0.
## [1.3.7] - 2022-05-12
- Update `cargo-hack@latest` to 0.5.13.
- Update `cargo-llvm-cov@latest` to 0.4.0.
## [1.3.6] - 2022-05-06
- Update `cargo-llvm-cov@latest` to 0.3.3.
## [1.3.5] - 2022-05-05
- Update `cargo-llvm-cov@latest` to 0.3.2.
## [1.3.4] - 2022-05-01
- Update `cargo-llvm-cov@latest` to 0.3.1.
## [1.3.3] - 2022-04-21
- Update `wasmtime@latest` to 0.36.0.
## [1.3.2] - 2022-04-16
- Update `mdbook@latest` to 0.4.18.
- Update `wasmtime@latest` to 0.35.3.
## [1.3.1] - 2022-04-08
- Update `cargo-llvm-cov@latest` to 0.3.0.
## [1.3.0] - 2022-04-04
- Support `mdbook`. ([#4](https://github.com/taiki-e/install-action/pull/4), thanks @thomcc)
## [1.2.2] - 2022-03-18
- Support specifying the version of `nextest`. ([#3](https://github.com/taiki-e/install-action/pull/3), thanks @sunshowers)
## [1.2.1] - 2022-03-18
- Update `cargo-llvm-cov@latest` to 0.2.4.
## [1.2.0] - 2022-03-18
- Support `nextest`.
## [1.1.9] - 2022-03-10
- Update `wasmtime@latest` to 0.35.1.
## [1.1.8] - 2022-03-05
- Update `cargo-llvm-cov@latest` to 0.2.3.
## [1.1.7] - 2022-03-02
- Update `cargo-llvm-cov@latest` to 0.2.2.
## [1.1.6] - 2022-02-20
- Update `cargo-llvm-cov@latest` to 0.2.1.
- Update `shfmt@latest` to 3.4.3.
## [1.1.5] - 2022-02-08
- Update `wasmtime@latest` to 0.34.0.
## [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 +271,62 @@ 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.10.2...HEAD
[1.10.2]: https://github.com/taiki-e/install-action/compare/v1.10.1...v1.10.2
[1.10.1]: https://github.com/taiki-e/install-action/compare/v1.10.0...v1.10.1
[1.10.0]: https://github.com/taiki-e/install-action/compare/v1.9.0...v1.10.0
[1.9.0]: https://github.com/taiki-e/install-action/compare/v1.8.4...v1.9.0
[1.8.4]: https://github.com/taiki-e/install-action/compare/v1.8.3...v1.8.4
[1.8.3]: https://github.com/taiki-e/install-action/compare/v1.8.2...v1.8.3
[1.8.2]: https://github.com/taiki-e/install-action/compare/v1.8.1...v1.8.2
[1.8.1]: https://github.com/taiki-e/install-action/compare/v1.8.0...v1.8.1
[1.8.0]: https://github.com/taiki-e/install-action/compare/v1.7.0...v1.8.0
[1.7.0]: https://github.com/taiki-e/install-action/compare/v1.6.1...v1.7.0
[1.6.1]: https://github.com/taiki-e/install-action/compare/v1.6.0...v1.6.1
[1.6.0]: https://github.com/taiki-e/install-action/compare/v1.5.11...v1.6.0
[1.5.11]: https://github.com/taiki-e/install-action/compare/v1.5.10...v1.5.11
[1.5.10]: https://github.com/taiki-e/install-action/compare/v1.5.9...v1.5.10
[1.5.9]: https://github.com/taiki-e/install-action/compare/v1.5.8...v1.5.9
[1.5.8]: https://github.com/taiki-e/install-action/compare/v1.5.7...v1.5.8
[1.5.7]: https://github.com/taiki-e/install-action/compare/v1.5.6...v1.5.7
[1.5.6]: https://github.com/taiki-e/install-action/compare/v1.5.5...v1.5.6
[1.5.5]: https://github.com/taiki-e/install-action/compare/v1.5.4...v1.5.5
[1.5.4]: https://github.com/taiki-e/install-action/compare/v1.5.3...v1.5.4
[1.5.3]: https://github.com/taiki-e/install-action/compare/v1.5.2...v1.5.3
[1.5.2]: https://github.com/taiki-e/install-action/compare/v1.5.1...v1.5.2
[1.5.1]: https://github.com/taiki-e/install-action/compare/v1.5.0...v1.5.1
[1.5.0]: https://github.com/taiki-e/install-action/compare/v1.4.2...v1.5.0
[1.4.2]: https://github.com/taiki-e/install-action/compare/v1.4.1...v1.4.2
[1.4.1]: https://github.com/taiki-e/install-action/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/taiki-e/install-action/compare/v1.3.13...v1.4.0
[1.3.13]: https://github.com/taiki-e/install-action/compare/v1.3.12...v1.3.13
[1.3.12]: https://github.com/taiki-e/install-action/compare/v1.3.11...v1.3.12
[1.3.11]: https://github.com/taiki-e/install-action/compare/v1.3.10...v1.3.11
[1.3.10]: https://github.com/taiki-e/install-action/compare/v1.3.9...v1.3.10
[1.3.9]: https://github.com/taiki-e/install-action/compare/v1.3.8...v1.3.9
[1.3.8]: https://github.com/taiki-e/install-action/compare/v1.3.7...v1.3.8
[1.3.7]: https://github.com/taiki-e/install-action/compare/v1.3.6...v1.3.7
[1.3.6]: https://github.com/taiki-e/install-action/compare/v1.3.5...v1.3.6
[1.3.5]: https://github.com/taiki-e/install-action/compare/v1.3.4...v1.3.5
[1.3.4]: https://github.com/taiki-e/install-action/compare/v1.3.3...v1.3.4
[1.3.3]: https://github.com/taiki-e/install-action/compare/v1.3.2...v1.3.3
[1.3.2]: https://github.com/taiki-e/install-action/compare/v1.3.1...v1.3.2
[1.3.1]: https://github.com/taiki-e/install-action/compare/v1.3.0...v1.3.1
[1.3.0]: https://github.com/taiki-e/install-action/compare/v1.2.2...v1.3.0
[1.2.2]: https://github.com/taiki-e/install-action/compare/v1.2.1...v1.2.2
[1.2.1]: https://github.com/taiki-e/install-action/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/taiki-e/install-action/compare/v1.1.9...v1.2.0
[1.1.9]: https://github.com/taiki-e/install-action/compare/v1.1.8...v1.1.9
[1.1.8]: https://github.com/taiki-e/install-action/compare/v1.1.7...v1.1.8
[1.1.7]: https://github.com/taiki-e/install-action/compare/v1.1.6...v1.1.7
[1.1.6]: https://github.com/taiki-e/install-action/compare/v1.1.5...v1.1.6
[1.1.5]: https://github.com/taiki-e/install-action/compare/v1.1.4...v1.1.5
[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

View File

@@ -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.16
```
To install multiple tools:
@@ -66,13 +66,27 @@ https://spdx.org/licenses
| Name | Where binaries will be installed | Where will it be installed from | Supported platform | License |
| ---- | -------------------------------- | ------------------------------- | ------------------ | ------- |
| [**cargo-hack**](https://github.com/taiki-e/cargo-hack) | `~/.cargo/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-hack/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-hack/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-hack/blob/HEAD/LICENSE-MIT) |
| [**cargo-llvm-cov**](https://github.com/taiki-e/cargo-llvm-cov) | `~/.cargo/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-llvm-cov/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-MIT) |
| [**cargo-minimal-versions**](https://github.com/taiki-e/cargo-minimal-versions) | `~/.cargo/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) |
| [**parse-changelog**](https://github.com/taiki-e/parse-changelog) | `~/.cargo/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) |
| [**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) |
| [**cargo-hack**](https://github.com/taiki-e/cargo-hack) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-hack/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-hack/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-hack/blob/HEAD/LICENSE-MIT) |
| [**cargo-llvm-cov**](https://github.com/taiki-e/cargo-llvm-cov) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-llvm-cov/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-MIT) |
| [**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) |
| [**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/ryankurte/cargo-binstall/releases) | Linux, macOS, Windows | [GPL-3.0](https://github.com/ryankurte/cargo-binstall/blob/HEAD/LICENSE.txt) |
| [**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-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) |
| [**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) |
| [**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) |
| [**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) |
| [**wasm-pack**](https://github.com/rustwasm/wasm-pack) | `$CARGO_HOME/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_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) |
If `$CARGO_HOME/bin` is not available, Rust-related binaries will be installed to `$HOME/.cargo/bin`.<br>
If `$HOME/.cargo/bin` is not available, Rust-related binaries will be installed to `/usr/local/bin`.<br>
If `/usr/local/bin` is not available, binaries will be installed to `$HOME/.install-action/bin`.<br>
If a tool not included in the list above is specified, this action uses [cargo-binstall] as a fallback.
<!-- 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) |
@@ -88,8 +102,11 @@ If you want a higher level of security, consider working on [#1](https://github.
- [create-gh-release-action]: GitHub Action for creating GitHub Releases based on changelog.
- [upload-rust-binary-action]: GitHub Action for building and uploading Rust binary to GitHub Releases.
- [setup-cross-toolchain-action]: GitHub Action for setup toolchains for cross compilation and cross testing for Rust.
[cargo-binstall]: https://github.com/ryankurte/cargo-binstall
[create-gh-release-action]: https://github.com/taiki-e/create-gh-release-action
[setup-cross-toolchain-action]: https://github.com/taiki-e/setup-cross-toolchain-action
[upload-rust-binary-action]: https://github.com/taiki-e/upload-rust-binary-action
## License

345
main.sh
View File

@@ -28,7 +28,103 @@ warn() {
echo "::warning::$*"
}
info() {
echo >&2 "info: $*"
echo "info: $*"
}
download() {
local url="$1"
local bin_dir="$2"
local bin="$3"
if [[ "${bin_dir}" == "/usr/"* ]]; then
if [[ ! -d "${bin_dir}" ]]; then
bin_dir="${HOME}/.install-action/bin"
if [[ ! -d "${bin_dir}" ]]; then
mkdir -p "${bin_dir}"
echo "${bin_dir}" >>"${GITHUB_PATH}"
export PATH="${PATH}:${bin_dir}"
fi
fi
fi
local tar_args=()
case "${url}" in
*.tar.gz | *.tgz) tar_args+=("xzf") ;;
*.tar.bz2 | *.tbz2) tar_args+=("xjf") ;;
*.tar.xz | *.txz) tar_args+=("xJf") ;;
*.zip)
mkdir -p .install-action-tmp
(
cd .install-action-tmp
info "downloading ${url}"
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" -o tmp.zip
unzip tmp.zip
mv "${bin}" "${bin_dir}/"
)
rm -rf .install-action-tmp
return 0
;;
*) bail "unrecognized archive format '${url}' for ${tool}" ;;
esac
tar_args+=("-")
local components
components=$(tr <<<"${bin}" -cd '/' | wc -c)
if [[ "${components}" != "0" ]]; then
tar_args+=(--strip-components "${components}")
fi
info "downloading ${url}"
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar "${tar_args[@]}" -C "${bin_dir}" "${bin}"
}
host_triple() {
if [[ -z "${host:-}" ]]; then
host="$(rustc -vV | grep host | cut -c 7-)"
fi
}
install_cargo_binstall() {
if [[ ! -f "${cargo_bin}/cargo-binstall" ]]; then
info "installing cargo-binstall"
host_triple
base_url=https://github.com/ryankurte/cargo-binstall/releases/latest/download/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" ;;
armv7-unknown-linux-gnueabihf) url="${base_url}-armv7-unknown-linux-musleabihf.tgz" ;;
armv7-unknown-linux-musleabihf) url="${base_url}-armv7-unknown-linux-musleabihf.tgz" ;;
aarch64-unknown-linux-gnu) url="${base_url}-aarch64-unknown-linux-musl.tgz" ;;
aarch64-unknown-linux-musl) url="${base_url}-aarch64-unknown-linux-musl.tgz" ;;
x86_64-pc-windows-gnu) url="${base_url}-x86_64-pc-windows-msvc.zip" ;;
x86_64-apple-darwin | aarch64-apple-darwin | x86_64-pc-windows-msvc)
url="${base_url}-${host}.zip"
;;
*) bail "unsupported target '${host}' for cargo-binstall" ;;
esac
download "${url}" "${cargo_bin}" "cargo-binstall${exe}"
info "cargo-binstall installed at $(type -P "cargo-binstall${exe}")"
x cargo binstall --help | head -1 # cargo binstall doesn't have a normal --version flag
else
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall"
fi
}
cargo_binstall() {
local tool="$1"
local version="$2"
info "install-action does not support ${tool}, fallback to cargo-binstall"
install_cargo_binstall
# --secure mode 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 --secure --no-confirm "$tool" ;;
*) cargo binstall --secure --no-confirm --version "$version" "$tool" ;;
esac
}
if [[ $# -gt 0 ]]; then
@@ -39,12 +135,21 @@ export DEBIAN_FRONTEND=noninteractive
# Inputs
tool="${INPUT_TOOL:-}"
tools=()
if [[ -n "${tool}" ]]; then
while read -rd,; do tools+=("${REPLY}"); done <<<"${tool},"
fi
exe=""
case "${OSTYPE}" in
cygwin* | msys*) exe=".exe" ;;
esac
cargo_bin="${CARGO_HOME:-"$HOME/.cargo"}/bin"
if [[ ! -d "${cargo_bin}" ]]; then
cargo_bin=/usr/local/bin
fi
for tool in "${tools[@]}"; do
if [[ "${tool}" == *"@"* ]]; then
version="${tool#*@}"
@@ -52,18 +157,19 @@ for tool in "${tools[@]}"; do
version="latest"
fi
tool="${tool%@*}"
bin="${tool}${exe}"
info "installing ${tool}@${version}"
case "${tool}" in
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.16" ;;
# https://github.com/taiki-e/cargo-llvm-cov/releases
cargo-llvm-cov) latest_version="0.1.13" ;;
cargo-llvm-cov) latest_version="0.4.13" ;;
# https://github.com/taiki-e/cargo-minimal-versions/releases
cargo-minimal-versions) latest_version="0.1.1" ;;
cargo-minimal-versions) latest_version="0.1.5" ;;
# https://github.com/taiki-e/parse-changelog/releases
parse-changelog) latest_version="0.4.6" ;;
parse-changelog) latest_version="0.5.0" ;;
*) exit 1 ;;
esac
repo="taiki-e/${tool}"
@@ -77,13 +183,12 @@ for tool in "${tools[@]}"; do
latest) version="${latest_version}" ;;
esac
url="https://github.com/${repo}/releases/download/v${version}/${tool}-${target}.tar.gz"
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar xzf - -C ~/.cargo/bin
download "${url}" "${cargo_bin}" "${tool}${exe}"
;;
cross)
# https://github.com/rust-embedded/cross/releases
latest_version="0.2.1"
repo="rust-embedded/cross"
# https://github.com/cross-rs/cross/releases
latest_version="0.2.4"
repo="cross-rs/cross"
case "${OSTYPE}" in
linux*) target="x86_64-unknown-linux-musl" ;;
darwin*) target="x86_64-apple-darwin" ;;
@@ -93,56 +198,234 @@ for tool in "${tools[@]}"; do
case "${version}" in
latest) version="${latest_version}" ;;
esac
url="https://github.com/${repo}/releases/download/v${version}/cross-v${version}-${target}.tar.gz"
case "${version}" in
0.1.* | 0.2.[0-1]) url="https://github.com/${repo}/releases/download/v${version}/cross-v${version}-${target}.tar.gz" ;;
*) url="https://github.com/${repo}/releases/download/v${version}/cross-${target}.tar.gz" ;;
esac
download "${url}" "${cargo_bin}" "${tool}${exe}"
;;
nextest | cargo-nextest)
bin="cargo-nextest"
# https://nexte.st/book/pre-built-binaries.html
case "${OSTYPE}" in
linux*)
host_triple
case "${host}" in
*-linux-gnu*) url="https://get.nexte.st/${version}/linux" ;;
*) url="https://get.nexte.st/${version}/linux-musl" ;;
esac
;;
darwin*) url="https://get.nexte.st/${version}/mac" ;;
cygwin* | msys*) url="https://get.nexte.st/${version}/windows-tar" ;;
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
esac
info "downloading ${url}"
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar xzf - -C ~/.cargo/bin
| tar xzf - -C "${cargo_bin}"
;;
protoc)
# https://github.com/protocolbuffers/protobuf/releases
latest_version="3.21.4"
repo="protocolbuffers/protobuf"
case "${version}" in
latest) version="${latest_version}" ;;
esac
miner_patch_version="${latest_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"
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
;;
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
esac
mkdir -p .install-action-tmp
(
cd .install-action-tmp
info "downloading ${url}"
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" -o tmp.zip
unzip tmp.zip
mv "bin/protoc${exe}" "${bin_dir}/"
mkdir -p "${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:\\/')
;;
esac
if [[ -z "${PROTOC:-}" ]]; then
info "setting PROTOC environment variable"
echo "PROTOC=${bin_dir}/protoc${exe}" >>"${GITHUB_ENV}"
fi
)
rm -rf .install-action-tmp
;;
shellcheck)
# https://github.com/koalaman/shellcheck/releases
latest_version="0.8.0"
repo="koalaman/shellcheck"
case "${version}" in
latest) version="${latest_version}" ;;
esac
base_url="https://github.com/${repo}/releases/download/v${version}/shellcheck-v${version}"
bin="shellcheck-v${version}/shellcheck${exe}"
case "${OSTYPE}" in
linux*)
if type -P shellcheck &>/dev/null; then
sudo apt-get -qq -o Dpkg::Use-Pty=0 remove -y shellcheck
fi
target="linux"
url="${base_url}.linux.x86_64.tar.xz"
;;
darwin*) url="${base_url}.darwin.x86_64.tar.xz" ;;
cygwin* | msys*)
url="${base_url}.zip"
bin="shellcheck${exe}"
;;
darwin*) target="darwin" ;;
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/${repo}/releases/download/v${version}/shellcheck-v${version}.${target}.x86_64.tar.xz"
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar xJf - --strip-components 1 -C /usr/local/bin "shellcheck-v${version}/shellcheck"
download "${url}" /usr/local/bin "${bin}"
;;
shfmt)
# https://github.com/mvdan/sh/releases
latest_version="3.4.2"
latest_version="3.5.1"
repo="mvdan/sh"
bin_dir="/usr/local/bin"
case "${OSTYPE}" in
linux*) target="linux_amd64" ;;
darwin*) target="darwin_amd64" ;;
cygwin* | msys*) bail "${tool} for windows is not supported yet by this action" ;;
cygwin* | msys*)
target="windows_amd64"
bin_dir="${HOME}/.install-action/bin"
if [[ ! -d "${bin_dir}" ]]; then
mkdir -p "${bin_dir}"
echo "${bin_dir}" >>"${GITHUB_PATH}"
export PATH="${PATH}:${bin_dir}"
fi
;;
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
esac
case "${version}" in
latest) version="${latest_version}" ;;
esac
url="https://github.com/${repo}/releases/download/v${version}/shfmt_v${version}_${target}"
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused -o /usr/local/bin/shfmt "${url}"
chmod +x /usr/local/bin/shfmt
url="https://github.com/${repo}/releases/download/v${version}/shfmt_v${version}_${target}${exe}"
info "downloading ${url}"
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused -o "${bin_dir}/shfmt${exe}" "${url}"
case "${OSTYPE}" in
linux* | darwin*) chmod +x "${bin_dir}/shfmt${exe}" ;;
esac
;;
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
retry sudo apt-get -o Acquire::Retries=10 -qq update
# libc6-dbg is needed to run Valgrind
retry 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
retry 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.39.1"
repo="bytecodealliance/wasmtime"
case "${version}" in
latest) version="${latest_version}" ;;
esac
base_url="https://github.com/bytecodealliance/wasmtime/releases/download/v${version}/wasmtime-v${version}"
case "${OSTYPE}" in
linux*)
target="x86_64-linux"
url="${base_url}-${target}.tar.xz"
;;
darwin*)
target="x86_64-macos"
url="${base_url}-${target}.tar.xz"
;;
cygwin* | msys*)
target="x86_64-windows"
url="${base_url}-${target}.zip"
;;
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
esac
download "${url}" "${cargo_bin}" "${tool}-v${version}-${target}/${tool}${exe}"
;;
mdbook)
# https://github.com/rust-lang/mdBook/releases
latest_version="0.4.21"
repo="rust-lang/mdBook"
case "${version}" in
latest) version="${latest_version}" ;;
esac
base_url="https://github.com/${repo}/releases/download/v${version}/${tool}-v${version}"
case "${OSTYPE}" in
linux*) url="${base_url}-x86_64-unknown-linux-gnu.tar.gz" ;;
darwin*) url="${base_url}-x86_64-apple-darwin.tar.gz" ;;
cygwin* | msys*) url="${base_url}-x86_64-pc-windows-msvc.zip" ;;
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
esac
download "${url}" "${cargo_bin}" "${tool}${exe}"
;;
mdbook-linkcheck)
# https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases
latest_version="0.7.6"
repo="Michael-F-Bryan/mdbook-linkcheck"
case "${OSTYPE}" in
linux*) target="x86_64-unknown-linux-gnu" ;;
darwin*) target="x86_64-apple-darwin" ;;
cygwin* | msys*) target="x86_64-pc-windows-msvc" ;;
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
esac
case "${version}" in
latest) version="${latest_version}" ;;
esac
url="https://github.com/${repo}/releases/download/v${version}/${tool}.${target}.zip"
download "${url}" "${cargo_bin}" "${tool}${exe}"
case "${OSTYPE}" in
linux* | darwin*) chmod +x "${cargo_bin}/${tool}${exe}" ;;
esac
;;
cargo-binstall)
install_cargo_binstall
continue
;;
*)
cargo_binstall "${tool}" "${version}"
continue
;;
*) bail "unsupported tool '${tool}'" ;;
esac
info "${tool} installed at $(type -P "${tool}")"
case "${tool}" in
info "${tool} installed at $(type -P "${bin}")"
case "${bin}" in
cargo-*) x cargo "${tool#cargo-}" --version ;;
*) x "${tool}" --version ;;
esac
echo >&2
echo
done

View File

@@ -1,17 +1,16 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/..
# Publish a new release.
#
# USAGE:
# ./tools/publish.sh <VERSION>
#
# NOTE:
# Note:
# - This script requires parse-changelog <https://github.com/taiki-e/parse-changelog>
cd "$(cd "$(dirname "$0")" && pwd)"/..
bail() {
echo >&2 "error: $*"
exit 1
@@ -31,19 +30,50 @@ fi
git diff --exit-code
git diff --exit-code --staged
# Make sure the same release has not been created in the past.
if gh release view "${tag}" &>/dev/null; then
bail "tag '${tag}' has already been created and pushed"
fi
if ! git branch | grep -q '\* main'; then
bail "current branch is not 'main'"
fi
tags=$(git --no-pager tag)
if [[ -n "${tags}" ]]; then
# Make sure the same release does not exist in CHANGELOG.md.
release_date=$(date -u '+%Y-%m-%d')
if grep -Eq "^## \\[${version//./\\.}\\] - ${release_date}$" CHANGELOG.md; then
bail "release ${version} already exist in CHANGELOG.md"
fi
if grep -Eq "^\\[${version//./\\.}\\]: " CHANGELOG.md; then
bail "link to ${version} already exist in CHANGELOG.md"
fi
# Update changelog.
remote_url=$(grep -E '^\[Unreleased\]: https://' CHANGELOG.md | sed 's/^\[Unreleased\]: //' | sed 's/\.\.\.HEAD$//')
before_tag=$(sed <<<"${remote_url}" 's/^.*\/compare\///')
remote_url=$(sed <<<"${remote_url}" 's/\/compare\/v.*$//')
sed -i "s/^## \\[Unreleased\\]/## [Unreleased]\\n\\n## [${version}] - ${release_date}/" CHANGELOG.md
sed -i "s#^\[Unreleased\]: https://.*#[Unreleased]: ${remote_url}/compare/v${version}...HEAD\\n[${version}]: ${remote_url}/compare/${before_tag}...v${version}#" CHANGELOG.md
if ! grep -Eq "^## \\[${version//./\\.}\\] - ${release_date}$" CHANGELOG.md; then
bail "failed to update CHANGELOG.md"
fi
if ! grep -Eq "^\\[${version//./\\.}\\]: " CHANGELOG.md; then
bail "failed to update CHANGELOG.md"
fi
fi
# Make sure that a valid release note for this version exists.
# https://github.com/taiki-e/parse-changelog
echo "============== CHANGELOG =============="
parse-changelog CHANGELOG.md "${version}"
echo "======================================="
if ! grep <CHANGELOG.md -E "^\\[${version//./\\.}\\]: " >/dev/null; then
bail "not found link to [${version}] in CHANGELOG.md"
fi
# Make sure the same release has not been created in the past.
if gh release view "${tag}" &>/dev/null; then
bail "tag '${tag}' has already been created and pushed"
if [[ -n "${tags}" ]]; then
# Create a release commit.
git add CHANGELOG.md
git commit -m "Release ${version}"
fi
tools=(
@@ -51,28 +81,37 @@ tools=(
cargo-llvm-cov
cargo-minimal-versions
parse-changelog
cargo-binstall
cross
mdbook
mdbook-linkcheck
protoc
nextest
cargo-nextest
shellcheck
shfmt
valgrind
wasm-pack
wasmtime
)
(
set -x
git push origin main
git tag "${tag}"
git push origin main
git push origin --tags
version_tag="v${version%%.*}"
git checkout -b "${version_tag}"
git push origin refs/heads/"${version_tag}"
if git --no-pager tag | grep -E "^${version_tag}$" &>/dev/null; then
git tag -d "${version_tag}"
git push --delete origin refs/tags/"${version_tag}"
major_version_tag="v${version%%.*}"
git checkout -b "${major_version_tag}"
git push origin refs/heads/"${major_version_tag}"
if git --no-pager tag | grep -Eq "^${major_version_tag}$"; then
git tag -d "${major_version_tag}"
git push --delete origin refs/tags/"${major_version_tag}"
fi
git tag "${version_tag}"
git tag "${major_version_tag}"
git checkout main
git branch -d "${version_tag}"
git branch -d "${major_version_tag}"
)
for tool in "${tools[@]}"; do
@@ -84,7 +123,7 @@ for tool in "${tools[@]}"; do
git add action.yml
git commit -m "${tool}"
git push origin -f refs/heads/"${tool}"
if git --no-pager tag | grep -E "^${tool}$" &>/dev/null; then
if git --no-pager tag | grep -Eq "^${tool}$"; then
git tag -d "${tool}"
git push --delete origin refs/tags/"${tool}"
fi

View File

@@ -2,17 +2,16 @@
# shellcheck disable=SC2046
set -euo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/..
# USAGE:
# ./tools/tidy.sh
#
# NOTE: This script requires the following tools:
# Note: This script requires the following tools:
# - shfmt
# - prettier
# - shellcheck
cd "$(cd "$(dirname "$0")" && pwd)"/..
x() {
local cmd="$1"
shift