Compare commits

...

68 Commits

Author SHA1 Message Date
Taiki Endo
9fa9fafb73 Release 2.3.2 2023-01-20 10:27:59 +09:00
Taiki Endo
ad042ad7b1 Update just@latest to 1.12.0 2023-01-20 10:22:34 +09:00
Taiki Endo
a085553f57 Update cargo-no-dev-deps@latest to 0.2.0 2023-01-20 10:22:34 +09:00
Taiki Endo
06af96936d Update cspell dictionary 2023-01-19 01:57:13 +09:00
Taiki Endo
0b8b246f3d Set rust-related env vars for building codegen in CI 2023-01-18 22:10:38 +09:00
Taiki Endo
9b917368c2 clippy: Set avoid-breaking-exported-api = false 2023-01-18 21:59:47 +09:00
Taiki Endo
67f0979373 Release 2.3.1 2023-01-18 11:15:19 +09:00
Taiki Endo
e74b1e0d86 Update dprint@latest to 0.34.4 2023-01-18 11:14:22 +09:00
Taiki Endo
46d672f17d Update cargo-binstall@latest to 0.19.3 2023-01-18 11:14:22 +09:00
Taiki Endo
06dac1bb47 Release 2.3.0 2023-01-16 23:04:34 +09:00
Taiki Endo
a3609ab69a Tweak docs 2023-01-16 23:03:45 +09:00
Taiki Endo
8b9de1e094 Update changelog 2023-01-16 20:31:06 +09:00
Taiki Endo
2ed407fd17 codegen: Sort releases returned from GitHub API 2023-01-16 20:24:12 +09:00
Taiki Endo
ad8540ac77 Use cargo-binstall batching mode (#54) 2023-01-16 19:56:58 +09:00
Taiki Endo
b95ae1b223 Set CARGO_NET_RETRY and RUSTUP_MAX_RETRIES 2023-01-16 19:45:56 +09:00
Taiki Endo
c1300c3f7c Update cargo-binstall@latest to 0.19.2 2023-01-16 14:06:10 +09:00
Taiki Endo
bbd2d52c58 Update readme 2023-01-16 09:19:14 +09:00
Taiki Endo
ce26f7e3c8 Release 2.2.3 2023-01-16 09:14:31 +09:00
Taiki Endo
92ab599e22 Update cargo-llvm-cov@latest to 0.5.9 2023-01-16 09:13:46 +09:00
Taiki Endo
6a31ba8d6d Release 2.2.2 2023-01-15 23:53:06 +09:00
Taiki Endo
4b8b61e298 Fix info message 2023-01-15 21:38:36 +09:00
Taiki Endo
4269f7d620 codegen: Tweak retry 2023-01-15 21:05:37 +09:00
Taiki Endo
c92838b65e codegen: Format with rustfmt 2023-01-15 19:58:27 +09:00
Taiki Endo
f6e4dc6296 Improve retry on download failure 2023-01-15 19:55:57 +09:00
Taiki Endo
d538488fe5 Update cargo-llvm-cov@latest to 0.5.8 2023-01-15 19:48:54 +09:00
Taiki Endo
6e129b86d0 Add cache-cargo-install-action to related project list
https://github.com/taiki-e/cache-cargo-install-action
2023-01-15 18:38:24 +09:00
Taiki Endo
3b58ab42ed Tweak main.sh 2023-01-15 18:38:19 +09:00
Taiki Endo
38250d8ada Update CI config 2023-01-15 18:34:57 +09:00
Taiki Endo
d89f3d4042 Update tools/publish.sh 2023-01-15 18:33:24 +09:00
Taiki Endo
00f11cb267 Update cargo-nextest@latest to 0.9.49 2023-01-15 11:56:39 +09:00
Taiki Endo
8db8546a9c Add note about composite action 2023-01-14 00:02:59 +09:00
Taiki Endo
5fc2b23470 Tweak main.sh 2023-01-14 00:02:02 +09:00
Taiki Endo
aae39e2ce4 Set timeout-minutes in all jobs 2023-01-13 00:54:25 +09:00
Taiki Endo
54eee5470f Release 2.2.1 2023-01-12 23:35:47 +09:00
Taiki Endo
2411265c71 Tweak output 2023-01-12 23:13:17 +09:00
Taiki Endo
8066254c63 Update cargo-binstall@latest to 0.19.1 2023-01-12 23:13:10 +09:00
Taiki Endo
0feb352bd8 Update comments 2023-01-12 23:13:02 +09:00
Taiki Endo
9a9630c7b3 codegen: Fix retry on download 2023-01-12 23:12:45 +09:00
Taiki Endo
baf51dce12 codegen: Reject cases where any of binaries are missing 2023-01-12 23:12:20 +09:00
Taiki Endo
c096cea2cf codegen: Reject unknown fields in base manifest 2023-01-12 23:11:54 +09:00
Taiki Endo
cde5fb702d codegen: Fix handling of latest_only tool 2023-01-12 22:34:21 +09:00
Taiki Endo
c37d86a473 Release 2.2.0 2023-01-12 00:25:16 +09:00
Taiki Endo
f053d641ce Update changelog 2023-01-12 00:25:06 +09:00
Taiki Endo
e67e350d53 Update cargo-llvm-cov@latest to 0.5.7 2023-01-12 00:24:09 +09:00
Taiki Endo
e4aa1a2fa0 Update cargo-deny@latest to 0.13.7 2023-01-12 00:18:58 +09:00
Taiki Endo
0b2444221a Update parse-changelog@latest to 0.5.3 2023-01-12 00:09:16 +09:00
Taiki Endo
1ddad10228 Update cargo-minimal-versions@latest to 0.1.10 2023-01-12 00:09:16 +09:00
Taiki Endo
c811846c9e Update cargo-llvm-cov@latest to 0.5.6 2023-01-12 00:09:16 +09:00
Taiki Endo
2af5f71731 Update cargo-hack@latest to 0.5.26 2023-01-12 00:09:16 +09:00
Taiki Endo
ba88d8e860 Support cargo-no-dev-deps 2023-01-11 22:02:11 +09:00
Taiki Endo
0e7be51948 Update cargo-deny@latest to 0.13.6 2023-01-11 21:54:41 +09:00
Taiki Endo
44dc3aa61a Release 2.1.4 2023-01-10 15:19:41 +09:00
Taiki Endo
59a26c9c82 Temporarily disable valgrind test in CI
```
info: installing valgrind@latest
Selecting previously unselected package libc6-dbg:amd64.
(Reading database ... 236916 files and directories currently installed.)
Preparing to unpack .../libc6-dbg_2.35-0ubuntu3.1_amd64.deb ...
Unpacking libc6-dbg:amd64 (2.35-0ubuntu3.1) ...
Setting up libc6-dbg:amd64 (2.35-0ubuntu3.1) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 5.15.0-1024-azure
NEEDRESTART-KEXP: 5.15.0-1024-azure
NEEDRESTART-KSTA: 1
```
2023-01-10 15:19:12 +09:00
Taiki Endo
d5555e1625 Update cargo-llvm-cov@latest to 0.5.5 2023-01-10 15:19:12 +09:00
Taiki Endo
fb3c62e806 Release 2.1.3 2023-01-09 20:48:39 +09:00
Taiki Endo
2f296ea04f Update cargo-llvm-cov@latest to 0.5.4 2023-01-09 20:44:45 +09:00
Taiki Endo
ae0e1936a4 Tweak codegen 2023-01-07 21:09:43 +09:00
Taiki Endo
c4298ca31e Update cspell dictionary 2023-01-07 21:03:01 +09:00
Taiki Endo
dc56670325 Release 2.1.2 2023-01-06 01:12:23 +09:00
Taiki Endo
d2ab9b9652 Improve warning if tool is not specified
Suggested in https://github.com/taiki-e/install-action/issues/43#issuecomment-1372352184.
2023-01-06 00:52:11 +09:00
Taiki Endo
5e7708e596 Release 2.1.1 2023-01-06 00:19:47 +09:00
Taiki Endo
ad09286c82 Emit warning if tool is not specified
If you encounter this warning, it may be due to a dependabot bug that
handles `@<tool>` shorthand in wrong way.

Previously, the handling of this case was platform-dependent and may or
may not have resulted in an error.
2023-01-06 00:12:24 +09:00
Taiki Endo
42a03f9b0e Release 2.1.0 2023-01-05 21:09:05 +09:00
Taiki Endo
880c4272a9 Update changelog 2023-01-05 21:08:27 +09:00
Thom Chiovoloni
25738fc0b6 Add grcov support (#41) 2023-01-05 18:33:35 +09:00
Taiki Endo
cb0368f574 Update just@latest to 1.11.0 2023-01-04 15:59:53 +09:00
Taiki Endo
be9d4e566a Release 2.0.3 2023-01-03 12:10:16 +09:00
Taiki Endo
9545d431fb Update cargo-nextest@latest to 0.9.48 2023-01-03 12:08:53 +09:00
25 changed files with 914 additions and 139 deletions

1
.clippy.toml Normal file
View File

@@ -0,0 +1 @@
avoid-breaking-exported-api = false

View File

@@ -58,6 +58,7 @@ msvc
muslabi muslabi
musleabi musleabi
musleabihf musleabihf
newlibeabihf
nvptx nvptx
openwrt openwrt
riscv riscv
@@ -78,31 +79,44 @@ xous
// Rust other // Rust other
alloc alloc
bools
builtins
canonicalize canonicalize
consts consts
deque deque
doctest doctest
hasher hasher
impls
inlateout inlateout
intrinsics intrinsics
lateout lateout
msrv msrv
nomem
nostack
peekable peekable
punct punct
repr repr
rfind rfind
rfold rfold
rsplit
splitn splitn
supertrait
supertraits
toolchains
uninit uninit
unsized
upcastable
// Other // Other
connrefused connrefused
cygwin cygwin
dpkg
euxo euxo
msys msys
noninteractive noninteractive
noprofile noprofile
norc norc
nproc
pipefail pipefail
powerset powerset
proto proto

View File

@@ -3,10 +3,10 @@ bytecodealliance
coreutils coreutils
distro distro
doas doas
Dpkg
dprint dprint
enablerepo enablerepo
epel epel
grcov
jfrimmel jfrimmel
koalaman koalaman
libc libc
@@ -23,7 +23,7 @@ rockylinux
rustwasm rustwasm
shellcheck shellcheck
shfmt shfmt
toolchains
udeps udeps
wasmtime wasmtime
watchexec
xscale xscale

View File

@@ -13,13 +13,22 @@ on:
- cron: '0 1 * * *' - cron: '0 1 * * *'
workflow_dispatch: workflow_dispatch:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
defaults: defaults:
run: run:
shell: bash shell: bash
jobs: jobs:
tidy: tidy:
uses: taiki-e/workflows/.github/workflows/tidy-rust.yml@main uses: taiki-e/workflows/.github/workflows/tidy.yml@main
test: test:
strategy: strategy:
@@ -29,21 +38,23 @@ jobs:
- ubuntu-20.04 - ubuntu-20.04
- ubuntu-22.04 - ubuntu-22.04
tool: tool:
# cargo-watch is supported by cargo-binstall (through quickinstall) # cargo-watch/watchexec-cli is supported by cargo-binstall (through quickinstall)
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,valgrind,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch # TODO: valgrind installation sometime hangs.
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli
include: include:
# Note: Specifying the version of valgrind and cargo-binstall is not supported. # Note: Specifying the version of valgrind and cargo-binstall is not supported.
- os: ubuntu-20.04 - os: ubuntu-20.04
tool: cargo-hack@0.5.24,cargo-llvm-cov@0.5.3,cargo-minimal-versions@0.1.8,parse-changelog@0.5.2,cargo-udeps@0.1.35,cargo-valgrind@2.1.0,cargo-deny@0.13.5,cross@0.2.4,dprint@0.34.1,just@1.9.0,nextest@0.9.11,protoc@3.21.12,shellcheck@0.9.0,shfmt@3.6.0,wasm-pack@0.10.3,wasmtime@4.0.0,mdbook@0.4.25,mdbook-linkcheck@0.7.7,cargo-watch@8.1.1 tool: cargo-hack@0.5.24,cargo-llvm-cov@0.5.3,cargo-minimal-versions@0.1.8,cargo-no-dev-deps@0.1.0,parse-changelog@0.5.2,cargo-udeps@0.1.35,cargo-valgrind@2.1.0,cargo-deny@0.13.5,cross@0.2.4,dprint@0.34.1,just@1.9.0,nextest@0.9.11,protoc@3.21.12,shellcheck@0.9.0,shfmt@3.6.0,wasm-pack@0.10.3,wasmtime@4.0.0,mdbook@0.4.25,mdbook-linkcheck@0.7.7,cargo-watch@8.1.1,grcov@0.8.13,watchexec-cli@1.20.5
- os: ubuntu-20.04 - os: ubuntu-20.04
tool: cargo-hack@0.5,cargo-llvm-cov@0.5,cargo-minimal-versions@0.1,parse-changelog@0.5,cargo-udeps@0.1,cargo-valgrind@2.1,cargo-deny@0.13,cross@0.2,dprint@0.34,just@1.9,nextest@0.9,protoc@3.21,shellcheck@0.9,shfmt@3.5,wasm-pack@0.10,wasmtime@4.0,mdbook@0.4,mdbook-linkcheck@0.7,cargo-watch@8.1 tool: cargo-hack@0.5,cargo-llvm-cov@0.5,cargo-minimal-versions@0.1,cargo-no-dev-deps@0.1,parse-changelog@0.5,cargo-udeps@0.1,cargo-valgrind@2.1,cargo-deny@0.13,cross@0.2,dprint@0.34,just@1.9,nextest@0.9,protoc@3.21,shellcheck@0.9,shfmt@3.5,wasm-pack@0.10,wasmtime@4.0,mdbook@0.4,mdbook-linkcheck@0.7,cargo-watch@8.1,grcov@0.8,watchexec-cli@1.20
- os: ubuntu-20.04 - os: ubuntu-20.04
tool: cargo-valgrind@2,just@1,protoc@3,shfmt@3,wasmtime@4,cargo-watch@8 tool: cargo-valgrind@2,just@1,protoc@3,shfmt@3,wasmtime@4,cargo-watch@8,watchexec-cli@1
- os: macos-11 - os: macos-11
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli
- os: windows-2019 - os: windows-2019
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@@ -75,21 +86,22 @@ jobs:
- rockylinux:8-minimal # glibc 2.28 - rockylinux:8-minimal # glibc 2.28
tool: tool:
# valgrind: installing snap to container is difficult... # valgrind: installing snap to container is difficult...
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch - cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli
include: include:
- container: ubuntu:22.04 # glibc 2.35 - container: ubuntu:22.04 # glibc 2.35
# cargo-udeps depends on openssl 1.1 # cargo-udeps depends on openssl 1.1
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli
- container: fedora:latest # glibc 2.36 (as of fedora 37) - container: fedora:latest # glibc 2.36 (as of fedora 37)
# cargo-udeps depends on openssl 1.1 # cargo-udeps depends on openssl 1.1
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli
- container: centos:7 # glibc 2.17 - container: centos:7 # glibc 2.17
# cargo-udeps,protoc,valgrind,wasmtime,mdbook-linkcheck,cargo-watch don't provide prebuilt binaries for musl host. # cargo-udeps,protoc,valgrind,wasmtime,mdbook-linkcheck,cargo-watch don't provide prebuilt binaries for musl or old glibc host.
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,shellcheck,shfmt,wasm-pack,mdbook,cargo-binstall tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,shellcheck,shfmt,wasm-pack,mdbook,cargo-binstall,grcov,watchexec-cli
- container: alpine:latest # musl 1.2.3 (as of alpine 3.17) - container: alpine:latest # musl 1.2.3 (as of alpine 3.17)
# cargo-udeps,protoc,valgrind,wasmtime,mdbook-linkcheck,cargo-watch don't provide prebuilt binaries for musl host. # cargo-udeps,protoc,valgrind,wasmtime,mdbook-linkcheck,cargo-watch don't provide prebuilt binaries for musl host.
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,shellcheck,shfmt,wasm-pack,mdbook,cargo-binstall tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,shellcheck,shfmt,wasm-pack,mdbook,cargo-binstall,grcov,watchexec-cli
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
container: ${{ matrix.container }} container: ${{ matrix.container }}
steps: steps:
- name: Install requirements (ubuntu/debian) - name: Install requirements (ubuntu/debian)
@@ -131,6 +143,7 @@ jobs:
manifest: manifest:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
permissions: permissions:
contents: write # TODO test contents: write # TODO test
pull-requests: write pull-requests: write
@@ -141,6 +154,8 @@ jobs:
- name: Install Rust - name: Install Rust
run: rustup toolchain add nightly --no-self-update && rustup default nightly run: rustup toolchain add nightly --no-self-update && rustup default nightly
- run: tools/manifest.sh - run: tools/manifest.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git add -N . && git diff --exit-code - run: git add -N . && git diff --exit-code
if: github.repository_owner != 'taiki-e' || github.event_name != 'schedule' && !(github.event_name == 'push' && github.ref == 'refs/heads/main') if: github.repository_owner != 'taiki-e' || github.event_name != 'schedule' && !(github.event_name == 'push' && github.ref == 'refs/heads/main')
- id: diff - id: diff

View File

@@ -17,6 +17,7 @@ jobs:
create-release: create-release:
if: github.repository_owner == 'taiki-e' if: github.repository_owner == 'taiki-e'
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:

View File

@@ -10,6 +10,84 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased] ## [Unreleased]
## [2.3.2] - 2023-01-20
- Update `just@latest` to 1.12.0.
- Update `cargo-no-dev-deps@latest` to 0.2.0.
## [2.3.1] - 2023-01-18
- Update `dprint@latest` to 0.34.4.
- Update `cargo-binstall@latest` to 0.19.3.
## [2.3.0] - 2023-01-16
- Update `cargo-binstall@latest` to 0.19.2.
- Use `cargo-binstall` batching mode (#54)
## [2.2.3] - 2023-01-16
- Update `cargo-llvm-cov@latest` to 0.5.9.
## [2.2.2] - 2023-01-15
- Update `cargo-llvm-cov@latest` to 0.5.8.
- Update `cargo-nextest@latest` to 0.9.49.
## [2.2.1] - 2023-01-12
- Update `cargo-binstall@latest` to 0.19.1.
- Support `cargo-binstall` on aarch64 Windows.
## [2.2.0] - 2023-01-11
- Update `cargo-llvm-cov@latest` to 0.5.7.
- Update `cargo-deny@latest` to 0.13.7.
- Update `parse-changelog@latest` to 0.5.3.
- Update `cargo-minimal-versions@latest` to 0.1.10.
- Update `cargo-hack@latest` to 0.5.26.
- Support `cargo-no-dev-deps`.
## [2.1.4] - 2023-01-10
- Update `cargo-llvm-cov@latest` to 0.5.5.
## [2.1.3] - 2023-01-09
- Update `cargo-llvm-cov@latest` to 0.5.4.
## [2.1.2] - 2023-01-05
- Diagnostic improvements.
## [2.1.1] - 2023-01-05
- Emit warning if tool is not specified.
If you encounter this warning, it may be due to a dependabot bug that handles `@<tool>` shorthand in wrong way.
Previously, the handling of this case was platform-dependent and may or may not have resulted in an error.
## [2.1.0] - 2023-01-05
- Support `grcov`. ([#41](https://github.com/taiki-e/install-action/pull/41), thanks @thomcc)
- Update `just@latest` to 1.11.0.
## [2.0.3] - 2023-01-03
- Update `cargo-nextest@latest` to 0.9.48.
## [2.0.2] - 2023-01-02 ## [2.0.2] - 2023-01-02
- Update `just@latest` to 1.10.0. - Update `just@latest` to 1.10.0.
@@ -499,7 +577,20 @@ Note: This release is considered a breaking change because installing on version
Initial release Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.0.2...HEAD [Unreleased]: https://github.com/taiki-e/install-action/compare/v2.3.2...HEAD
[2.3.2]: https://github.com/taiki-e/install-action/compare/v2.3.1...v2.3.2
[2.3.1]: https://github.com/taiki-e/install-action/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/taiki-e/install-action/compare/v2.2.3...v2.3.0
[2.2.3]: https://github.com/taiki-e/install-action/compare/v2.2.2...v2.2.3
[2.2.2]: https://github.com/taiki-e/install-action/compare/v2.2.1...v2.2.2
[2.2.1]: https://github.com/taiki-e/install-action/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/taiki-e/install-action/compare/v2.1.4...v2.2.0
[2.1.4]: https://github.com/taiki-e/install-action/compare/v2.1.3...v2.1.4
[2.1.3]: https://github.com/taiki-e/install-action/compare/v2.1.2...v2.1.3
[2.1.2]: https://github.com/taiki-e/install-action/compare/v2.1.1...v2.1.2
[2.1.1]: https://github.com/taiki-e/install-action/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/taiki-e/install-action/compare/v2.0.3...v2.1.0
[2.0.3]: https://github.com/taiki-e/install-action/compare/v2.0.2...v2.0.3
[2.0.2]: https://github.com/taiki-e/install-action/compare/v2.0.1...v2.0.2 [2.0.2]: https://github.com/taiki-e/install-action/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/taiki-e/install-action/compare/v2.0.0...v2.0.1 [2.0.1]: https://github.com/taiki-e/install-action/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/taiki-e/install-action/compare/v1.17.3...v2.0.0 [2.0.0]: https://github.com/taiki-e/install-action/compare/v1.17.3...v2.0.0

View File

@@ -25,6 +25,8 @@ GitHub Action for installing development tools (mainly from GitHub Releases).
### Example workflow ### Example workflow
To install the latest version:
```yaml ```yaml
- uses: taiki-e/install-action@v2 - uses: taiki-e/install-action@v2
with: with:
@@ -83,9 +85,11 @@ https://spdx.org/licenses
| [**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-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-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) | | [**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-no-dev-deps**](https://github.com/taiki-e/cargo-no-dev-deps) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-no-dev-deps/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-no-dev-deps/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-no-dev-deps/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) | | [**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) |
| [**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) | | [**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) |
| [**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) | | [**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) |
| [**grcov**](https://github.com/mozilla/grcov) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/mozilla/grcov/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/mozilla/grcov/blob/master/LICENSE-MPL-2.0) |
| [**just**](https://github.com/casey/just) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/casey/just/releases) | Linux, macOS, Windows | [CC0-1.0](https://github.com/casey/just/blob/HEAD/LICENSE) | | [**just**](https://github.com/casey/just) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/casey/just/releases) | Linux, macOS, Windows | [CC0-1.0](https://github.com/casey/just/blob/HEAD/LICENSE) |
| [**dprint**](https://github.com/dprint/dprint) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/dprint/dprint/releases) | Linux, macOS, Windows | [MIT](https://github.com/dprint/dprint/blob/HEAD/LICENSE) | | [**dprint**](https://github.com/dprint/dprint) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/dprint/dprint/releases) | Linux, macOS, Windows | [MIT](https://github.com/dprint/dprint/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) | | [**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) |
@@ -116,17 +120,19 @@ See the linked documentation for information on security when installed using [s
## Compatibility ## Compatibility
This action has been tested for GitHub-hosted runners (Ubuntu, macOS, Windows) and containers (Ubuntu, Debian, Alpine, Fedora, CentOS, Rocky). This action has been tested for GitHub-hosted runners (Ubuntu, macOS, Windows) and containers (Ubuntu, Debian, Alpine, Fedora, CentOS, Rocky).
To use this action in self-hosted runners or in containers, you will need to install at least the following: To use this action in self-hosted runners or in containers, at least the following tools are required:
- bash - bash
- cargo (if you install cargo subcommands or use cargo-binstall fallback) - cargo (if you install cargo subcommands or use cargo-binstall fallback)
## Related Projects ## Related Projects
- [cache-cargo-install-action]: GitHub Action for `cargo install` with cache.
- [create-gh-release-action]: GitHub Action for creating GitHub Releases based on changelog. - [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. - [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. - [setup-cross-toolchain-action]: GitHub Action for setup toolchains for cross compilation and cross testing for Rust.
[cache-cargo-install-action]: https://github.com/taiki-e/cache-cargo-install-action
[cargo-binstall]: https://github.com/cargo-bins/cargo-binstall [cargo-binstall]: https://github.com/cargo-bins/cargo-binstall
[create-gh-release-action]: https://github.com/taiki-e/create-gh-release-action [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 [setup-cross-toolchain-action]: https://github.com/taiki-e/setup-cross-toolchain-action

12
main.js
View File

@@ -1,3 +1,15 @@
// This is a script that just calls the bash script that does the main
// processing of the action. It works like a composite action that calls
// a single bash script.
//
// This was originally a trick adopted to make bash script-based actions work
// without docker before composite actions were supported. However, due to
// various problems with composite actions, this trick is still needed:
// - https://github.com/actions/runner/issues/665
// - https://github.com/actions/runner/issues/2185
// Although there are ways to work around these like cache-cargo-install-action does:
// https://github.com/taiki-e/cache-cargo-install-action/blob/v1.0.1/action.yml#L9-L11
const { execFileSync } = require('child_process'); const { execFileSync } = require('child_process');
function main() { function main() {

102
main.sh
View File

@@ -11,7 +11,7 @@ x() {
) )
} }
retry() { retry() {
for i in {1..5}; do for i in {1..10}; do
if "$@"; then if "$@"; then
return 0 return 0
else else
@@ -226,10 +226,10 @@ install_cargo_binstall() {
local install_binstall='1' local install_binstall='1'
if [[ -f "${cargo_bin}/cargo-binstall${exe}" ]]; then if [[ -f "${cargo_bin}/cargo-binstall${exe}" ]]; then
if [[ "$(cargo binstall -V)" == "${binstall_version}" ]]; then if [[ "$(cargo binstall -V)" == "${binstall_version}" ]]; then
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall${exe}" info "cargo-binstall already installed at ${cargo_bin}/cargo-binstall${exe}"
install_binstall='' install_binstall=''
else else
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall${exe}, but is not compatible version with install-action, upgrading" info "cargo-binstall already installed at ${cargo_bin}/cargo-binstall${exe}, but is not compatible version with install-action, upgrading"
rm "${cargo_bin}/cargo-binstall${exe}" rm "${cargo_bin}/cargo-binstall${exe}"
fi fi
fi fi
@@ -241,22 +241,6 @@ install_cargo_binstall() {
x cargo binstall -V x cargo binstall -V
fi fi
} }
cargo_binstall() {
local tool="$1"
local version="$2"
info "install-action does not support ${tool}, fallback to cargo-binstall"
install_cargo_binstall
# 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 --no-confirm "${tool}" ;;
*) cargo binstall --force --no-confirm --version "${version}" "${tool}" ;;
esac
}
apt_update() { apt_update() {
if type -P sudo &>/dev/null; then if type -P sudo &>/dev/null; then
retry sudo apt-get -o Acquire::Retries=10 -qq update retry sudo apt-get -o Acquire::Retries=10 -qq update
@@ -291,9 +275,9 @@ snap_install() {
} }
apk_install() { apk_install() {
if type -P doas &>/dev/null; then if type -P doas &>/dev/null; then
doas apk add "$@" doas apk add --no-cache "$@"
else else
apk add "$@" apk add --no-cache "$@"
fi fi
} }
dnf_install() { dnf_install() {
@@ -311,6 +295,11 @@ sys_install() {
esac esac
} }
# cargo-binstall may call `cargo install` on their fallback: https://github.com/taiki-e/install-action/pull/54#issuecomment-1383140833
# cross calls rustup on `cross --version` if the current directly is cargo workspace.
export CARGO_NET_RETRY=10
export RUSTUP_MAX_RETRIES=10
if [[ $# -gt 0 ]]; then if [[ $# -gt 0 ]]; then
bail "invalid argument '$1'" bail "invalid argument '$1'"
fi fi
@@ -324,6 +313,11 @@ tools=()
if [[ -n "${tool}" ]]; then if [[ -n "${tool}" ]]; then
while read -rd,; do tools+=("${REPLY}"); done <<<"${tool}," while read -rd,; do tools+=("${REPLY}"); done <<<"${tool},"
fi fi
if [[ ${#tools[@]} -eq 0 ]]; then
warn "no tool specified; this could be caused by a dependabot bug where @<tool_name> tags on this action are replaced by @<version> tags"
# Exit with 0 for backward compatibility, we want to reject it in the next major release.
exit 0
fi
enable_checksum="${INPUT_CHECKSUM:-}" enable_checksum="${INPUT_CHECKSUM:-}"
case "${enable_checksum}" in case "${enable_checksum}" in
@@ -333,33 +327,16 @@ case "${enable_checksum}" in
esac esac
# Refs: https://github.com/rust-lang/rustup/blob/HEAD/rustup-init.sh # Refs: https://github.com/rust-lang/rustup/blob/HEAD/rustup-init.sh
case "$(uname -m)" in
aarch64 | arm64) host_arch="aarch64" ;;
xscale | arm | armv6l | armv7l | armv8l)
# Ignore arm for now, as we need to consider the version and whether hard-float is supported.
# https://github.com/rust-lang/rustup/pull/593
# https://github.com/cross-rs/cross/pull/1018
# Does it seem only armv7l is supported?
# https://github.com/actions/runner/blob/6b9e8a6be411a6e63d5ccaf3c47e7b7622c5ec49/src/Misc/externals.sh#L174
bail "32-bit ARM runner is not supported yet by this action"
;;
# GitHub Actions Runner supports Linux (x86_64, aarch64, arm), Windows (x86_64, aarch64),
# and macOS (x86_64, aarch64).
# https://github.com/actions/runner
# https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners
# So we can assume x86_64 unless it is aarch64 or arm.
*) host_arch="x86_64" ;;
esac
base_distro="" base_distro=""
exe="" exe=""
case "$(uname -s)" in case "$(uname -s)" in
Linux) Linux)
host_os=linux host_os=linux
host_env="gnu"
ldd_version=$(ldd --version 2>&1 || true) ldd_version=$(ldd --version 2>&1 || true)
if grep <<<"${ldd_version}" -q 'musl'; then if grep <<<"${ldd_version}" -q 'musl'; then
host_env="musl" host_env="musl"
else else
host_env="gnu"
host_glibc_version=$(grep <<<"${ldd_version}" -E "GLIBC|GNU libc" | sed "s/.* //g") host_glibc_version=$(grep <<<"${ldd_version}" -E "GLIBC|GNU libc" | sed "s/.* //g")
fi fi
if grep -q '^ID_LIKE=' /etc/os-release; then if grep -q '^ID_LIKE=' /etc/os-release; then
@@ -397,6 +374,24 @@ case "$(uname -s)" in
;; ;;
*) bail "unrecognized OS type '$(uname -s)'" ;; *) bail "unrecognized OS type '$(uname -s)'" ;;
esac esac
case "$(uname -m)" in
aarch64 | arm64) host_arch="aarch64" ;;
xscale | arm | armv6l | armv7l | armv8l)
# Ignore arm for now, as we need to consider the version and whether hard-float is supported.
# https://github.com/rust-lang/rustup/pull/593
# https://github.com/cross-rs/cross/pull/1018
# Does it seem only armv7l is supported?
# https://github.com/actions/runner/blob/caec043085990710070108f375cd0aeab45e1017/src/Misc/externals.sh#L174
bail "32-bit ARM runner is not supported yet by this action"
;;
# GitHub Actions Runner supports Linux (x86_64, aarch64, arm), Windows (x86_64, aarch64),
# and macOS (x86_64, aarch64).
# https://github.com/actions/runner
# https://github.com/actions/runner/blob/caec043085990710070108f375cd0aeab45e1017/.github/workflows/build.yml#L21
# https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners
# So we can assume x86_64 unless it is aarch64 or arm.
*) host_arch="x86_64" ;;
esac
tmp_dir="${HOME}/.install-action/tmp" tmp_dir="${HOME}/.install-action/tmp"
cargo_bin="${CARGO_HOME:-"${HOME}/.cargo"}/bin" cargo_bin="${CARGO_HOME:-"${HOME}/.cargo"}/bin"
@@ -419,22 +414,23 @@ if ! type -P jq &>/dev/null || ! type -P curl &>/dev/null || ! type -P tar &>/de
esac esac
fi fi
unsupported_tools=()
for tool in "${tools[@]}"; do for tool in "${tools[@]}"; do
if [[ "${tool}" == *"@"* ]]; then if [[ "${tool}" == *"@"* ]]; then
version="${tool#*@}" version="${tool#*@}"
tool="${tool%@*}"
if [[ ! "${version}" =~ ^([1-9][0-9]*(\.[0-9]+(\.[0-9]+)?)?|0\.[1-9][0-9]*(\.[0-9]+)?|^0\.0\.[0-9]+)$|^latest$ ]]; then if [[ ! "${version}" =~ ^([1-9][0-9]*(\.[0-9]+(\.[0-9]+)?)?|0\.[1-9][0-9]*(\.[0-9]+)?|^0\.0\.[0-9]+)$|^latest$ ]]; then
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 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" bail "install-action does not support semver operators: '${version}'"
fi fi
bail "install-action v2 does not support semver pre-release and build-metadata; please submit an issue if you need these supports again" bail "install-action v2 does not support semver pre-release and build-metadata; please submit an issue if you need these supports again: '${version}'"
fi fi
else else
version="latest" version="latest"
fi fi
tool="${tool%@*}"
info "installing ${tool}@${version}"
case "${tool}" in case "${tool}" in
protoc) protoc)
info "installing ${tool}@${version}"
read_manifest "protoc" "${version}" read_manifest "protoc" "${version}"
# Copying files to /usr/local/include requires sudo, so do not use it. # Copying files to /usr/local/include requires sudo, so do not use it.
bin_dir="${HOME}/.install-action/bin" bin_dir="${HOME}/.install-action/bin"
@@ -469,6 +465,7 @@ for tool in "${tools[@]}"; do
rm -rf "${tmp_dir}" rm -rf "${tmp_dir}"
;; ;;
valgrind) valgrind)
info "installing ${tool}@${version}"
case "${version}" in case "${version}" in
latest) ;; latest) ;;
*) warn "specifying the version of ${tool} is not supported yet by this action" ;; *) warn "specifying the version of ${tool} is not supported yet by this action" ;;
@@ -485,6 +482,7 @@ for tool in "${tools[@]}"; do
snap_install valgrind --classic snap_install valgrind --classic
;; ;;
cargo-binstall) cargo-binstall)
info "installing ${tool}@${version}"
case "${version}" in case "${version}" in
latest) ;; latest) ;;
*) warn "specifying the version of ${tool} is not supported by this action" ;; *) warn "specifying the version of ${tool} is not supported by this action" ;;
@@ -501,10 +499,15 @@ for tool in "${tools[@]}"; do
# Use cargo-binstall fallback if tool is not available. # Use cargo-binstall fallback if tool is not available.
if [[ ! -f "${manifest_dir}/${tool}.json" ]]; then if [[ ! -f "${manifest_dir}/${tool}.json" ]]; then
cargo_binstall "${tool}" "${version}" case "${version}" in
latest) unsupported_tools+=("${tool}") ;;
*) unsupported_tools+=("${tool}@${version}") ;;
esac
continue continue
fi fi
info "installing ${tool}@${version}"
# Pre-install # Pre-install
case "${tool}" in case "${tool}" in
shellcheck) shellcheck)
@@ -531,3 +534,14 @@ for tool in "${tools[@]}"; do
esac esac
echo echo
done done
if [[ ${#unsupported_tools[@]} -gt 0 ]]; then
IFS=$','
info "install-action does not support ${unsupported_tools[*]}; fallback to cargo-binstall"
IFS=$'\n\t'
install_cargo_binstall
# 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
cargo binstall --force --no-confirm "${unsupported_tools[@]}"
fi

View File

@@ -14,26 +14,32 @@
}, },
"aarch64_macos": { "aarch64_macos": {
"url": "https://github.com/cargo-bins/cargo-binstall/releases/download/v${version}/cargo-binstall-aarch64-apple-darwin.zip" "url": "https://github.com/cargo-bins/cargo-binstall/releases/download/v${version}/cargo-binstall-aarch64-apple-darwin.zip"
},
"aarch64_windows": {
"url": "https://github.com/cargo-bins/cargo-binstall/releases/download/v${version}/cargo-binstall-aarch64-pc-windows-msvc.zip"
} }
}, },
"latest": { "latest": {
"version": "0.18.1" "version": "0.19.3"
}, },
"0.18.1": { "0.19.3": {
"x86_64_linux_musl": { "x86_64_linux_musl": {
"checksum": "ef05f04e951665b617fe0796ec72e5dc51e8724ee0b09a0da129fa24162369a0" "checksum": "da46fac978af7d86820d1b6bbd14cfd10187bc25ac14c0236d3de8da7d92a183"
}, },
"x86_64_macos": { "x86_64_macos": {
"checksum": "291ad8f69e3f31a620c17a68cb456f64ab736947a76c57ffcc6f8602a09b4cb5" "checksum": "237a702ac2ee3130bff3624a7296ec471c6b6ff45cc29af30216b50f2124af5d"
}, },
"x86_64_windows": { "x86_64_windows": {
"checksum": "bfc078cb22626bb80e1bb23a3cc74f4362c1326ec3f3dfc1cc46e1bd13528906" "checksum": "053a32c20f44439366fdff80f5106097d6c3d128cb436cb0f425f32ed608d78b"
}, },
"aarch64_linux_musl": { "aarch64_linux_musl": {
"checksum": "d26b5bbe14bbf7bd0f5fdd5b843f7f6df2c75d01168d42909932a422f17a4d5b" "checksum": "be6c2542f093f393aa72734c96b12a353ec94232afba86fa6e93f25ed6d0669e"
}, },
"aarch64_macos": { "aarch64_macos": {
"checksum": "9ea261b7617bf6161447aa42b8e8979a7369aed3e5cef6b3774bec55fa4c70b6" "checksum": "ba01100fbd810977b4e12deddfaab0516acc96cded05e00ccb4acfcab7d67f7c"
},
"aarch64_windows": {
"checksum": "22aa13d36cba7d1aee1a531bed53374c6ed3d02daf542fd65eee3c5dad700bc8"
} }
} }
} }

View File

@@ -18,10 +18,38 @@
} }
}, },
"latest": { "latest": {
"version": "0.13.5" "version": "0.13.7"
}, },
"0.13": { "0.13": {
"version": "0.13.5" "version": "0.13.7"
},
"0.13.7": {
"x86_64_linux_musl": {
"checksum": "0e20f4302c1054a3f1a8e0e22eb15cfa3173c0e2dcbb62cfe7d6fe40dc27abd9"
},
"x86_64_macos": {
"checksum": "b0c1ed8ac67b1c12060b46d190a52f3aaa182a430968ce25addff1556e1bd391"
},
"x86_64_windows": {
"checksum": "fbe4e7b01b69fcbf7ab82b61a8ff8545dbd9f2cccfadc6b6c7c0e0d38b28f26b"
},
"aarch64_macos": {
"checksum": "ab2400539b4eb2d6756a2cdb841f6e3b5862f54d6212d0c015509f6c72718e4c"
}
},
"0.13.6": {
"x86_64_linux_musl": {
"checksum": "400142c52fa30b5718bd260c27937c66709bc3d1d7dcf152131e00c625be67ce"
},
"x86_64_macos": {
"checksum": "cc93c0fe0c76352d7e5b4e972963c9104108c646bafc2fd04ceb8cbd6fae31d7"
},
"x86_64_windows": {
"checksum": "d957cd4af23a34cc0a4ce49bda8c7657eac1b2124b1fbbb196f91cbbcb430252"
},
"aarch64_macos": {
"checksum": "3401ee901e8817e52088de2ad4afdf061b445fd95fd0a2ef81eeddac9244ceb8"
}
}, },
"0.13.5": { "0.13.5": {
"x86_64_linux_musl": { "x86_64_linux_musl": {

View File

@@ -1,10 +1,36 @@
{ {
"template": null, "template": null,
"latest": { "latest": {
"version": "0.5.25" "version": "0.5.26"
}, },
"0.5": { "0.5": {
"version": "0.5.25" "version": "0.5.26"
},
"0.5.26": {
"x86_64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.5.26/cargo-hack-x86_64-unknown-linux-musl.tar.gz",
"checksum": "e4bf3b5ee4be1d7e324c625f18ad85db22ab7bab9bb76988e3901358bc6b6e23"
},
"x86_64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.5.26/cargo-hack-x86_64-apple-darwin.tar.gz",
"checksum": "697b11ef5f79c9976424c46be7a7f6a7f8efa94b587deb41fa37a2aa0fbcc28b"
},
"x86_64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.5.26/cargo-hack-x86_64-pc-windows-msvc.zip",
"checksum": "6d751dde6c8a87997bc9863bfe9b2d1293497b5eb7021465e0873567f8887500"
},
"aarch64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.5.26/cargo-hack-aarch64-unknown-linux-musl.tar.gz",
"checksum": "50814c9e1bff259816e03508aac9ac06be18bea4bf220928fac10b1de9494abc"
},
"aarch64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.5.26/cargo-hack-aarch64-apple-darwin.tar.gz",
"checksum": "fb4a1d38ce5edc5eccc3ecdc2aa27dcd58b0984ec76316f52d9c8a3c97679a4f"
},
"aarch64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.5.26/cargo-hack-aarch64-pc-windows-msvc.tar.gz",
"checksum": "abb797d5794ea0456b323e5074b452c798dd5b5a94135d91f38494e829c8bbff"
}
}, },
"0.5.25": { "0.5.25": {
"x86_64_linux_musl": { "x86_64_linux_musl": {

View File

@@ -17,10 +17,112 @@
} }
}, },
"latest": { "latest": {
"version": "0.5.3" "version": "0.5.9"
}, },
"0.5": { "0.5": {
"version": "0.5.3" "version": "0.5.9"
},
"0.5.9": {
"x86_64_linux_musl": {
"checksum": "aadde3416c86403f72986f6c68001d2a46497ee8892f5affdb6b681213b586a2"
},
"x86_64_macos": {
"checksum": "7f7d17223237cc2ea65a4cd2d3ea0f0868711bd44dd56ee35839b41202b08685"
},
"x86_64_windows": {
"checksum": "efd986565868a0f1a255af9b913e77b95eb77b49940a93dde4e2c88874f2da39"
},
"aarch64_linux_musl": {
"checksum": "d6d539c038a07c12e04954af3357afadadf92ca3eacf5a155eb555b47d3b1ca4"
},
"aarch64_macos": {
"checksum": "4a023a922507d8a63424cb4b3d98c695fc2a66f8596b1e93b3a573afc2a384c5"
}
},
"0.5.8": {
"x86_64_linux_musl": {
"checksum": "78a2b85c54d2ecf76ad7309278901c2f4d6dcc611ef095844e8c6bd87b2d6a72"
},
"x86_64_macos": {
"checksum": "b1227359e4994f9ee96247bc2d47e36612f0b5344f9010f31ac965163a44e98c"
},
"x86_64_windows": {
"checksum": "d18f4da434596eb2c4aa2eaa95e00482130affa0a1710046c2d29c5c6edcb202"
},
"aarch64_linux_musl": {
"checksum": "11a3018bd91ff62806e7aa3413c5dc9af22ede870af4850866dbfe94cec0bd70"
},
"aarch64_macos": {
"checksum": "d4c67fac1dfa16cb130142bb572b310de856a8ec0494cc95351b5d82507793f2"
}
},
"0.5.7": {
"x86_64_linux_musl": {
"checksum": "e085b93a22d5f0daaa5c1bcce79885e549057f41b1229c08435c939c4fdf87ed"
},
"x86_64_macos": {
"checksum": "c4592c9691e508d2b0fd1c20b0227638fe47f752943339ebe4e50affc532ea91"
},
"x86_64_windows": {
"checksum": "2304501710ed6959c71127a99c6630f2cebf7cba4ccefb213b1a01a0a8a8b0af"
},
"aarch64_linux_musl": {
"checksum": "23a302bdb5af5dae2e941414ddf3abb4738b9b4d89936e31a971241b92c4f85e"
},
"aarch64_macos": {
"checksum": "07d09d8d902a1b07554c1eb3d36abf3aa971477d33b1604a31eaf3c2e13f57a0"
}
},
"0.5.6": {
"x86_64_linux_musl": {
"checksum": "9b45fb8b1fbac1977ed828c248228f31cc2caf6f2ce8b27bd38c25b7275ef701"
},
"x86_64_macos": {
"checksum": "f249dbf6e8c750a43a933845a6141e6bcbf0ad022c9d8e7ba9f0d6b9198146b7"
},
"x86_64_windows": {
"checksum": "6dba76298961771c08e643d8c69e06d5c2a39f1918f4087e5e02eac920470372"
},
"aarch64_linux_musl": {
"checksum": "3518e7b954fad878db5be7beafe8015d75ded892e7df2cde8359a4a830842751"
},
"aarch64_macos": {
"checksum": "6697a3b11dc36bb4e654a90f1e8e66afe0a49f4c8d815fa214129721a20058e5"
}
},
"0.5.5": {
"x86_64_linux_musl": {
"checksum": "58f459604beef46eff43d14fc41cb39437a2834bece9b91823cafce7a3e91428"
},
"x86_64_macos": {
"checksum": "870334436497fa4ec5aea8ca353688881ad9f8f6cc4ad61c4837de1f078d637b"
},
"x86_64_windows": {
"checksum": "107581052c1978caa9c485d3c3b41e60ed9d335023434e4af1be51a1e0cac458"
},
"aarch64_linux_musl": {
"checksum": "a48b20d8f7ebf35949ba6e3419106afdfe638d1527ffeb5945385d51c82a443d"
},
"aarch64_macos": {
"checksum": "00abbc5db882b766d92c08a7069902cbe3f183af066a42bf079f954fc32f3c29"
}
},
"0.5.4": {
"x86_64_linux_musl": {
"checksum": "c4912bb56a25a8ea17bbea843019386d191d789d66d19d3fa70b49fc1efb4599"
},
"x86_64_macos": {
"checksum": "af12ff744aacc5a78e84ac849dd09d8a8babfacb10926a9b32e97bf008624165"
},
"x86_64_windows": {
"checksum": "ff0d031ddd1fb99a7788124b9b6cafe26f29aaffd82481140f763b95d7b7ba8d"
},
"aarch64_linux_musl": {
"checksum": "e730738b882ade2d1a0747ee83baa147cffa30ff286e11b94224e2b68ba3a087"
},
"aarch64_macos": {
"checksum": "a56c6046c7c6eb5030acf0c28b1448e675e072fb7eaa94b8674934d167f6c445"
}
}, },
"0.5.3": { "0.5.3": {
"x86_64_linux_musl": { "x86_64_linux_musl": {

View File

@@ -20,10 +20,30 @@
} }
}, },
"latest": { "latest": {
"version": "0.1.9" "version": "0.1.10"
}, },
"0.1": { "0.1": {
"version": "0.1.9" "version": "0.1.10"
},
"0.1.10": {
"x86_64_linux_musl": {
"checksum": "de28bdc0a9ff95ce607eea9b090525dc967138029f31a0c5173143e3dbe080d3"
},
"x86_64_macos": {
"checksum": "0092d3f009db6e8af40db25ca078b151cc64556eebbc4afa506f81b17d054680"
},
"x86_64_windows": {
"checksum": "7221ee5df739422a9f817f65fd152bbb2313a2fe592cbf2d1f783f90479befbb"
},
"aarch64_linux_musl": {
"checksum": "60b5fc7500415937a29c5d80d2d7772b87583f9716b685d840cd502b2c456a63"
},
"aarch64_macos": {
"checksum": "f1c872f93d526bb9988c6b96eed66a4f5d6ee11170d9b3952e3ffbb441f94d69"
},
"aarch64_windows": {
"checksum": "eb78f90de7de5ed0c1075c7181fd126265bfaec39f93fe169d2c0aa814892b01"
}
}, },
"0.1.9": { "0.1.9": {
"x86_64_linux_musl": { "x86_64_linux_musl": {

View File

@@ -17,10 +17,44 @@
} }
}, },
"latest": { "latest": {
"version": "0.9.47" "version": "0.9.49"
}, },
"0.9": { "0.9": {
"version": "0.9.47" "version": "0.9.49"
},
"0.9.49": {
"x86_64_linux_gnu": {
"checksum": "5e19c5038c9940da4c47a9ae87f94b352dc98c2ab75b4b9aeae227cdff8440d2"
},
"x86_64_linux_musl": {
"checksum": "b09d7870bba824af1acfce505811951f0d81cf21b144490c6a3f34f59bcc182b"
},
"x86_64_macos": {
"checksum": "171bc696474667208587c74d9acce0250f3b2eac1faad39458e828a65c3f1c93"
},
"x86_64_windows": {
"checksum": "e9c532bb99c6e8e7edb65578f8c251fb3d87a3377bef1128763442dc7f088ebb"
},
"aarch64_linux_gnu": {
"checksum": "40ff81ed279e8a6d38ebe06ee75bba47785e8cb006267e35a15c157724e8e437"
}
},
"0.9.48": {
"x86_64_linux_gnu": {
"checksum": "9730218bacb5f6c1697a4f44a94958a3ce708e8cc7ff430ac007075620b49b09"
},
"x86_64_linux_musl": {
"checksum": "bc6c52c443469342d9eeed564d78007c8c7aca6c592153d1743b6c2530b195b8"
},
"x86_64_macos": {
"checksum": "ee592baa34e0210bc2195a9369e13cc520e926ee6cbfec8727c653c1f8a275c4"
},
"x86_64_windows": {
"checksum": "3d34a3be1ace82dc33f52a8396743ad19f1f78739d44fc755a927fb1c187c071"
},
"aarch64_linux_gnu": {
"checksum": "13af6c207cfae0219f6ec3760980d951292815d26f575f4c099ae1797af7505a"
}
}, },
"0.9.47": { "0.9.47": {
"x86_64_linux_gnu": { "x86_64_linux_gnu": {

View File

@@ -0,0 +1,71 @@
{
"template": {
"x86_64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-no-dev-deps/releases/download/v${version}/cargo-no-dev-deps-x86_64-unknown-linux-musl.tar.gz"
},
"x86_64_macos": {
"url": "https://github.com/taiki-e/cargo-no-dev-deps/releases/download/v${version}/cargo-no-dev-deps-x86_64-apple-darwin.tar.gz"
},
"x86_64_windows": {
"url": "https://github.com/taiki-e/cargo-no-dev-deps/releases/download/v${version}/cargo-no-dev-deps-x86_64-pc-windows-msvc.tar.gz"
},
"aarch64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-no-dev-deps/releases/download/v${version}/cargo-no-dev-deps-aarch64-unknown-linux-musl.tar.gz"
},
"aarch64_macos": {
"url": "https://github.com/taiki-e/cargo-no-dev-deps/releases/download/v${version}/cargo-no-dev-deps-aarch64-apple-darwin.tar.gz"
},
"aarch64_windows": {
"url": "https://github.com/taiki-e/cargo-no-dev-deps/releases/download/v${version}/cargo-no-dev-deps-aarch64-pc-windows-msvc.tar.gz"
}
},
"latest": {
"version": "0.2.0"
},
"0.2": {
"version": "0.2.0"
},
"0.2.0": {
"x86_64_linux_musl": {
"checksum": "446d7879e260d1a6170ee105c211255e0729d2db50d4d6378c60ebc19b26b056"
},
"x86_64_macos": {
"checksum": "7eb91033a29c16c02a67162858adcd592804b3f393b981a3f0e00c1c3ce7a29c"
},
"x86_64_windows": {
"checksum": "aa49deac93a3bf7d29809f5b687e1e39ad5dcb21d7f227c9690a400846dda144"
},
"aarch64_linux_musl": {
"checksum": "085738eb7b1377034c2f569bd6a6402499a1f2e71d5e89bccaa5d85303c32627"
},
"aarch64_macos": {
"checksum": "9854154d4f044807dd1ad06c9b2a94f93e0f8551f44c90cab1a955eb909457a2"
},
"aarch64_windows": {
"checksum": "8fafabd875be78457349ad2c860793d28a92efaf881de16fcda3e68bf9286baf"
}
},
"0.1": {
"version": "0.1.0"
},
"0.1.0": {
"x86_64_linux_musl": {
"checksum": "eef6cd49bd2a70cf27dc5573fb5881c0908f0848777f717d17a6512bb589dc53"
},
"x86_64_macos": {
"checksum": "1e4399f81a9018b45a087b4fd60c801503d2931c6e3bc9a8f60896e2999bb1d3"
},
"x86_64_windows": {
"checksum": "7b3aa24b2cc01fa92fd9160b564ace599367b0c83362bc667a4fb3044a253a35"
},
"aarch64_linux_musl": {
"checksum": "1e5ca7c2c0659bb4ca036cf6ac4f779f88806a73bf0bda64aa6acb3c7438429f"
},
"aarch64_macos": {
"checksum": "8bbd83c11331d39dd811d817074a8a237bc7176616a2d7ae32ecd2e7049743d8"
},
"aarch64_windows": {
"checksum": "3c3166694500e84e2f67029407236a49b6f8877c4a09429062a552f259bf651b"
}
}
}

View File

@@ -20,10 +20,44 @@
} }
}, },
"latest": { "latest": {
"version": "0.34.1" "version": "0.34.4"
}, },
"0.34": { "0.34": {
"version": "0.34.1" "version": "0.34.4"
},
"0.34.4": {
"x86_64_linux_musl": {
"checksum": "088d41a1b13b4623148119af9a3c2f618794170484294c210d5acd64f94a5cc6"
},
"x86_64_macos": {
"checksum": "74a1751e335ffde8385fb415365290b81d26f3509007a0cead1f62f8bb6d0e37"
},
"x86_64_windows": {
"checksum": "209e751b693f1c076fbd3d204af01bcb5c10be3f9dd99106bd14145e98de01fc"
},
"aarch64_linux_gnu": {
"checksum": "80607da90a920448d4361ad4993f7c5e770f3e8b6062d492ac00dd2eb558f256"
},
"aarch64_macos": {
"checksum": "bb052fa8f0cc995c09563adb07fb554a5386c2ed1152ba97a76734ed6ac55c4e"
}
},
"0.34.2": {
"x86_64_linux_musl": {
"checksum": "aee0a7ee92e67b9cc3d8d215dce4e0985c1239a1e674fbb987ac9e719f969ac8"
},
"x86_64_macos": {
"checksum": "5127902352952d5d913aafa16b65a52d3dd7b10f2f0f8c984b2d177f427f6c73"
},
"x86_64_windows": {
"checksum": "fdcb3c85e11b90ad18f2a967af6a259c881adbd895582a675ab5fd87798d05b4"
},
"aarch64_linux_gnu": {
"checksum": "507541fb2580113e2933ea34c5afe28bfb82cfb61650fa05827dd8c9981242da"
},
"aarch64_macos": {
"checksum": "038f0d391fdcf33214f0cd2793377c5673a39ebf8ff3a19225afd320efb0f8a2"
}
}, },
"0.34.1": { "0.34.1": {
"x86_64_linux_musl": { "x86_64_linux_musl": {

144
manifests/grcov.json Normal file
View File

@@ -0,0 +1,144 @@
{
"template": {
"x86_64_linux_musl": {
"url": "https://github.com/mozilla/grcov/releases/download/v${version}/grcov-x86_64-unknown-linux-musl.tar.bz2"
},
"x86_64_macos": {
"url": "https://github.com/mozilla/grcov/releases/download/v${version}/grcov-x86_64-apple-darwin.tar.bz2"
},
"x86_64_windows": {
"url": "https://github.com/mozilla/grcov/releases/download/v${version}/grcov-x86_64-pc-windows-msvc.zip"
},
"aarch64_linux_musl": {
"url": "https://github.com/mozilla/grcov/releases/download/v${version}/grcov-aarch64-unknown-linux-musl.tar.bz2"
},
"aarch64_macos": {
"url": "https://github.com/mozilla/grcov/releases/download/v${version}/grcov-aarch64-apple-darwin.tar.bz2"
}
},
"latest": {
"version": "0.8.13"
},
"0.8": {
"version": "0.8.13"
},
"0.8.13": {
"x86_64_linux_musl": {
"checksum": "e6c9108459ce028bc0ae257f73060f54e30f07e22d003b4c84dd74080a0cc5ce"
},
"x86_64_macos": {
"checksum": "714c8950635c87270f79cee8f9dd1d0ac9e1ad8ba5722ad9492402c3827a273f"
},
"x86_64_windows": {
"checksum": "d899981481a0a11cabdb926b61133697aa9691f0dcb164a9c2442cc0d168286d"
},
"aarch64_linux_musl": {
"checksum": "f18add0f0e29dcac89dbf1c9f7becd9d490c67fd04780b3d2b4aae5fb5599ac0"
},
"aarch64_macos": {
"checksum": "faaaa4280a8ef5d8b47f03db7e8bf885847186e8f1135658b3ad763c0e993edd"
}
},
"0.8.12": {
"x86_64_linux_musl": {
"checksum": "e1e270550337ce9b9bf190615fdfc09ba0d7d50b6f62b342ae438665edeaaa52"
},
"x86_64_macos": {
"checksum": "9305358569d12aa8a60ebb62a1a704bf86dce0c1beb676ea51c04f0fec761834"
},
"x86_64_windows": {
"checksum": "1e8b8ff52593294b5676ea56c65547bec04edad94b549bfee03a5ab2133cb599"
},
"aarch64_linux_musl": {
"checksum": "bb0f521acbecd3f8c30b67cc948de40c65297a34080485815ffa071a43332048"
},
"aarch64_macos": {
"checksum": "fbb9ea6d6ec5017ae3927a7f190083e375ac7d9c2d4e8ebaba1282aa27c23ce2"
}
},
"0.8.11": {
"x86_64_linux_musl": {
"checksum": "054641c3e8cbdf78ec5643a903e6fc0560287343e03435e3adfbbb809f282b53"
},
"x86_64_macos": {
"checksum": "2ad2921873c27d6bc7445731cefe44950bed5e5582eb0668342b3a41705ed592"
},
"x86_64_windows": {
"checksum": "16a958f907bf4b67b9c6d748dbffa34261b149c3becb8edb3217fe327dfe9e91"
},
"aarch64_linux_musl": {
"checksum": "b18cb035b9d2b13977ce530b282784529cd0bbbe22ac2f4676c95a063e77d989"
},
"aarch64_macos": {
"checksum": "3288d4b4cd65b8205d8d6dd8ec4696df4cb7d9a66338f29c843926f03f7d3d5a"
}
},
"0.8.10": {
"x86_64_linux_musl": {
"checksum": "8afc04b10914fd7ebaad061b5c1d31be0e42b5c1efc65caab21522f517e8023e"
},
"x86_64_macos": {
"checksum": "c85220cc39ad8ec500fbdda630a819a15353ec836dfa7c59aac3cb90373234fa"
},
"x86_64_windows": {
"checksum": "f5027c2575f39b6494e3a1a14a018c23a32598edf988df9423b880567756a1ca"
},
"aarch64_linux_musl": {
"checksum": "55710fc9ec4d7e15554992b21407155c99c5647efc7396a80d28a7be158d7943"
},
"aarch64_macos": {
"checksum": "174d1abf444cf8f513e88d7fe2d07d5e79950d4abd92f7910a4ed173a27f30c6"
}
},
"0.8.9": {
"x86_64_linux_musl": {
"checksum": "a511886708da766c6441771edb7bb413a02a519f316f1ae51a0df8e5cc71d62f"
},
"x86_64_macos": {
"checksum": "8cb9a59e3777784ee8f21300abbd3c9553c9d48b323a77bb3de0a28c81927e2b"
},
"x86_64_windows": {
"checksum": "47cc04bab3e3955c3a1413ddd8ae969d3e151f6b69946813d663eb0baa6a6718"
},
"aarch64_linux_musl": {
"checksum": "042d53bf4a00981b0c907072011d862cd2f5b3f23d67e93aa942c2a41724c9b0"
},
"aarch64_macos": {
"checksum": "0e24bff04ca23862a7cdd1fac0d7a70eab6f6ab9f89881b588c26b9cd537e2f3"
}
},
"0.8.8": {
"x86_64_linux_musl": {
"checksum": "a05051eee645073fcccedcfda0d488f5cf7d80e0374b9b1b7faacde3c966d8ed"
},
"x86_64_macos": {
"checksum": "7f20d3f1c6a6688fd59d2944ffdcf6d1df8efda768823f163c0313ecc3140060"
},
"x86_64_windows": {
"checksum": "94b38042164d7215ae1c09f70652e84548b2bd52fdfa2cf8afb4b77c2e35bb34"
},
"aarch64_linux_musl": {
"checksum": "6eca03d060097203fc87021de409d8a52c89343937e2fb1103e58b442143ce4c"
},
"aarch64_macos": {
"checksum": "65ab65121602d1f6afc76c26e91b5db94d0fd3a6e1735cdb547e311687774997"
}
},
"0.8.7": {
"x86_64_linux_musl": {
"checksum": "21be5741d96fdf2c6ef8db175c4761e49aa43258de720960c1502cf956df07af"
},
"x86_64_macos": {
"checksum": "abf754e22d7f2dfe4506c1bff6c4876b0374d6c3f014e56311b80805bedcc28d"
},
"x86_64_windows": {
"checksum": "d2758870bc3724e55982c1795aca2b36da3c312dc62e7f8cd322de8fe97eb9a3"
},
"aarch64_linux_musl": {
"checksum": "2a07b50f91bcc389b563ef6e101a141323d8117bfa18e6cbcf2329e30137b6f8"
},
"aarch64_macos": {
"checksum": "5c6de41fc0c14bc69eae2df82cb5d04eaa265b247b80762c0efb00c7191b4a40"
}
}
}

View File

@@ -17,10 +17,50 @@
} }
}, },
"latest": { "latest": {
"version": "1.10.0" "version": "1.12.0"
}, },
"1": { "1": {
"version": "1.10.0" "version": "1.12.0"
},
"1.12": {
"version": "1.12.0"
},
"1.12.0": {
"x86_64_linux_musl": {
"checksum": "a8e1278f3a2c81384f9a146e74fc40b5204f00776cccfb4da4d36e45716546d4"
},
"x86_64_macos": {
"checksum": "22eeed0bcff05f5cd280345b611a9950b81c3a5b4cabb925cf5c0c77475b2dfd"
},
"x86_64_windows": {
"checksum": "a19d34d8b08e08a2d5b6839db6ece5bfd05faefa45b8924ecbe93f07d3e86e76"
},
"aarch64_linux_musl": {
"checksum": "a8f990336308179103c7776b463f89d751d7c910b757765dd47713b4a32b93a1"
},
"aarch64_macos": {
"checksum": "d08bcc10a690fed8db84e7a64c8665e69d56ad601a85fa970f0a82bee23ec204"
}
},
"1.11": {
"version": "1.11.0"
},
"1.11.0": {
"x86_64_linux_musl": {
"checksum": "c8068fcd03b800492ad0e5da84761034cb412542d6ded0a234da2a9fc578d540"
},
"x86_64_macos": {
"checksum": "e6e6b32115ce5ebf4f4d9ee7c8f5501c6a684eb874b7b3d68f7209cf40132b4e"
},
"x86_64_windows": {
"checksum": "43fdee33348907a3771341d5949ec78283bacc711c7aa7336a80fc938627ce68"
},
"aarch64_linux_musl": {
"checksum": "b8558bf44588bd21f144e179b4ca8d2afa6059227afbd03582c0715d54229deb"
},
"aarch64_macos": {
"checksum": "10344c6001955ed866e24e673c3781b2f1c06efc1d8cf629415b7a27c3781bff"
}
}, },
"1.10": { "1.10": {
"version": "1.10.0" "version": "1.10.0"

View File

@@ -23,10 +23,30 @@
} }
}, },
"latest": { "latest": {
"version": "0.5.2" "version": "0.5.3"
}, },
"0.5": { "0.5": {
"version": "0.5.2" "version": "0.5.3"
},
"0.5.3": {
"x86_64_linux_musl": {
"checksum": "7ec427621565a6bb67d7e46397471b374435bc4622339595afa42d74d2f2a2cf"
},
"x86_64_macos": {
"checksum": "9ab883043949d6b2080720dd88575774cb09bb8c97cacf8e8db06b46f91bc4a3"
},
"x86_64_windows": {
"checksum": "ff0032b4710ee12bbdf7afd11c382b81a011948fab529eb0259050531f49c89e"
},
"aarch64_linux_musl": {
"checksum": "d887eab1fd39ac54202058595efda8e4ef28d30697aea5b1d901e0922682db64"
},
"aarch64_macos": {
"checksum": "ceca49aff58a2ebd6cef9c54684c8311e71012ef2d9eb6b69524635ce13df0bc"
},
"aarch64_windows": {
"checksum": "bf9e1df974e64704ed063442c500a274d627398279715061fb29c1fd417efc9a"
}
}, },
"0.5.2": { "0.5.2": {
"x86_64_linux_musl": { "x86_64_linux_musl": {

View File

@@ -14,6 +14,9 @@
"aarch64_linux_musl": {}, "aarch64_linux_musl": {},
"aarch64_macos": { "aarch64_macos": {
"asset_name": "${package}-${rust_target}.zip" "asset_name": "${package}-${rust_target}.zip"
},
"aarch64_windows": {
"asset_name": "${package}-${rust_target}.zip"
} }
} }
} }

View File

@@ -0,0 +1,13 @@
{
"repository": "https://github.com/taiki-e/cargo-no-dev-deps",
"tag_prefix": "v",
"asset_name": "${package}-${rust_target}.tar.gz",
"platform": {
"x86_64_linux_musl": {},
"x86_64_macos": {},
"x86_64_windows": {},
"aarch64_linux_musl": {},
"aarch64_macos": {},
"aarch64_windows": {}
}
}

View File

@@ -0,0 +1,15 @@
{
"repository": "https://github.com/mozilla/grcov",
"tag_prefix": "v",
"asset_name": "${package}-${rust_target}.tar.bz2",
"version_range": ">= 0.8.7",
"platform": {
"x86_64_linux_musl": {},
"x86_64_macos": {},
"x86_64_windows": {
"asset_name": "${package}-${rust_target}.zip"
},
"aarch64_linux_musl": {},
"aarch64_macos": {}
}
}

View File

@@ -7,7 +7,7 @@ use std::{
collections::{BTreeMap, BTreeSet}, collections::{BTreeMap, BTreeSet},
env, fmt, env, fmt,
io::Read, io::Read,
path::Path, path::{Path, PathBuf},
slice, slice,
str::FromStr, str::FromStr,
time::Duration, time::Duration,
@@ -23,14 +23,15 @@ fn main() -> Result<()> {
} }
let package = &args[0]; let package = &args[0];
let root_dir = Path::new(env!("CARGO_MANIFEST_DIR")) let workspace_root = &workspace_root();
.join("../..") let manifest_path = &workspace_root
.canonicalize()?; .join("manifests")
let manifest_path = &root_dir.join("manifests").join(format!("{package}.json")); .join(format!("{package}.json"));
let download_cache_dir = &root_dir.join("tools/codegen/tmp/cache").join(package); let download_cache_dir = &workspace_root.join("tools/codegen/tmp/cache").join(package);
fs::create_dir_all(download_cache_dir)?; fs::create_dir_all(download_cache_dir)?;
let base_info: BaseManifest = serde_json::from_slice(&fs::read( let base_info: BaseManifest = serde_json::from_slice(&fs::read(
root_dir workspace_root
.join("tools/codegen/base") .join("tools/codegen/base")
.join(format!("{package}.json")), .join(format!("{package}.json")),
)?)?; )?)?;
@@ -39,8 +40,10 @@ fn main() -> Result<()> {
.strip_prefix("https://github.com/") .strip_prefix("https://github.com/")
.context("repository must be starts with https://github.com/")?; .context("repository must be starts with https://github.com/")?;
eprintln!("downloading releases of https://github.com/{repo}"); eprintln!("downloading releases of https://github.com/{repo} from https://api.github.com/repos/{repo}/releases");
let mut releases: github::Releases = vec![]; let mut releases: github::Releases = vec![];
// GitHub API returns up to 100 results at a time. If the number of releases
// is greater than 100, multiple fetches are needed.
for page in 1.. { for page in 1.. {
let per_page = 100; let per_page = 100;
let mut r: github::Releases = download(&format!( let mut r: github::Releases = download(&format!(
@@ -53,13 +56,17 @@ fn main() -> Result<()> {
} }
releases.append(&mut r); releases.append(&mut r);
} }
let releases: Vec<_> = releases let releases: BTreeMap<_, _> = releases
.iter() .iter()
.filter_map(|release| { .filter_map(|release| {
release let version = release.tag_name.strip_prefix(&base_info.tag_prefix)?;
.tag_name let mut semver_version = version.parse::<semver::Version>();
.strip_prefix(&base_info.tag_prefix) if semver_version.is_err() {
.map(|version| (version, release)) if let Some(default_major_version) = &base_info.default_major_version {
semver_version = format!("{default_major_version}.{version}").parse();
}
}
Some((Reverse(semver_version.ok()?), (version, release)))
}) })
.collect(); .collect();
@@ -109,13 +116,15 @@ fn main() -> Result<()> {
ManifestRef::Real(_) => &m.0 .0, ManifestRef::Real(_) => &m.0 .0,
}; };
if !manifests.map.is_empty() if !manifests.map.is_empty()
&& *version == releases.first().unwrap().0.parse()? && *version >= releases.first_key_value().unwrap().0 .0.clone().into()
{ {
return Ok(()); return Ok(());
} }
} }
} }
Some(format!("={}", releases.first().unwrap().0).parse()?) let req = format!("={}", releases.first_key_value().unwrap().0 .0).parse()?;
eprintln!("update manifest for versions '{req}'");
Some(req)
} }
None => match base_info.version_range { None => match base_info.version_range {
Some(version_range) => Some(version_range.parse()?), Some(version_range) => Some(version_range.parse()?),
@@ -134,7 +143,7 @@ fn main() -> Result<()> {
let req = if version_req == "latest" { let req = if version_req == "latest" {
if manifests.map.is_empty() { if manifests.map.is_empty() {
format!("={}", releases.first().unwrap().0).parse()? format!("={}", releases.first_key_value().unwrap().0 .0).parse()?
} else { } else {
format!(">{}", semver_versions.last().unwrap()).parse()? format!(">{}", semver_versions.last().unwrap()).parse()?
} }
@@ -147,18 +156,9 @@ fn main() -> Result<()> {
}; };
let mut buf = vec![]; let mut buf = vec![];
for &(version, release) in &releases { for (Reverse(semver_version), (version, release)) in &releases {
let mut semver_version = version.parse::<semver::Version>();
if semver_version.is_err() {
if let Some(default_major_version) = &base_info.default_major_version {
semver_version = format!("{default_major_version}.{version}").parse();
}
}
let Ok(semver_version) = semver_version else {
continue;
};
if let Some(version_req) = &version_req { if let Some(version_req) = &version_req {
if !version_req.matches(&semver_version) { if !version_req.matches(semver_version) {
continue; continue;
} }
} }
@@ -286,10 +286,37 @@ fn main() -> Result<()> {
); );
} }
let ManifestRef::Ref { version: latest_version } = manifests.map.first_key_value().unwrap().1.clone() else { unreachable!() };
if latest_only { if latest_only {
manifests manifests
.map .map
.retain(|k, m| k.0 == Version::latest() || matches!(m, ManifestRef::Real(..))); .retain(|k, _| k.0 == Version::latest() || k.0 == latest_version);
}
let ManifestRef::Real(latest_manifest) = &manifests.map[&Reverse(latest_version.clone())] else { unreachable!() };
for &p in base_info.platform.keys() {
if latest_manifest.download_info.contains_key(&p) {
continue;
}
if !base_info.prefer_linux_gnu {
if p == HostPlatform::x86_64_linux_gnu
&& latest_manifest
.download_info
.contains_key(&HostPlatform::x86_64_linux_musl)
{
continue;
}
if p == HostPlatform::aarch64_linux_gnu
&& latest_manifest
.download_info
.contains_key(&HostPlatform::aarch64_linux_musl)
{
continue;
}
}
bail!(
"platform list in base manifest for {package} contains {p:?}, \
but latest release ({latest_version}) doesn't contain it"
);
} }
let original_manifests = manifests.clone(); let original_manifests = manifests.clone();
@@ -334,6 +361,13 @@ fn main() -> Result<()> {
Ok(()) Ok(())
} }
fn workspace_root() -> PathBuf {
let mut dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
dir.pop(); // codegen
dir.pop(); // tools
dir
}
fn replace_vars(s: &str, package: &str, version: &str, platform: HostPlatform) -> Result<String> { fn replace_vars(s: &str, package: &str, version: &str, platform: HostPlatform) -> Result<String> {
let s = s let s = s
.replace("${package}", package) .replace("${package}", package)
@@ -348,21 +382,36 @@ fn replace_vars(s: &str, package: &str, version: &str, platform: HostPlatform) -
} }
fn download(url: &str) -> Result<ureq::Response> { fn download(url: &str) -> Result<ureq::Response> {
let token = env::var("INTERNAL_CODEGEN_GH_PAT").ok(); let mut token1 = env::var("INTERNAL_CODEGEN_GH_PAT")
.ok()
.filter(|v| !v.is_empty());
let mut token2 = env::var("GITHUB_TOKEN").ok().filter(|v| !v.is_empty());
let mut retry = 0; let mut retry = 0;
let mut last_error = None; let mut last_error;
while retry < 5 { loop {
let mut req = ureq::get(url); let mut req = ureq::get(url);
if let Some(token) = &token { if let Some(token) = &token1 {
req = req.set("Authorization", token);
} else if let Some(token) = &token2 {
req = req.set("Authorization", token); req = req.set("Authorization", token);
} }
match req.call() { match req.call() {
Ok(res) => return Ok(res), Ok(res) => return Ok(res),
Err(e) => last_error = Some(e), Err(e) => last_error = Some(e),
} }
if retry == 3 || retry == 6 {
if token1.is_some() {
token1 = None;
} else if token2.is_some() {
token2 = None;
}
}
retry += 1; retry += 1;
eprintln!("download failed; retrying ({retry}/5)"); if retry > 10 {
std::thread::sleep(Duration::from_secs(retry)); break;
}
eprintln!("download failed; retrying ({retry}/10)");
std::thread::sleep(Duration::from_secs(retry * 2));
} }
Err(last_error.unwrap().into()) Err(last_error.unwrap().into())
} }
@@ -555,6 +604,7 @@ struct ManifestTemplateDownloadInfo {
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
struct BaseManifest { struct BaseManifest {
/// Link to the GitHub repository. /// Link to the GitHub repository.
repository: String, repository: String,
@@ -575,6 +625,7 @@ struct BaseManifest {
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
struct BaseManifestPlatformInfo { struct BaseManifestPlatformInfo {
/// Asset name patterns. Default to the value at `BaseManifest::asset_name`. /// Asset name patterns. Default to the value at `BaseManifest::asset_name`.
asset_name: Option<StringOrArray>, asset_name: Option<StringOrArray>,
@@ -603,6 +654,7 @@ impl StringOrArray {
/// GitHub Actions Runner supports Linux (x86_64, aarch64, arm), Windows (x86_64, aarch64), /// GitHub Actions Runner supports Linux (x86_64, aarch64, arm), Windows (x86_64, aarch64),
/// and macOS (x86_64, aarch64). /// and macOS (x86_64, aarch64).
/// https://github.com/actions/runner /// https://github.com/actions/runner
/// https://github.com/actions/runner/blob/caec043085990710070108f375cd0aeab45e1017/.github/workflows/build.yml#L21
/// https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners /// https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners
/// ///
/// Note: /// Note:
@@ -615,7 +667,7 @@ impl StringOrArray {
/// https://github.com/rust-lang/rustup/pull/593 /// https://github.com/rust-lang/rustup/pull/593
/// https://github.com/cross-rs/cross/pull/1018 /// https://github.com/cross-rs/cross/pull/1018
/// Does it seem only armv7l is supported? /// Does it seem only armv7l is supported?
/// https://github.com/actions/runner/blob/6b9e8a6be411a6e63d5ccaf3c47e7b7622c5ec49/src/Misc/externals.sh#L174 /// https://github.com/actions/runner/blob/caec043085990710070108f375cd0aeab45e1017/src/Misc/externals.sh#L174
#[allow(non_camel_case_types)] #[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
enum HostPlatform { enum HostPlatform {

View File

@@ -21,7 +21,9 @@ bail() {
version="${1:?}" version="${1:?}"
version="${version#v}" version="${version#v}"
tag="v${version}" tag_prefix="v"
tag="${tag_prefix}${version}"
changelog="CHANGELOG.md"
if [[ ! "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?$ ]]; then if [[ ! "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?$ ]]; then
bail "invalid version format '${version}'" bail "invalid version format '${version}'"
fi fi
@@ -38,44 +40,55 @@ if gh release view "${tag}" &>/dev/null; then
bail "tag '${tag}' has already been created and pushed" bail "tag '${tag}' has already been created and pushed"
fi fi
if ! git branch | grep -q '\* main'; then if ! git branch | grep -q '\* main$'; then
bail "current branch is not 'main'" bail "current branch is not 'main'"
fi fi
tags=$(git --no-pager tag) release_date=$(date -u '+%Y-%m-%d')
tags=$(git --no-pager tag | (grep -E "^${tag_prefix}[0-9]+" || true))
if [[ -n "${tags}" ]]; then if [[ -n "${tags}" ]]; then
# Make sure the same release does not exist in CHANGELOG.md. # Make sure the same release does not exist in changelog.
release_date=$(date -u '+%Y-%m-%d') if grep -Eq "^## \\[${version//./\\.}\\]" "${changelog}"; then
if grep -Eq "^## \\[${version//./\\.}\\] - ${release_date}$" CHANGELOG.md; then bail "release ${version} already exist in ${changelog}"
bail "release ${version} already exist in CHANGELOG.md"
fi fi
if grep -Eq "^\\[${version//./\\.}\\]: " CHANGELOG.md; then if grep -Eq "^\\[${version//./\\.}\\]: " "${changelog}"; then
bail "link to ${version} already exist in CHANGELOG.md" bail "link to ${version} already exist in ${changelog}"
fi fi
# Update changelog. # Update changelog.
remote_url=$(grep -E '^\[Unreleased\]: https://' CHANGELOG.md | sed 's/^\[Unreleased\]: //; s/\.\.\.HEAD$//') remote_url=$(grep -E '^\[Unreleased\]: https://' "${changelog}" | sed 's/^\[Unreleased\]: //; s/\.\.\.HEAD$//')
before_tag="${remote_url#*/compare/}" before_tag="${remote_url#*/compare/}"
remote_url="${remote_url%/compare/*}" remote_url="${remote_url%/compare/*}"
sed -i "s/^## \\[Unreleased\\]/## [Unreleased]\\n\\n## [${version}] - ${release_date}/" CHANGELOG.md sed -i "s/^## \\[Unreleased\\]/## [Unreleased]\\n\\n## [${version}] - ${release_date}/" "${changelog}"
sed -i "s#^\[Unreleased\]: https://.*#[Unreleased]: ${remote_url}/compare/v${version}...HEAD\\n[${version}]: ${remote_url}/compare/${before_tag}...v${version}#" CHANGELOG.md sed -i "s#^\[Unreleased\]: https://.*#[Unreleased]: ${remote_url}/compare/${tag}...HEAD\\n[${version}]: ${remote_url}/compare/${before_tag}...${tag}#" "${changelog}"
if ! grep -Eq "^## \\[${version//./\\.}\\] - ${release_date}$" CHANGELOG.md; then if ! grep -Eq "^## \\[${version//./\\.}\\] - ${release_date}$" "${changelog}"; then
bail "failed to update CHANGELOG.md" bail "failed to update ${changelog}"
fi fi
if ! grep -Eq "^\\[${version//./\\.}\\]: " CHANGELOG.md; then if ! grep -Eq "^\\[${version//./\\.}\\]: " "${changelog}"; then
bail "failed to update CHANGELOG.md" bail "failed to update ${changelog}"
fi
else
# Make sure the release exists in changelog.
if ! grep -Eq "^## \\[${version//./\\.}\\] - ${release_date}$" "${changelog}"; then
bail "release ${version} does not exist in ${changelog} or has wrong release date"
fi
if ! grep -Eq "^\\[${version//./\\.}\\]: " "${changelog}"; then
bail "link to ${version} does not exist in ${changelog}"
fi fi
fi fi
# Make sure that a valid release note for this version exists. # Make sure that a valid release note for this version exists.
# https://github.com/taiki-e/parse-changelog # https://github.com/taiki-e/parse-changelog
changes=$(parse-changelog "${changelog}" "${version}")
if [[ -z "${changes}" ]]; then
bail "changelog for ${version} has no body"
fi
echo "============== CHANGELOG ==============" echo "============== CHANGELOG =============="
parse-changelog CHANGELOG.md "${version}" echo "${changes}"
echo "=======================================" echo "======================================="
if [[ -n "${tags}" ]]; then if [[ -n "${tags}" ]]; then
# Create a release commit. # Create a release commit.
git add CHANGELOG.md git add "${changelog}"
git commit -m "Release ${version}" git commit -m "Release ${version}"
fi fi