mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-28 01:50:27 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54eee5470f | ||
|
|
2411265c71 | ||
|
|
8066254c63 | ||
|
|
0feb352bd8 | ||
|
|
9a9630c7b3 | ||
|
|
baf51dce12 | ||
|
|
c096cea2cf | ||
|
|
cde5fb702d | ||
|
|
c37d86a473 | ||
|
|
f053d641ce | ||
|
|
e67e350d53 | ||
|
|
e4aa1a2fa0 | ||
|
|
0b2444221a | ||
|
|
1ddad10228 | ||
|
|
c811846c9e | ||
|
|
2af5f71731 | ||
|
|
ba88d8e860 | ||
|
|
0e7be51948 |
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -31,19 +31,19 @@ jobs:
|
||||
tool:
|
||||
# cargo-watch is supported by cargo-binstall (through quickinstall)
|
||||
# TODO: valgrind installation sometime hangs.
|
||||
- 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,grcov
|
||||
- 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
|
||||
include:
|
||||
# Note: Specifying the version of valgrind and cargo-binstall is not supported.
|
||||
- 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,grcov@0.8.13
|
||||
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
|
||||
- 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,grcov@0.8
|
||||
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
|
||||
- os: ubuntu-20.04
|
||||
tool: cargo-valgrind@2,just@1,protoc@3,shfmt@3,wasmtime@4,cargo-watch@8
|
||||
- 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,grcov
|
||||
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
|
||||
- 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,grcov
|
||||
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
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -76,20 +76,20 @@ jobs:
|
||||
- rockylinux:8-minimal # glibc 2.28
|
||||
tool:
|
||||
# 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,grcov
|
||||
- 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
|
||||
include:
|
||||
- container: ubuntu:22.04 # glibc 2.35
|
||||
# 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,grcov
|
||||
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
|
||||
- container: fedora:latest # glibc 2.36 (as of fedora 37)
|
||||
# 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,grcov
|
||||
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
|
||||
- container: centos:7 # glibc 2.17
|
||||
# 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,grcov
|
||||
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
|
||||
- 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.
|
||||
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,grcov
|
||||
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
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.container }}
|
||||
steps:
|
||||
|
||||
25
CHANGELOG.md
25
CHANGELOG.md
@@ -10,6 +10,26 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [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.
|
||||
@@ -33,6 +53,7 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
## [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
|
||||
@@ -528,7 +549,9 @@ Note: This release is considered a breaking change because installing on version
|
||||
|
||||
Initial release
|
||||
|
||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.1.4...HEAD
|
||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.2.1...HEAD
|
||||
[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
|
||||
|
||||
@@ -83,6 +83,7 @@ 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-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-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-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) |
|
||||
|
||||
4
main.sh
4
main.sh
@@ -340,12 +340,13 @@ case "$(uname -m)" in
|
||||
# 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
|
||||
# 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" ;;
|
||||
@@ -508,6 +509,7 @@ for tool in "${tools[@]}"; do
|
||||
# Use cargo-binstall fallback if tool is not available.
|
||||
if [[ ! -f "${manifest_dir}/${tool}.json" ]]; then
|
||||
cargo_binstall "${tool}" "${version}"
|
||||
echo
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
@@ -14,26 +14,32 @@
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"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": {
|
||||
"version": "0.18.1"
|
||||
"version": "0.19.1"
|
||||
},
|
||||
"0.18.1": {
|
||||
"0.19.1": {
|
||||
"x86_64_linux_musl": {
|
||||
"checksum": "ef05f04e951665b617fe0796ec72e5dc51e8724ee0b09a0da129fa24162369a0"
|
||||
"checksum": "b270f25fd21fe27b99b99cb4f6dd5ed98ec01284cf450994974f632c77a823a8"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"checksum": "291ad8f69e3f31a620c17a68cb456f64ab736947a76c57ffcc6f8602a09b4cb5"
|
||||
"checksum": "dd46485e17b12211684fcb3e55e966f9f4cb75c14bb715f6c905373640e98a4e"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"checksum": "bfc078cb22626bb80e1bb23a3cc74f4362c1326ec3f3dfc1cc46e1bd13528906"
|
||||
"checksum": "b120023e546562bfea5ca4ef1a3b67fc6571968ae459a34aa0b4414eff38f5e3"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"checksum": "d26b5bbe14bbf7bd0f5fdd5b843f7f6df2c75d01168d42909932a422f17a4d5b"
|
||||
"checksum": "98264b5342db7a7b68d215d105a42a81961de02743b8c369b476dc892d12f2fa"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"checksum": "9ea261b7617bf6161447aa42b8e8979a7369aed3e5cef6b3774bec55fa4c70b6"
|
||||
"checksum": "dd099af7147d856bcf6cc713c1bf53c4be003f597f92fe9c2e3a58d0ad7d6fd2"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"checksum": "ed5023a73f3bb8a8b8fb80e5a7476cab2487d7e16ed3fe04b51cf25ec1644d92"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,38 @@
|
||||
}
|
||||
},
|
||||
"latest": {
|
||||
"version": "0.13.5"
|
||||
"version": "0.13.7"
|
||||
},
|
||||
"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": {
|
||||
"x86_64_linux_musl": {
|
||||
|
||||
@@ -1,10 +1,36 @@
|
||||
{
|
||||
"template": null,
|
||||
"latest": {
|
||||
"version": "0.5.25"
|
||||
"version": "0.5.26"
|
||||
},
|
||||
"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": {
|
||||
"x86_64_linux_musl": {
|
||||
|
||||
@@ -17,10 +17,44 @@
|
||||
}
|
||||
},
|
||||
"latest": {
|
||||
"version": "0.5.5"
|
||||
"version": "0.5.7"
|
||||
},
|
||||
"0.5": {
|
||||
"version": "0.5.5"
|
||||
"version": "0.5.7"
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -20,10 +20,30 @@
|
||||
}
|
||||
},
|
||||
"latest": {
|
||||
"version": "0.1.9"
|
||||
"version": "0.1.10"
|
||||
},
|
||||
"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": {
|
||||
"x86_64_linux_musl": {
|
||||
|
||||
48
manifests/cargo-no-dev-deps.json
Normal file
48
manifests/cargo-no-dev-deps.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"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.1.0"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,30 @@
|
||||
}
|
||||
},
|
||||
"latest": {
|
||||
"version": "0.5.2"
|
||||
"version": "0.5.3"
|
||||
},
|
||||
"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": {
|
||||
"x86_64_linux_musl": {
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
"aarch64_linux_musl": {},
|
||||
"aarch64_macos": {
|
||||
"asset_name": "${package}-${rust_target}.zip"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"asset_name": "${package}-${rust_target}.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
tools/codegen/base/cargo-no-dev-deps.json
Normal file
13
tools/codegen/base/cargo-no-dev-deps.json
Normal 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": {}
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ fn main() -> Result<()> {
|
||||
.join(format!("{package}.json"));
|
||||
let download_cache_dir = &workspace_root.join("tools/codegen/tmp/cache").join(package);
|
||||
fs::create_dir_all(download_cache_dir)?;
|
||||
|
||||
let base_info: BaseManifest = serde_json::from_slice(&fs::read(
|
||||
workspace_root
|
||||
.join("tools/codegen/base")
|
||||
@@ -41,6 +42,8 @@ fn main() -> Result<()> {
|
||||
|
||||
eprintln!("downloading releases of https://github.com/{repo}");
|
||||
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.. {
|
||||
let per_page = 100;
|
||||
let mut r: github::Releases = download(&format!(
|
||||
@@ -286,10 +289,37 @@ fn main() -> Result<()> {
|
||||
);
|
||||
}
|
||||
|
||||
let ManifestRef::Ref { version: latest_version } = manifests.map.first_key_value().unwrap().1.clone() else { unreachable!() };
|
||||
if latest_only {
|
||||
manifests
|
||||
.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();
|
||||
@@ -357,8 +387,8 @@ fn replace_vars(s: &str, package: &str, version: &str, platform: HostPlatform) -
|
||||
fn download(url: &str) -> Result<ureq::Response> {
|
||||
let token = env::var("INTERNAL_CODEGEN_GH_PAT").ok();
|
||||
let mut retry = 0;
|
||||
let mut last_error = None;
|
||||
while retry < 5 {
|
||||
let mut last_error;
|
||||
loop {
|
||||
let mut req = ureq::get(url);
|
||||
if let Some(token) = &token {
|
||||
req = req.set("Authorization", token);
|
||||
@@ -368,8 +398,11 @@ fn download(url: &str) -> Result<ureq::Response> {
|
||||
Err(e) => last_error = Some(e),
|
||||
}
|
||||
retry += 1;
|
||||
if retry > 5 {
|
||||
break;
|
||||
}
|
||||
eprintln!("download failed; retrying ({retry}/5)");
|
||||
std::thread::sleep(Duration::from_secs(retry));
|
||||
std::thread::sleep(Duration::from_secs(retry * 2));
|
||||
}
|
||||
Err(last_error.unwrap().into())
|
||||
}
|
||||
@@ -562,6 +595,7 @@ struct ManifestTemplateDownloadInfo {
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
struct BaseManifest {
|
||||
/// Link to the GitHub repository.
|
||||
repository: String,
|
||||
@@ -582,6 +616,7 @@ struct BaseManifest {
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
struct BaseManifestPlatformInfo {
|
||||
/// Asset name patterns. Default to the value at `BaseManifest::asset_name`.
|
||||
asset_name: Option<StringOrArray>,
|
||||
@@ -610,6 +645,7 @@ impl StringOrArray {
|
||||
/// 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
|
||||
///
|
||||
/// Note:
|
||||
@@ -622,7 +658,7 @@ impl StringOrArray {
|
||||
/// 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
|
||||
/// https://github.com/actions/runner/blob/caec043085990710070108f375cd0aeab45e1017/src/Misc/externals.sh#L174
|
||||
#[allow(non_camel_case_types)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
|
||||
enum HostPlatform {
|
||||
|
||||
Reference in New Issue
Block a user